Who says grocery stores can't make for exciting stock investments? Kroger (NYSE:KR), one of the market's best performers over the past five years, today posted second-quarter earnings results that soundly beat expectations. The retailer also raised its full-year sales growth outlook -- for the second time this year. After sinking by 10% the last few weeks, the stock was up 5% at 2:30 p.m. Friday.

Here's a big-picture look at Kroger's headline results:

MetricExpectedActual
Revenue $25.5 billion $25.5 billion
Profit  $0.39 per share $0.44 per share

Expected is the average forecast of the 20 analysts who cover the stock. Source Yahoo! Finance and Kroger financial filings.

Industry-thumping growth
The biggest surprise in this report was Kroger's hefty 5.3% comparable-store sales growth. 

Kr Comps

Comps growth. Source: Kroger financial filings.

While that figure represents the second straight quarter of decelerating growth, it was still well ahead of management's forecast delivered in late June. And it also trounced the gains that most rivals are booking these days. Kroger is consistently putting up growth numbers that are closer to retailing king Costco's 6% than to companies like Whole Foods' and Wal-Mart's 1%. These struggling food giants, as well as many smaller grocery chains, are clearly losing market share to Kroger right now.

And the grocer didn't have to sacrifice profits to attract all of the extra shoppers into its aisles. In fact, profit grew at a faster pace than earnings this quarter, leading to a big improvement in operating margin: Profitability rose to 3% of sales from 2.5% a year ago.

Financial progress
Meanwhile, the company made a few key strides on the financial side of the business. Its debt-to-earnings ratio fell to 2 from 2.3 last year, which means that management returned to their debt leverage goal ahead of schedule, having fully absorbed the recent major acquisitions of Harris Teeter and Vitacost. Now executives are free to consider other splashy grocery chain purchases, if the right assets come along for the right price.

Operating cash flow rose to $2.8 billion from $2.6 billion in the prior-year period. That growth is important because it allows for increasing cash returns to shareholders even after massive investments in Kroger's operations. The grocer spent $800 million on capital investments this quarter and still generated enough cash to fund dividend payments and significant share buybacks.

KR Cash from Operations (TTM) Chart

KR Cash from Operations (TTM) data by YCharts.

Over the past year, cash returns have totaled $1 billion, compared to cash flow of roughly $4 billion.

Improving outlook
Management's outlook for the year continues to brighten. They raised their sales growth forecast for the second straight quarter and now expect comps to be 4.5% for the full year. That compares to the 4% they were targeting three months ago and the 3.5% goal they issued at the start of 2015. "Our confidence in Kroger has never been stronger," CEO Rodney McMullen said in a press release. 

Executives also boosted their profit guidance to as much as $1.98 per share this year. At 13% above 2014's profit, that would put Kroger solidly ahead of its long-term goal of between 8% and 11% per share earnings growth. It also leaves the stock valued at 18 times this year's expected profit. While that might seem like a lot to pay for a retailer operating in a low-margin business, Kroger's long-running market share sweep and stellar finances make it an unusually attractive investment candidate.

John Mackey, co-CEO of Whole Foods Market, is a member of The Motley Fool's board of directors. Demitrios Kalogeropoulos owns shares of COST and WFM. The Motley Fool owns and recommends COST and WFM. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.