My first real job gave me access to a 401(k), which I had no idea what to do with. I asked around the office for advice (maybe not the best strategy), and finally settled on a fund that charged too much in fees and in which I had no clue as to what it was invested in.

That scenario isn't unusual, and it's part of the reason why the majority of Americans don't feel like they're on track for retirement. Just 34% feel like they're on the right path, according to research from The Motley Fool, despite 67% of Americans having a retirement account.

What can you do if you feel like your retirement planning isn't what you want it to be? Evaluating your investments is a good first step. If you're unhappy with what you're currently invested in, these two stocks could be great places to put your money and let it grow over the decades.

A person looking at a computer.

Image source: Getty Images.

1. Costco

In the age of artificial intelligence stocks, it may seem strange to see Costco (COST 0.23%) on a list of stocks to hold for decades. There are, of course, great AI stocks that could be good investments to hold for years, but Costco offers a unique investment option because of its long-term staying power.

Consider that Costco has continued to expand its membership, adding about 7% in the third quarter (which ended May 11), reaching nearly 80 million paid households. Those members bring in a constant stream of revenue and earnings for the company because once someone becomes a member, they typically stay a member, with the company having a renewal rate of 93%.

Many members also have above-average household incomes. Recent data shows that more than one-third of Costco members have an annual household income of $125,000, which is significantly higher than $80,000 for an average household. That's good for Costco's sales and for the company's long-term stability, as higher-income members may not have to cut back on spending during times of economic uncertainty.

What's more, Costco has been a very financially stable company, with sales and earnings both rising over the past few years. Here's how the company's financial picture looks since 2022:

Fiscal Year

Revenue

Annual Revenue Growth

Net Income

Annual Net Income Growth

2022

$226.9 billion

16%

$5.8 billion

17%

2023

$242.2 billion

7%

$6.3 billion

8%

2024

$254.4 billion

5%

$7.4 billion

17%

Data source: Costco.

If you're looking for a great company that has the potential to be a good investment over the coming decades, Costco stock is a wise bet.

2. Amazon

While Amazon (AMZN -0.33%) has been a monster stock over the past two decades, there's likely still more room for this company to run. The first of many opportunities is the company's e-commerce business. Amazon commands 40% of the U.S. e-commerce market, a truly impressive feat when you consider that retail juggernaut Walmart has about 7%.

Amazon's rivals won't have an easy time overtaking the company anytime soon, especially with more than 180 million Amazon Prime subscribers enjoying free and fast shipping, as well as video streaming and other perks.

And there's a hidden advantage to the company's massive online marketplace: advertising. Amazon has become a powerhouse advertising company over the past several years as sellers place ads to boost their exposure. Amazon's ad sales rose 18% to $13.9 billion in the first quarter and advertising is now the company's fastest-growing business segment.

What's more, Amazon continues to lead the tech pack when it comes to cloud computing services. Amazon Web Services (AWS) has 30% of the public cloud market, with Microsoft trailing behind with 21%. With many companies and developers relying on AWS, Amazon is sure to benefit as artificial intelligence cloud services drive an estimated $2 trillion in global sales by 2030.

While Amazon reported a loss in 2022 due to its investment in electric vehicle company Rivian, the past two years have been exceptional for the company. Sales rose 12% in 2023 and another 11% in 2024, and the company finished out last year with net income of $59.2 billion, an increase of 95% from 2023.

While saving for retirement can be stressful, setting aside some money in these two stocks could be a smart long-term strategy. Just remember that there will be some share price swings along the way, as there are with any investment.