Starbucks Corporation (SBUX 0.18%) and PepsiCo, Inc. (PEP 0.89%) are two of the biggest beverage companies in the world. In fact, they're even teammates, as together they produce ready-to-drink Starbucks beverages including bottled Frappuccinos and canned Doubleshots in a partnership that is now a $2 billion retail business.

However, the two companies otherwise embody the opposite poles of the global beverage industry. Starbucks is a lifestyle brand. With more than 20,000 cafes around the world, the company sells pricey cups of coffee along with pastries and other foods, courting an upscale market with comfortable stores and friendly service.

The Starbucks Cups of Kindness drinks

Image source: Starbucks.

PepsiCo, on the other hand, has one of the biggest distribution networks in the world. Along with its namesake brand and sodas like Mt. Dew and 7Up, the company also owns Tropicana, Gatorade, Frito-Lay snacks, and Quaker Foods.

Both companies have long been regarded as top-notch investments, but as the chart below shows, Starbucks has clearly outperformed PepsiCo over the past five years.

SBUX Chart

SBUX data by YCharts.

PepsiCo has been the winner over the last two years, however, as Starbucks' growth has slowed. Let's take a look at what each stock has to offer today to see which is the better buy.

Caffeine-fueled expansion continues 

For much of the post-Great Recession years, Starbucks was unstoppable. It posted comparable-sales growth of 5% or better every quarter for more than five years in a row, a streak unmatched in an industry where restaurant chains have confronted a range of challenges.

That blistering organic growth has moderated as Starbucks' U.S. stores have been pressured by falling mall traffic and other forces said to be causing a "restaurant recession." Still, growth has been respectable, as comparable-store sales increased 3% in the U.S. and globally in its most recent quarter.

Despite its perceived saturation, Starbucks continues to open more than 2,000 new stores a year, and sees three significant growth channels in China, digital platforms like mobile ordering and Rewards, and the premiumization of the brand through its Reserve roasteries and stores, which are intended to compete with high-end, "third-wave" coffee shops. 

Starbucks will have to do all this without longtime CEO Howard Schultz, as he's now focusing on the Reserve brand, leaving former COO Kevin Johnson to be the new chief executive. Still, despite the stock's flat performance over the last two years, sales and profit growth remain solid.

Pepsi's 22 billion-dollar brands

Image source: PepsiCo.

More than soda

Like many other food brands, PepsiCo is negotiating consumers' preferences transitioning to healthier foods and beverages as soda sales decline. The company divides its portfolio into "fun" foods like Fritos and Pepsi, "better for you" foods like Stacey's pita chips, and "good for you" foods like Sabra hummus.

With its range of brands across food and beverages, PepsiCo has outperformed peers like Coca-Cola and legacy food companies like General Mills

In its most recent quarter, organic revenue growth increased just 2.1%, but core constant currency earnings per share was up 7% as the company slashed selling, general, and administrative costs.  

Pepsi's calls its current strategy "Performance with Purpose," which focuses on long-term sustainable growth. The company aims to reorient its brand portfolio to healthier products and improved distribution and productivity while controlling costs. 

As a result, PepsiCo has hiked spending on research and development, while keeping an eye out for acquisitions and partnerships like the one with Starbucks.

And the winner is...

Both companies are facing challenges in their respective sectors, but Starbucks is putting up significantly stronger growth numbers and expects earnings per share to grow 15%-20% over the next five years. PepsiCo, meanwhile, is calling for just 8% core constant currency EPS growth this year. While that may be better than many of its peers, it's still much lower than Starbucks' projections.

Shares of the coffee chain are priced higher, but only modestly. They carry a price-to-earnings ratio of 28.6 compared to 24.8 for Pepsi, and Pepsi has the better dividend yield of 2.8% versus Starbucks' 1.7%. Income-seeking and conservative investors may, therefore, choose Pepsi because of its cheaper valuation, better dividend, and defensive positioning, but Starbucks is the all-around better buy.

Starbucks still has a promising growth path ahead of it and is unrivaled as the dominant global coffee chain. I'd expect the stock to continue to outperform the market.