Image: Espresso machine with mug, close-up © nd61,  SuperStock

In the back of every investor's mind is the stock that got away and became an ungodly success.

Consider Starbucks (SBUX), which grew from a small Seattle coffeehouse chain into a global powerhouse. If you'd invested $1,000 in Starbucks' initial public offering in June 1992, your stake would be worth $6.4 million today -- and that doesn't include dividends.

To make a bundle, though, you didn't have to predict 20 years ago that Starbucks would succeed in turning premium coffee into a daily habit for untold millions. Starbucks saw its stock decline 79.6% from November 2006 to November 2008. A savvy investor might have noticed that its coffee shops were still full of squatting students and online entrepreneurs, and bought at the 2008 bottom. The gain since then? 500%.

These days, of course, Starbucks is all grown up. So for the big gains that come with rapid growth, you might want to look for the next Starbucks among smaller companies with similar business traits, attractive stock prices and a lot more room to grow. I have three possibilities for you: Panera Bread (PNRA), Caribou Coffee (CBOU) and Dunkin' Brands (DNKN).

Building another Starbucks

Few companies, of course, grow into the sort of giant Howard Schultz built. It's the world's largest coffeehouse chain and the second-largest restaurant chain, after McDonald's (MCD).

Schultz joined Starbucks in 1981, left to start his own coffee-shop chain, then returned to buy Starbucks in 1987. He built an empire based on the Italian coffee bar model, featuring espressos, cappuccinos and edible treats, and a relaxed, relatively cozy environment where customers could schmooze with friends, talk business, read or do schoolwork. For its customers, Starbucks wasn't a workplace, and it wasn't home. It was, as Starbucks says, a third place. Yes, the coffee commanded a premium price, but the idea was that it could be a small luxury that wouldn't break the budget.

Starbucks required locations near where people lived or worked because, as Stephens Inc. analyst Will Slabaugh notes, a coffee shop needs lots of volume, which means lots of people. The idea worked in Seattle, then Vancouver and Chicago. By the time the company went public in September 1992, it had 165 outlets.

The rest is history.

Starbucks shops began appearing not just in the usual places, but also in airports, train stations and malls. It started selling coffee in grocery stores and roasted beans for Costco Wholesale (COST). It developed an instant coffee, Via, and started packaging K-cups for Green Mountain Coffee Roasters' (GMCR) Keurig coffee maker. Starbucks also recently launched its own one-cup machine, the Verismo.

This summer, the company paid $100 million for Bay Bread, a San Francisco operator of 19 La Boulange bakeries. Starbucks is expected to build that into a nationwide business that supplies all of its U.S. stores and offers products to companies like Whole Foods Market (WFM) and Trader Joe's.

Starbucks now employs 149,000 people and operates in 61 countries.

Why it works

For Starbucks, the challenge has been maintaining the company's core ideas: a true love for coffee and the communal feel of its stores.

That's not always easy. In the early 2000s, Starbucks grew too quickly. With stores seemingly on every corner in some cities, Starbucks was no longer "your neighborhood coffee shop." Trendy buyers sought out alternatives. Then the recession hit, and consumers found they could live without their $4 daily lattes. Same-store sales, a key metric, fell 10%; there were worries the decline might reach 20%, according to The New York Times.

Schultz, who had stepped aside as CEO in 2000, returned in January 2008. Investors continued to panic, though, driving the stock down to an intraday low of $7.06 in November 2008. The company halted all new store openings, closed 977 stores and laid off 18,400 workers.

The situation stabilized in early 2009, and the company began expanding again. It plans to have 1,500 outlets in China by 2015. It expects to add a net of about 1,200 new stores globally in 2013 alone. At the end of June, it had nearly 18,000 outlets around the world, 55% of which are company-owned. In the Americas, Starbucks owns 61% of its 13,000 or so units.

The stock rebounded from its 2008 lows, helped, obviously, by the big stock market rally since 2009. Shares peaked in April at a record $62 before the latest global slowdown hit. The stock has since fallen around 25%.

Still, if you'd been smart enough to buy the shares at $7.06 in November 2008, you'd be up more than 530%.

This week, Starbucks should report more than $13 billion in revenue for fiscal 2012 and $1.3 billion in net income. Earnings for the year should hit $5.85 a share before one-time charges, and $6.98 in fiscal 2013.

With the stock priced in the $40s now, those numbers might make Starbucks a buy. If it's a brand name you've wanted to own, go for it. But remember that finding enough growth to move the needle is hard for a company this size. Stock gains of 500%, or even 100%, appear unlikely in the near term.

For outsize gains, you'll need to look elsewhere.

To find the next Starbucks, remember these keys: Trendy beverages, food that is often better than a fast-food restaurant's typical fare, and a welcoming, communal atmosphere. Which brings us to Panera Bread, Caribou Coffee and Dunkin' Brands.

Click here to become a fan of MSN Money on Facebook