All three major indexes started off this year with a bang. After a difficult 2022 and even a trip into bear territory, the indexes rose in January. And while that means many top stocks advanced also, it doesn't mean stocks have become expensive. Plenty of bargains are still out there -- even among stocks on the rise.

So it's not too late for you to go bargain shopping. High-growth stocks and slower but steady players both make great additions to your list. I've found five wildly undervalued stocks with fantastic long-term prospects that are cheap now -- and may have what it takes to deliver eye-popping gains over time.

1. Amazon

Amazon (AMZN 1.49%) offered investors hope last month when it soared more than 20%. But its earnings report this week revealed that its troubles aren't over. Amazon reported its first annual loss in almost a decade. This isn't a big surprise, though.

Higher inflation has been weighing on Amazon every quarter over the past year. Amazon also has faced woes linked to the economy, such as supply chain issues. And the company's investment in the embattled electric vehicle (EV) company Rivian has hurt earnings, too.

All this is difficult today, but these problems don't change Amazon's long-term picture. The company leads in two high-growth businesses: e-commerce and cloud computing. This position is helping Amazon continue to grow revenue through today's difficult times. And easing economic pressures should truly spur growth.

Amazon's efforts now to cut costs and improve its overall cost structure should also help lift earnings over time.

Today, the shares trade at around their lowest since 2016 in relation to sales. This is a great entry point for an investor who aims to buy and hold long term.

2. Tesla

Tesla (TSLA -3.40%) shares took off in January, climbing more than 50%. But over time, more gains should be on the way for this EV giant.

Tesla recently reported its highest-ever quarterly revenue, operating income, and net income. And for the full year, net income on a generally accepted accounting principles (GAAP) basis more than doubled to $12.6 billion. That's despite headwinds like higher raw materials costs and a negative impact from currency exchanges.

And Tesla is just getting started. It opened two enormous factories last year -- one in Austin, Texas, and another in Berlin, Germany. The goal is to reach an average of 50% growth in annual vehicle deliveries. In 2022, Tesla increased its deliveries by 40% to more than 1.3 million, so it's getting close to its goal.

Investors avoided Tesla last year as they sought safety over growth. They also worried about Tesla's market share. Tesla could potentially lose a bit of share as others build up their EV offerings, but it has the brand strength to keep it in the lead over the long haul.

The price for all this growth is very reasonable right now. Tesla trades for 47 times forward earnings estimates, down from more than 80 a year ago.

3. Starbucks

Starbucks (SBUX 0.65%) disappointed investors when it missed earnings expectations recently. But it's important to examine why this happened: A surge in coronavirus cases in China -- Starbucks' second-biggest market -- weighed on sales.

It's difficult right now, but it's a temporary problem. And Starbucks has the strength to weather the storm. The rest of the report was encouraging and reinforced the idea that Starbucks is a great long-term stock to own.

Despite headwinds in China, the coffee chain giant still reported record revenue in the fiscal first quarter. Total revenue climbed 8% to $8.7 billion. And Starbucks loyalty program members, known for driving sales, continue to increase. In fact, Active Rewards members reached 30.4 million for a 15% gain year over year. And holiday gift card data reinforces Starbucks' brand strength. Fans loaded and gifted a record $3.3 billion on cards this season in the United States.

Starbucks reiterated its guidance for the full year. And it's important to remember that the company is moving forward with its three-year reinvention plan -- aiming for double-digit revenue and non-GAAP earnings-per-share growth.

Right now, Starbucks is trading for 30 times forward earnings estimates, down from about 40 a year ago. The stock could easily head back to those levels as Starbucks progresses toward its growth goals.

4. Home Depot

Home Depot (HD 0.22%) shares have started rebounding after a lackluster 2022. But when I say lackluster, I refer to stock performance only. Earnings have remained bright -- even amid general economic woes.

The world's biggest home improvement retailer continued to attract its biggest clients: the do-it-yourself crowd and professionals. In the most recent quarter, Home Depot saw increases in sales to both of these customers. Importantly, the pro customers are saying project backlogs are healthy, meaning they're likely to keep buying materials at Home Depot to complete these projects in the coming quarters.

Home Depot also said all 19 of its U.S. regions and stores in Mexico and Canada posted same-store sales increases in their local currencies.

So, it's clear that the demand for home improvement projects hasn't subsided, even through difficult times. Still, investors shied away from many stocks linked to discretionary spending last year. And that's why Home Depot lost more than 20%.

The good news is that this leaves the super stock trading at a dirt-cheap level -- and gives us the opportunity to get it on sale. Today, Home Depot shares trade for just under 20 times forward earnings estimates -- a very reasonable price for a business steadily growing during good times and bad.

5. Costco

Costco (COST 0.84%) is another retailer that's continued growing despite a slowing economy. The warehouse giant has reported month after month of net sales gains. In January, sales climbed nearly 7% to more than $16 billion.

What's the secret of Costco's success? First, the company's business model allows it to bring in revenue before you even enter the store, as you have to pay a membership fee to shop there. And this is high-margin revenue for Costco. In fact, it allows Costco to sell the products in its warehouses for bargain basement prices.

And that's the second secret to the company's success. These low prices keep customers coming back -- and the prices are so good that shoppers don't even mind paying the membership fee. Costco's membership renewal rates top 90% worldwide, so the company truly can count on these customers for revenue year after year.

All this means Costco is the sort of business with the ability to report earnings growth regardless of the economy. Some say Costco, at 36 times forward earnings estimates, trades at a premium. But considering its business model, growth this far, and loyal customers, its valuation actually looks reasonable today -- and could climb over time.