After spending two years trying to find its way, Starbucks has righted its ship in the ever competitive coffee wars.

During the course of the recession, the Seattle-based chain was forced to close hundreds of stores and re-evaluate its sales and growth strategies as it struggled to keep customers away from lower-priced competitors Dunkin’ Donuts and McDonald’s Café. The multi-layered overhaul paid off—while Dunkin’ Donuts and McDonald’s continue to do well, Starbucks has reclaimed its dominant position in the U.S. market and even plans to open more domestic stores in the near future.

In 2008, Starbucks became the poster child for the perils of over-expansion. Faced with skyrocketing unemployment and a crippled economy, many of its customers could no longer justify paying $3 or $4 for a cup of coffee several times a day. Meanwhile, Starbucks coffee shops littered the urban landscape, with some locations being just across the street from each other. In fiscal 2008, same-store sales in the U.S. declined 5 percent on a year-over-year basis. In fiscal 2009, same-store sales dropped 6 percent. Revenue declined 5.9 percent, to approximately $9.7 billion.

The company attributed the declines to lower customer traffic—the lifeline of its business—and came up with a turnaround plan. The plan included the closing of 600 underperforming stores, the elimination of 1,000 positions within its corporate structure and an expanded selection of both beverages and food items on its menu.

The strategy worked. By the time Starbucks issued its annual results for fiscal 2010, in November, its same-store sales in the U.S. were up 7 percent. Total net revenue rose 9.5 percent, to $10.7 billion. Operating margins were at their highest point in the chain’s history, according to Morningstar, a Chicago-based research firm.

“What they’ve done to turn the company around has been nothing short of remarkable,” says R.J. Hottovy, an analyst with Morningstar. “They are very well positioned and I think there are still some growth opportunities for them out there.”

As of October, the company operated a total of 11,131 stores in the U.S., including 6,707 corporate stores and 4,424 licensed stores. In fiscal 2010, it closed net 57 stores. In fiscal 2011, Starbucks plans to open 100 new stores stateside, in addition to 400 new stores internationally. Going forward, some of the licensed stores will likely become corporate units, according to Marc Frankel, senior managing director of the restaurant services group with Newmark Knight Frank, a real estate services firm. Expansion opportunities also remain in secondary and tertiary markets and in suburban locations.

Points of differentiation

Part of what has allowed Starbucks to fend off competition from Dunkin’ Donuts and McDonald’s has been the stabilizing economy, according to George Whalin, co-founder of Retail Management Consultants, a Carlsbad, Calif.-based firm. Normally, there isn’t a lot of overlap between the three chain’s customers. Starbucks’ clientele looks for premium coffee and great customer service, he notes, while Dunkin’ Donuts customers want value for their money and a broad selection of food items.

Meanwhile, McDonald’s main strength is convenience—its stores are everywhere, Whalin notes. As of year-end 2010, McDonald’s Corp. operated 32,737 restaurants worldwide, including 14,027 units in the United States.

During the recession, the lines of differentiation between the three players blurred because economic hardship affected virtually every class of American consumer. Lately, however, people have been returning to their routines, notes Frankel, and for many loyal Starbucks customers, that means about 40 visits to the chain in the space of a month.

“There are very few restaurant brands that have customers come to them every day, and maybe more than once a day,” Frankel says. “It’s a tough habit to break, as long as they continue to be conveniently located.”

McDonald’s Cafes may be able to steal a small fraction of Starbucks’ business, but McDonald’s core product isn’t coffee—it’s hamburgers, he points out. Meanwhile, Whalin brings up the fact that Canton, Mass.-based Dunkin’ Donuts remains largely an East Coast chain. In recent years, it has been trying to break into Western states, but its penetration there is still negligible.

Dunkin’ currently operates approximately 6,772 stores in the United States. At year-end 2010, it still had no locations in Washington or California. Last year, the company opened net 206 new restaurants in the U.S., including its first units in Missouri. In 2011, Dunkin’ Donuts has already signed agreements for 226 additional stores.

But the company might be somewhat handicapped by its operations model, which is largely based on franchising, according to Frankel. Any new strategy, including expansion, takes much longer to implement when it has to be carried out by independent franchisees scattered across the country.

“With Starbucks, if they decide to implement a decision tomorrow, they can do that,” he says. “Dunkin’ Donuts is making big strides, but it takes a while when you are a franchise-operated company. They were always a strong player in the East. I think they need patience in the West and hopefully the company has the staying power to wait it out.”

In fiscal 2010, same-store sales for Dunkin’ Donuts’ U.S. division rose 2.3 percent. Revenue for Dunkin’ Donuts in the U.S. totaled $402.4 million, a 3.8 percent increase over 2009, but still a fraction of Starbuck’s multi-billion dollar figure.

Adapt and conquer

Playing into Starbucks’ favor over the coming years will be the fact that it’s flexible when it comes to its store size and layout. The chain’s expansion model has always been to pick the right sites in terms of demographics and then work around the location, tweaking its prototype to fit available real estate, Frankel notes. As long as Starbucks does it due diligence and sticks with this strategy, it should be able to find more opportunities in the domestic market.

While the chain is at or near the point of saturation in big cities, it has room to grow in secondary and tertiary markets. In New York City, for example, brokers Retail Traffic spoke with say Starbucks is looking into opening a greater number of stores in the outer boroughs, where it hasn’t build up as much of a presence as it has in Manhattan. In suburbia, Starbucks has also been putting more of a focus on finding drive-through locations, where customers can grab cup of coffee to go on their way to work.

At this point, the chain has become enough of a mainstay in the consumer’s mind that it doesn’t necessarily need to be in markets with high household incomes, Frankel offers. All it needs is population density.

“People of all different socio-economic groups are getting their coffee at Starbucks,” he says. “It has very creatively gotten Americans to believe that they need to spend more money on their coffee. They just need a lot people, whether it’s at the mall, at an airport or inside a hotel.”

Starbucks leases all of its stores.