Investing in Starbucks (SBUX -0.20%) stock has been a frustrating experience in recent times. Its shares have climbed by just 12% in the past five years -- seriously lagging the broader S&P 500's 77% gain in that time.

Don't be discouraged, though. It's always best to maintain a long-term mindset when looking at potential investments. With this framework in mind, it's actually very easy to be bullish about Starbucks.

Here are three reasons to buy this beaten-down restaurant stock right now.

1. Strong brand recognition

Starbucks has been around for over 50 years. That's an impressive accomplishment in the hyper-competitive restaurant sector, an industry that has an alarmingly high failure rate. The business has been successful for such a long time because it has a competitive moat -- characteristics that allow it to maintain its edge over its peers.

Starbucks' moat stems from its strong brand recognition. The company sells caffeinated beverages and various food items, which can be viewed as commoditized products that lack true differentiation. But it can charge premium prices because it has figured out a way to elevate the brand image in a way that resonates with consumers.

I think it would be a monumental challenge for a new entrant to the industry to get to Starbucks' standing. This is something that takes years and decades to develop, thanks to consistently delivering for customers.

The brand gets a boost from the company's intense focus on its digital investments. It has one of the most successful loyalty programs in corporate America, with 34 million active members in the U.S., who account for a sizable chunk of sales. This not only drives loyalty by encouraging repeat purchases, but it also creates a valuable engagement channel.

2. Its growth opportunities

Starbucks currently has 38,587 locations across the globe. And it registered $34 billion in revenue in its fiscal 2023 (ended Oct. 1). This is a sprawling, scaled-up entity. But don't be discouraged; there is still meaningful growth potential.

As part of its Triple Shot Reinvention plan, executives said that they think Starbucks can have 55,000 stores worldwide by the end of the decade. A lot of that growth will come from China. But even in the U.S., Starbucks' mature home market, the company wants to open more than 3,000 new stores over the long term.

A key part of the strategy is to open smaller, digital-focused retail outlets. Some consumers aren't as interested in hanging out at a Starbucks as they were a decade or more ago. The plan is to serve these customers in ways most convenient for them.

This outlook makes it easy to be optimistic that Starbucks can improve its financial metrics. The leadership team forecasts revenue and earnings per share will rise 10% and 15% annually, respectively, over the long term.

3. Its reasonable valuation

Besides a powerful brand and growth potential, another reason to consider buying the stock is its compelling valuation. Investors can scoop up shares at a forward price-to-earnings (P/E) ratio of 21. That's in line with the broader S&P 500.

A little over two years ago, at the start of 2022, the stock was trading at a forward P/E of more than 40. These days, that enthusiasm has weakened considerably.

However, Starbucks is still extremely profitable. It pays a dividend that yields 2.6% right now, and the payout has increased in 13 straight years. The company also makes sizable share repurchases -- $1.3 billion in its 2024 first quarter, ended Dec. 31.

These capital allocation decisions boost investor returns, and it's a smart idea to consider buying Starbucks today.