The Nasdaq Composite has increased by 97% in the last five years and 286% in the past decade, proving the value of holding stocks over the long term. Stocks in this index have made many millionaires over the years and will likely continue to make more as industries such as tech and retail develop.

AAPL Chart

Data by YCharts

Costco (COST 1.08%) and Apple (AAPL 6.81%) are attractive investment options. The preceding table shows that they have significantly outperformed the Nasdaq Composite since 2019.

These companies dominate their respective industries and have built immense consumer loyalty over the years. Costco has massive growth potential as it continues to expand abroad. Meanwhile, Apple is pivoting to digital services and artificial intelligence (AI), which could pay off significantly in the coming years.

So here are two magnificent stocks that have created millionaires and will continue to make more.

1. Costco

Costco is a retail stock but has behaved like a tech stock in recent years with its impressive growth.

The following chart shows that Costco's shares have delivered significantly more gains than some of its biggest retail competitors, including Amazon, Walmart, and Target, over the past five years.

COST Chart

Data by YCharts

Consumers worldwide have embraced Costco's wholesale business model, which involves an annual membership for access to market-low prices. In fact, the company boasts a membership renewal rate of 93% in the U.S. and Canada and 91% globally.

Meanwhile, Costco has barely scratched the surface of its international expansion. The company currently operates 876 stores across 14 countries. Yet six of those countries have six or fewer locations, illustrating its growth potential. And that's before considering the many countries Costco has yet to enter.

Since 2019, Costco's annual revenue has risen 71%, with operating income up 59%. The company is on a promising path, with seemingly endless opportunities for growth in the coming years.

Moreover, Costco's price-to-sales ratio (P/S) of just over 1 could make now an excellent time to invest. P/S is calculated by dividing a company's market cap by its trailing-12-month revenue. A good P/S usually hovers around 1 to 2, indicating that its stock is trading at an attractive value.

Alongside a quickly expanding retail business, Costco is a magnificent stock worth considering right now.

2. Apple

Like Costco, Apple is well acquainted with consumer loyalty. The company dominates consumer tech, with leading market shares in categories such as smartphones, headphones, smartwatches, and more.

Investing mogul Warren Buffett aptly conveyed the potency of Apple's brand in 2023, saying, "If someone offered you $10,000 to never buy an iPhone again, you wouldn't take it." It's a bold statement that rings true for millions of consumers who have stuck with the company through multiple generations of iPhones and have branched out to its many other products and services.

Apple has strategically created an interconnected product ecosystem that keeps consumers returning. Exclusive apps such as Messages and FaceTime make it difficult for shoppers to consider competing brands. Meanwhile, the connectivity between devices including its iPhones, computers, tablets, and more promotes ease of use, which is too good of an argument to stray from Apple.

Apple's success has seen annual revenue rise 47% over the past five years, while operating income increased by 79%. Meanwhile, free cash flow hit $107 billion last year, outperforming competitors Microsoft, Alphabet, and Amazon.

If you've followed Apple at all recently, you probably know the company has hit a few roadblocks over the past year. Macroeconomic headwinds saw it post four consecutive quarters of revenue declines in 2023, a trend finally broken in Q1 2024, when the company posted revenue growth of 2% year over year as it beat analyst expectations by more than $1 billion. As a result, the company appears to be on a promising growth trajectory that could make its stock a good long-term option.

Despite recent challenges, Apple's services business has remained a bright spot, with revenue in the segment rising 11% in Q1 2024. Apple is also expanding its focus on the budding AI market. The company's stock jumped 4% on April 11, when Bloomberg reported that Apple would overhaul its Mac lineup to better enable AI capabilities.

The company's vast cash resources and potent brand are likely to propel it far in AI over the next decade as it leverages its massive user base to expand in the market.

AMZN Price to Free Cash Flow Chart

Data by YCharts

Apple's significant free cash flow has potentially made its shares a bargain next to its rivals. This chart indicates that it has the lowest price-to-free cash among some of its biggest rivals, making Apple one of the best-valued stocks in the arena.

Apple company has made a lot of millionaires over the years, but I wouldn't bet against seeing it make more.