The bidding war between Comcast and Disney for Fox assets is costing Rupert Murdoch billions of dollars.

Disney raised its bid for pieces of Twenty-First Century Fox to $71.3 billion, up from its original offer of $52.5 billion. This was in response to Comcast’s offer of $65 billion for the same Fox assets. Disney’s original bid was all stock. Its new bid is a mix of stock and cash, which raises Murdoch’s tax bill and cuts into his ultimate payday.

The higher-priced Disney bid could yield about $2 billion less for Murdoch than Disney's original offer in December, despite the new offer being almost $20 billion higher. That's assuming Murdoch takes part of his payment in cash, as the new deal is structured.

Murdoch owns about 17 percent of Fox. Disney's original offer would have amounted to a tax-free payday of $8.84 billion, plus another $8.29 billion from the tax-free spin off of the new Fox. That would have given him a total of $17.13 billion.

Disney's new offer amounts to $12.12 billion for Murdoch, based on his 17 percent stake. But some of that is taxable, and if he takes the full half in cash, he ends up with $9.94 billion after tax. And then with the taxable spin off of the new Fox, around $5.3 billion, his proceeds from the overall deal would be $15.24 billion, nearly $2 billion less.

And then there's Comcast's offer, which also would fall short of Disney's original bid. It would net Murdoch $7.07 billion after taxes, plus another $5.3 billion from the spin off, for a total of $12.37 billion.

If Comcast wants to get Murdoch back to the same levels he was at with the original Disney offer, the all-cash bid needs to be about $81 billion, which would be $16 billion higher than it is now, and nearly $30 billion higher than Disney’s original offer.

Regardless of what offer Murdoch takes, he’s still going to earn enough money to cover himself and his family for many, many lifetimes. So, part of this is just quibbling at the edges. But for a man who built an empire, and runs a conservative news network, he’s unlikely to enjoy watching billions go to the government.

For Murdoch, his tax bill can’t be a consideration in what deal Fox ultimately takes. He has to get the best price for his shareholders, otherwise he can expect lawsuits.

"I'm not surprised to see that the original offer is much better for him on an after-tax basis, which is the only basis that matters," said Robert Willens of Robert Willens LLC and a noted tax advisor to the wealthy.

Disney and Comcast, the parent of CNBC, have battled in private over the Fox assets for months. Murdoch was said to like Disney's original offer because of its tax-free treatment.

In a statement with Disney's sweetened offer, Murdoch said they "firmly believe that this combination with Disney will unlock even more value for shareholders as the new Disney continues to set the pace at a dynamic time for our industry."

As CNBC has already reported, Comcast's all-cash deal could result in a tax bill for Murdoch of $4 billion to $7 billion.

Murdoch's potential tax bill calculation uses a number of assumptions. For starters, his tax planning and personal financial strategies are unknown, but it is assumed his holdings of Fox — approximately 319 million shares, according to the most recent annual proxy — are at a zero or near-zero cost. That means he would be subject to a sizable capital gain. It's also assumed Murdoch would be subject to New York state and city tax.

Disney's new bid is $38 a share, or $19 in cash. The calculations assume he accepts the full 50 percent in cash, and the tax would be $6.85 a share, or $2.18 billion, based on his holdings. Of course, he may try to take it all in stock, instead. The deal gives shareholders the right to opt that way, but since Disney is aiming to pay half in stock and half in cash, overall, it's most likely shareholders will be prorated.

"I think, at the end of the day, given Disney's desire to pay half cash and half stock for Fox in the aggregate, Mr. Murdoch will wind up receiving roughly those percentages of his consideration in those forms," Willens said.

Then, there is the spin off of the remainder of Fox not being sold to Disney, something that would also trigger taxes because of the cash component of the offer, Willens said. Assuming the spinoff is about $26 a share and Murdoch paid 36 percent in federal, state and local New York taxes on it, that would be a tax bill of $2.98 billion.

The two bills together: $5.12 billion.

But then again, Comcast could always bid more and bring everyone back to the drawing board.

Disclosure: Comcast is the parent company of CNBC.