Making money in stocks is not as difficult as it seems. Successful investing is about holding shares of a group of companies that grow their revenue and earnings over many years. As the companies grow, the stocks will follow.

Starbucks (SBUX 0.47%) and Mastercard (MA 0.07%) have strong brands and outstanding growth prospects. Both companies have delivered above-average growth for many years, and it's no surprise their stocks have also delivered market-beating returns to their shareholders.

With $1,000 to invest, you could buy one share of each stock at its current price. Here's why you can be confident these stocks will be worth more in 10 years than today.

Starbucks

Starbucks has outperformed the broader market over the last 10 years, rising 180%, but the stock still offers long-term upside. The company has been through major challenges in recent years, including store closures during the pandemic and rising supply chain costs from inflation. After the stock tumbled in 2020 and again in 2022, it quickly rebounded both times, which reflects the brand's resiliency.

Starbucks is experiencing strong traffic at its stores despite uncertainty in consumer spending this year. The fiscal third-quarter earnings report showed a 12% year-over-year increase in revenue, while earnings were up 19%. Those are impressive growth rates for a company of this size, with $35 billion in annual revenue.

A company that can still post double-digit rates of earnings growth after reaching global saturation with over 37,000 stores worldwide is worth holding for the long haul. It shows that management is still finding ways to improve the customer experience, such as improvements to digital ordering -- where Starbucks has been a leader for a long time -- as well as new menu items that drive more store traffic.

Despite a Starbucks on every corner, as they say, management is targeting 55,000 stores by 2030. That's annualized growth in the store base of roughly 7% per year. Of course, growth at existing stores would allow Starbucks to deliver double-digit growth in revenue. The company reported a 10% increase in comparable-store sales last quarter.

Moreover, investments in new espresso machines, warming ovens, and greater store efficiency overall have already been boosting margins and earnings per share. Management believes it can grow earnings between 15% and 20% annually through fiscal 2025.

Starbucks has strengthened the coffee culture in the U.S., and it's proving equally effective at growing its business in non-coffee cultures like China. These qualities make it a no-brainer investment for the long haul.

Mastercard

Mastercard stock returned 537% over the last 10 years, more than double the return of the broader market. There are powerful tailwinds that will continue to grow the business and push the stock higher over the long term.

The massive trend toward digital payments is the first reason to buy Mastercard stock. Over the last four years, the number of transactions over Mastercard's network has already increased from 19.4 billion to 35.5 billion. But cash still accounts for about half of in-store transactions in many countries around the world, leaving a lot of long-term upside.

MA Chart

MA data by YCharts.

Another reason to like Mastercard is that time is working in the company's favor. While the occasional economic recession causes people to spend less, the economy expands for longer stretches of time than when it contracts. All said, holding shares of one of the leading credit card brands, where Visa and Mastercard command the majority of the market, is like earning a tiny royalty on further economic growth.

What happened during the pandemic is a good example. As stores shuttered in the wake of the pandemic, Mastercard's revenue plunged 19% year over year in the second quarter of 2020. But the company quickly recovered when the economy reopened and hit record quarterly revenue the next year.

The growth of the economy and the shift away from cash are great reasons to own the stock for the long haul. These trends are why analysts on Wall Street expect Mastercard to grow earnings per share by 17% annually over the next five years. The stock could deliver a return more or less around that estimate.