Wow. You rarely see a company do an all-cash deal that's actually worth more than its own entire market cap. But that's precisely what Anadarko (NYSE:APC) announced this morning.

In two separate deals, Anadarko will be buying Kerr-McGee (NYSE:KMG) and Western Gas (NYSE:WGR) in all-cash transactions worth a combined total of $23.3 billion. As of last night's close, Anadarko's market cap stood at $22.2 billion.

For Kerr-McGee, Anadarko is paying a 40% premium of $70.50 per share in cash (a total value of about $18 billion). On a straight calculation, that values Kerr-McGee at about $20 per barrel of oil equivalent (BOE). That doesn't account for possible divestiments, nor for the potential to reap production greater than today's proven reserves. Anadarko management projects roughly 3.1 billion BOE in total recoveries from the Kerr-McGee assets, at a full-cycle cost of $12.40 per BOE.

For Western Gas, the price was $61 a share (a 49% premium) and a total value of $5.3 billion. On a straight calculation, that's more than $34.50 per BOE -- but again, that figure is deceptive. In addition to Western Gas's probable additions to the reserve base (it has some sizable coalbed methane opportunities), roughly $1.6 billion of the purchase price will be assigned to Western Gas's midstream operations. That will lower the initial straight calculation to something closer to $24 per BOE. In this case, Anadarko management is projecting about 705 million BOE of total recoveries, at a full-cycle cost of around $9.50 per BOE.

Obviously, plenty of assumptions go into those numbers. If Anadarko is right about recoveries, costs, and future energy prices, those prices are very attractive. What's more, the company will be hedging about 75% of the acquired production through 2008.

One quick note: Anadarko can do this deal principally thanks to a $24 billion buyout facility provided by UBS, Credit Suisse (NYSE:CSR), and Citigroup (NYSE:C). Not surprisingly, UBS and Credit Suisse were also Anadarko's advisors on these deals.

I'm a bit surprised by the aggressiveness of Anadarko's deal. Then again, I've been seeing a lot more value lately in the energy sector; if we really are facing sustainable higher energy prices, these deals should produce some compelling returns. They may also mark the start of more merger-and-acquisition activity in the sector -- but that's a topic for another piece.

For more energetic Foolishness:

Find your own smart deals with a subscription to Motley Fool Inside Value . Join Philip Durell and hundreds of fellow value-minded Fools in their hunt for the best bargains overlooked by Wall Street. You can try it free for 30 days.

Fool contributor Stephen Simpson but has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).