Higher oil prices following Russia's invasion of Ukraine fueled surging profits for Occidental Petroleum (OXY 0.09%) last year. However, crude prices have cooled off considerably in recent months, weighed down by macroeconomic concerns. Those lower oil prices caused Occidental's first-quarter earnings to plummet 48% and fall short of analysts' expectations. 

It wasn't all bad news for the oil giant. Occidental Petroleum still produced a lot of cash, most of which it returned to shareholders. These include Warren Buffett's Berkshire Hathaway (BRK.A 0.64%) (BRK.B 0.54%), which owns about a quarter of shares

Drilling down into Occidental Petroleum's first-quarter results

In the first quarter, Occidental Petroleum generated $1.1 billion, or $1.09 per share, of adjusted net income. That was 48% below the year-ago period and missed analysts' consensus estimate of $1.24 per share. 

The primary culprit was lower oil and gas prices. Occidental sold its oil for an average of $74.22 per barrel in the period, down 19% from the year-ago quarter. Meanwhile, the company sold its U.S. natural gas output for $3.01 per million cubic feet, 32% below the prior quarter. 

On a more positive note, production averaged 1.22 million barrels of oil equivalent per day (BOE/D) in the period. That was up from 1.08 million BOE/D in the prior-year period. It also exceeded the midpoint of the company's guidance range by 40,000 BOE/D. The company delivered strong production results across the board. Notably, it achieved its highest quarterly production in the Gulf of Mexico in over a decade, fueled partly by record output from the Caesar-Tonga field following a successful expansion last year. 

Continuing to turn crude into cash and returning it to shareholders

Occidental Petroleum's strong operational performance enabled it to generate lots of cash. It produced $3.2 billion of cash flow from operations in the quarter, 24% below the prior-year period. The company spent about $1.5 billion on capital projects, double what it invested last year. That significant investment increase is helping grow its oil and gas output while also building out its carbon capture and storage platform. 

Despite the lower cash flow and increased capital spending, Occidental Petroleum produced significant excess cash. Free cash flow totaled $1.7 billion in the period. 

It returned most of that money to shareholders. Occidental Petroleum repurchased $752 million of its stock, a quarter of its $3 billion share repurchase program. The company also paid its quarterly dividend, which it raised by 38.5% earlier this year to $0.18 per share. 

Those returns to common shareholders triggered a mandatory redemption of a portion of Berkshire Hathaway's preferred stock investment in the company. Warren Buffett's company made a $10 billion preferred investment in 2019 to help Occidental Petroleum fund its acquisition of Anadarko Petroleum. The oil company had to start redeeming that investment when it returned more than $4 per share in cash to common shareholders through dividends and repurchases over a 12-month period, which it hit in the first quarter. Occidental redeemed $647 million of the preferred stock investment and paid a $65 million premium (10% of the total) to Buffett's company, matching excess cash distributions to common shareholders.

The preferred stock redemption will save Occidental money over the long term. It pays Buffett's company an 8% rate on those shares ($800 million annually before the recent redemption). By redeeming this investment, Occidental will give itself more financial flexibility to return additional cash to all shareholders. 

Solid performance despite lower oil prices

While Occidental Petroleum's profits took a hit in the first quarter, it still operated well. Production exceeded guidance, and it generated lots of excess cash. That gave it the money to start buying back Buffett's preferred stock investment, which will provide it with more financial flexibility in the future. Because of that, it was a solid quarter, as the company showcased that its strategic plan was delivering results.