Chevron (CVX 0.37%) recently reported its preliminary second-quarter numbers. Despite lower oil and gas prices in the period, the oil giant still produced strong earnings and cash flow. That enabled it to send lots of money back to shareholders through dividends and share repurchases.

The oil company expects to continue producing strong cash flow for decades to come. That sets investors up to continue collecting more cash from the oil stock.

A sneak peek at the quarter

Chevron recently announced some senior leadership changes, including the retirement of its CFO. That led the company to report its preliminary second-quarter results to eliminate any potential financial concerns stemming from the CFO transition. Those numbers were strong despite the continued weakness of oil and gas prices this year. 

The oil giant reported $5.8 billion, or $3.08 per share, of adjusted earnings for the period. While that was below the $6.7 billion of adjusted earnings reported during the first quarter, the company's results exceeded analysts' expectations of $2.97 per share.   

Meanwhile, cash flow from operations was strong at $6.3 billion, only $900 million less than it earned in the first quarter. Cash flow was even higher after excluding working capital additions at $9.4 billion, putting it above the $9 billion the oil company hauled in during the first quarter. 

Chevron was able to offset some of the impacts of lower oil and gas prices by delivering strong production. It produced an average of nearly 3 million barrels of oil equivalent per day (BOE/D). While that was roughly flat with the first quarter, the company produced a record 772,000 BOE/D from the high-margin Permian Basin, where production has risen 11% over the past year. 

Sending shareholders the windfall

Chevron used its strong cash flow and exceptional balance sheet to return a record $7.2 billion of cash to shareholders. The oil company paid $2.8 billion in dividends and spent $4.4 billion to repurchase more than 27 million shares. Chevron has now repurchased nearly 50 million shares this year. Despite the record cash return and higher capital spending ($4.8 billion in the quarter compared to $3.9 billion in the first quarter), Chevron's leverage ratio declined from 12.7% to 12%, showcasing the continued strength of its balance sheet.

The company's ramped-up share repurchases came at the perfect time, as its stock price has declined this year:

 CVX Chart

CVX data by YCharts

That falling share price enabled the company to gobble up more of its outstanding shares. Chevron's outstanding shares have declined 2% over the past year, which doesn't include its big second-quarter buyback. 

Chevron expects to continue generating a lot of cash in the coming years, a significant portion of which it plans to return to investors. The oil company noted in its preliminary second-quarter earnings report that its "deep resource inventory and advantaged royalty position is expected to deliver strong cash flow through 2040." 

The company has a clear line of sight to grow its free cash flow by more than 10% annually through 2027, assuming an average oil price of around $60 a barrel. That growing cash flow, combined with its strong balance sheet, would give Chevron the financial flexibility to continue growing its dividend (it has increased its payout for 36 straight years) and repurchase 3% to 6% of its shares each year.

Chevron is in the process of enhancing its low-cost resource base and ability to generate free cash flow by acquiring PDC Energy. The company expects the $7.6 billion deal to close by the end of next month. The acquisition will add 10% to its oil equivalent proved reserves for less than $7 per barrel. Meanwhile, it will boost its annual free cash flow by $1 billion, assuming $70 oil (below the recent price). 

A well-oiled cash flow machine

Chevron's low-cost resources enable it to generate lots of cash, which it expects will continue for decades. It can produce enough money at relatively low oil prices to cover its attractive and growing dividend (currently yielding 3.8%), investments to expand its traditional and low-carbon energy businesses, and repurchase a meaningful amount of shares. Those increasing cash flows and cash returns could give Chevron the fuel to produce compelling total returns in the coming years.