Oil prices have been all over the place this year. WTI, the primary U.S. oil price benchmark, started 2022 at around $75 a barrel before rocketing over $120 a barrel following Russia's invasion of Ukraine. Crude has since cooled off on fears that the economy might enter a recession and dent oil demand. 

However, after bottoming in the mid-$70s in late September, crude oil has rocketed toward $90 a barrel following news that OPEC will slash its output by a surprising 2 million barrels per day. The move could keep a floor under crude prices and potentially push them higher depending on demand and other supplies. Because of that, several oil stocks look wildly undervalued based on the cash flow they can produce at $90 a barrel. 

1. Taking advantage of its undervalued stock

Diamondback Energy (FANG -0.77%) estimates it can produce $4.3 billion in free cash flow at $90 a barrel. The oil company currently has a $24.1 billion market cap. These numbers imply the company trades at 5.6 times its free cash flow or an 18% free-cash-flow yield. That makes it look wildly undervalued compared to the major stock market indexes. The S&P 500 currently trades at a 5% free-cash-flow yield while the Nasdaq's is even lower at 4%. 

Diamondback Energy has been taking advantage of its undervalued share price. The oil company recently repurchased $303 million of its shares in the second quarter and bought back another $200 million early in the third. Meanwhile, it recently doubled its share repurchase authorization to $4 billion. That should enable the company to continue gobbling up its dirt-cheap shares. 

2. Getting cheaper by the deal

Devon Energy (DVN -0.46%) forecasts it can produce about $6 billion in free cash at $85 oil, which will rise along with oil prices. With a $46.7 billion market cap, it trades at less than 7.7 times its free cash flow, giving it a more than 13% free-cash-flow yield. That makes it wildly undervalued compared to the S&P 500 and Nasdaq. 

Devon has been using its free cash flow to pay dividends, repurchase shares, strengthen its solid balance sheet, and make value-enhancing acquisitions. It has already repurchased $1.2 billion in shares at an average price of $50. Meanwhile, its current $2 billion program could retire up to 6% of its outstanding stock, given how cheap shares remain these days.

Devon has also enhanced its ability to generate cash by using some of its financial flexibility to acquire cash-gushing oil properties. The company bought the leasehold interests and related assets of RimRock Oil and Gas in the Williston Basin for $865 million. That price point valued the assets at 2.2 times cash flow and a greater than 25% free-cash-flow yield. Devon also bought Validus Energy for $1.8 billion to bolster its position in the Eagle Ford. It acquired the company at an even more attractive price of two times cash flow and a 30% free-cash-flow yield. Those highly accretive deals will enable Devon to produce more cash in the future, making its shares look even cheaper. 

3. A bottom-of-barrel valuation

Marathon Oil (MRO -1.01%) can produce $4.5 billion of free cash flow, assuming crude averages $100 a barrel. The company sees that number falling by about $60 million on an annualized basis for every $1 change in the oil price. So, assuming $90 oil, Marathon can produce $3.9 billion of annual free cash flow. With its market cap currently around $18 billion, Marathon trades at 4.7 times free cash or a 21% free-cash-flow yield. That makes it seem ridiculously undervalued.

Marathon has been taking advantage of that situation by gobbling up its shares. The company has repurchased $2.3 billion of its stock over the past year, reducing its share count by 15%. The company expects to return up to 40% of its free cash flow to investors if oil is over $60 a barrel and could push that number up above 50% if crude is around $100. While it has raised its dividend by 167% since the beginning of last year and could continue boosting that payout, the bulk of the return will likely come from additional repurchases of its dirt-cheap stock.

Lower-risk ways to play the oil market

Investors aren't giving Diamondback Energy, Devon Energy, and Marathon Oil enough credit for the cash they can produce at $90 oil. Because of that, they trade at extremely low valuations compared to the broader market. That's enabling them to use some of their gushing cash flows to repurchase their dirt-cheap shares.

With oil on the rise again following OPEC's production cut, these oil companies could produce even more free cash flow in the future. Combine that with their wildly undervalued share prices, and they look like low-risk ways to play the oil market's upside potential.