Warehouse retailer Costco Wholesale (COST 0.25%) may sell goods at affordable prices, but the stock is pretty expensive. Costco investors have pocketed a total return of 2,320% over the last 15 years, leaving the S&P 500 index far behind at a 663% gain. The stock traded at a luxurious 55.8 times trailing earnings on June 26, or 59.6 times free cash flow.

Person with grocery bag under arm, gasping at receipt in hands.

Image source: Getty Images.

So you wouldn't be the first investor to call Costco's stock "expensive." But you might change your mind when you look at the chart below.

Costco's rising profits and efficiency

I'm about to show you a rare combination. Costco has a long-standing habit of growing its cash profits, while also making better and better use of the new capital over time.

COST Free Cash Flow Chart

COST Free Cash Flow data by YCharts.

Costco's financial engine runs smoother than Kirkland butter

Free cash flow is the profit that's left over after paying off operating expenses and capital expenses. This capital can be used to finance dividend payouts, execute share buybacks, acquire smaller rivals, or boost the balance sheet's cash reserves. It's a measure of real cash profits, rather than the tax accounting construct you know as net profit or earnings. And Costco earns a lot of cash profits.

Return on invested capital (ROIC) measures how effectively a company puts its profits to work. Costco's ROIC is nearly double the figures you see for Walmart (WMT 1.45%) or Target (TGT 1.83%) nowadays, and even exceeds Amazon's (AMZN 2.66%) ROIC in the asset-light e-commerce industry. The company also delivers consistently wider ROIC margins over time, while most retailers struggle to keep ROIC stable.

As Costco pairs richer ROIC readings with growing cash flows, it keeps feeding a flywheel of constant business improvements. That's an incredibly shareholder-friendly combination.