Krispy Kreme Doughnuts (NYSE:KKD), the franchise donut restaurant that has struggled for profitability over the last few years, had a promising second quarter as it continues the mild earnings momentum it picked up during this recession. If you step back and view Krispy Kreme, its earnings had gotten colder than its Kool Kreme soft serve since the hot days of its IPO. A look at the last few years finds negative earnings, without a profitable full year since 2004, as the company struggled to turn its premium donuts into more cash.

In the first quarter this year, the company posted $1.9 million in net profit, while the second quarter earnings, which were announced September 3, showed a small loss of $157,000, which translates into breaking even for earnings per share. Investors who are interested in this stock will need to gauge whether Krispy Kreme has straightened out its earnings direction for the foreseeable future. Let's take a look at the numbers.

IN PICTURES: 20 Tools For Building Up Your Portfolio

Filling in the Holes
Although revenue was down 12% in the traditionally slow summer season for donuts, from $94.2 million to $82.7 million, same store sales rose 5.9%. Last year's same quarter produced a net loss of $1.9 million, or 3 cents per share.

It's important to note that impairment and lease charges erased much of the operating income, as operating income was a much more robust $2.9 million. The key to all these numbers is that Krispy Kreme is showing signs of clear improvement.

Donut Battles
For the specialty restaurants such as Krispy Kreme, competition is fierce. Privately held Dunkin' Donuts and Dairy Queen, which is owned by Berkshire Hathaway (NYSE:BRK.A), are formidable opponents for the mostly donut-with -some-coffee and ice cream Krispy Kreme. Added to this are regional donut chains such as LaMar's in the midwest, along with numerous small local outlets. Overall, it's a crowded field.

The Canadian Donut King
Canadian-based powerhouse Tim Hortons (NYSE:THI) is probably the best-known and most potent competitor. It's a chain that continues to grow revenue and profits, and continues to expand, as its latest earnings news again reinforced. Tim Hortons has earned a certain customer loyalty with its neighborhood "donut pub" atmosphere, and also serves a wide range of food compared to most donut places. It is now implementing its unique co-branding with Coldstone Creamery.

Starbucks (Nasdaq:SBUX), the cover-the-earth coffee shop that competes with the coffee portion of the coffee-and-donuts shops, has not been the same strong player since having to deal with store closings, a high P/E and the ongoing bumps it has hit in its business recently. Additionally, on the coffee side of things, Krispy Kreme, Starbucks and everybody else has to now contend with the colossus, McDonald's (NYSE:MCD), and its "McCafe" additions.

Is Krispy Kreme Special?
Narrowly focused specialty restaurants such as Krispy Kreme have less margin for error than McDonald's or some of the other big chains, including the relatively more diversified Tim Hortons. The key is making the narrow niche work mightily as, for example, Nathan's Famous (Nasdaq:NATH), the historic Coney Island-based hot dog chain does. While Nathan's had an unusual assist from the renaissance of the hot dog as a "value food" during this recession, it shows that a single-item specialty restaurant can succeed on an ongoing basis.

What Krispy Kreme Needs to Do
To keep its earnings momentum when the economy hits better times, Krispy Kreme should not just rely on customers returning to its donuts as an extravagant item, for example, but should continue to build its brand and compete more strongly with its rivals. Operationally, the company needs to keep tightening its belt and give customers repeated reasons to come back to Krispy Kreme outlets. The company should also modify its approach with small-store concepts as well as gradually broadening its product line, which it's already doing with the new soft-serve ice cream.

Krispy Kreme is generating strong cash flow from operations, which it has used to pay down debt, and it's right on track for long-term success. People aren't going to stop eating donuts, Krispy Kreme just has to keep making sure enough people are hooked on Krispy Kremes to ensure profits. For investors, this is an intriguing company that looks to be on the road to delivering stable earnings with meaningful growth, so keep watching. (For more, see Sinking Your Teeth Into Restaurant Stocks.)

Use the Investopedia Stock Simulator to trade the stocks mentioned in this stock analysis, risk free!