Retail is one of the best markets for long-term investment, known for its consistent growth. The industry ranges from grocery to e-commerce, consumer tech, and much more, allowing stockholders to benefit from the tailwinds of dozens of segments. In fact, the global retail market hit a valuation of $27 trillion in 2022 and is projected to rise to $30 trillion this year.

Costco (COST 1.01%) has enjoyed immense success, with its shares up 213% since 2019. The company's wholesale business model has won over consumers in more than a dozen countries and has an exciting outlook as it continues to expand.

However, it's hard to consider Costco's stock when Amazon (AMZN 3.43%) and Apple (AAPL -0.35%) also exist. These companies lead their respective areas of retail and hold the first and third biggest market shares in e-commerce.

AAPL Chart

Data by YCharts

This chart shows that Amazon and Apple have significantly outperformed Costco's stock over the last decade, suggesting they could be better long-term buys. Meanwhile, Amazon and Apple are investing heavily in high-growth industries like artificial intelligence (AI), which could keep them on their current growth trajectories.

So, forget Costco and buy these unstoppable stocks instead.

1. Amazon

One of the best reasons to invest in Amazon is its proven reliability under strain.

An economic downturn in 2022 caused a marketwide sell-off that saw the Nasdaq Composite plunge 33% during the year. Retail companies were hit particularly hard as inflation spikes forced consumers to cut discretionary spending. As a result, shares in Amazon fell 50% in 2022 alongside steep profit declines in its e-commerce segments.

However, the company has made an impressive recovery, proving its reliability and resilience. In fiscal 2023, Amazon's revenue rose 12% year over year to $575 billion, while operating income tripled to $37 billion.

A range of cost-cutting measures and easing inflation bolstered the company's e-commerce business and has seen its free cash flow skyrocket 904% to $32 billion in the last 12 months.

Amazon's performance over the last year highlights the importance of investing with a long-term mindset. Investors who sold the company's stock in 2022 will not have benefited from its significant growth since then.

AMZN EPS Estimates for 2 Fiscal Years Ahead Chart

Data by YCharts

Moreover, this chart shows that Amazon's earnings could hit about $7 per share over the next two fiscal years, while Costco's may achieve $19 per share. On the surface, it looks like Costco is the clear winner. However, multiplying these figures by the companies' forward price-to-earnings ratios (Amazon's 43 and Costco's 47) yields stock prices of $296 for Amazon and $902 for Costco.

Considering their current positions, these projections will see Amazon's stock rise 66% and Costco's 21% by fiscal 2026. Alongside a lucrative e-commerce business and growing prospects in AI, Amazon's stock is a no-brainer right now.

2. Apple

Apple is a behemoth in consumer tech, with leading market shares in most of its product categories, from smartphones to tablets, smartwatches, and headphones. In fact, the company holds the third-largest market share in e-commerce in the U.S., only after Amazon and Walmart, despite having a significantly smaller range of products.

The popularity of Apple's offerings has instilled reliability in its business and given it the funds to overcome unexpected headwinds. Apple's free cash flow hit $107 billion last year, significantly higher than Costco's $6 billion. Apple's free cash flow actually increased 10% in 2023 despite hits to its revenue, allowing the company to continue investing in its business.

Apple has hit some roadblocks over the last year as it had to contend with reductions in consumer spending, restrictions on its products in China, and issues with Apple Watch patents. However, the company's outlook remains strong, with considerable cash reserves and expansions into lucrative sectors like AI and virtual reality.

COST PE Ratio (Forward) Chart

Data by YCharts

The table above shows that Apple's stock is a bargain compared to Costco's shares. Apple's forward price-to-earnings ratio and price-to-free cash flow are considerably less than Costco's, indicating Apple is trading at a far better value.

These are two helpful valuation metrics. For both, the lower the figure, the better the value.

As a result, Apple's stock is worth considering right now, especially over Costco.