The S&P 500 (^GSPC 1.37%) is hovering near its all-time highs and looks historically expensive at 31 times earnings, so it might not seem like the best time to shop for cheap stocks. However, investors should remember the S&P 500 is a market-cap-weighted index driven by massive companies that can overshadow the smaller but cheaper stocks. Some of those bargains might not even be included in the S&P 500.

So today, let's ignore the broader market and review three undervalued stocks that might deserve a fresh $1,000 investment right now: Alibaba (BABA 5.19%), Altria (MO -1.67%), and Carnival (CCL 1.84%) (CUK 1.84%).

Question marks rise above an inquisitive person's head.

Image source: Getty Images.

1. Alibaba

Alibaba, the largest e-commerce and cloud company in China, still trades more than 40% below its all-time high from October 2020. It also trades at just 11 times next year's adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA).

The company's stock declined over the past five years as it faced intense regulatory, competitive, and macro headwinds. China's antitrust regulators slammed its e-commerce business with a record fine and tighter restrictions, and that pressure eroded its defenses against its smaller competitors. To make matters worse, China's economic slowdown made it harder for its e-commerce business to attract new shoppers and its cloud business to secure bigger contracts.

Yet Alibaba overcame those challenges by expanding its higher-growth overseas and cross-border e-commerce marketplaces, opening up its Cainiao logistics network to external customers, and rolling out more artificial intelligence (AI)-oriented services across its cloud platform. As it shifted its priorities, the regulatory headwinds dissipated, and the macro environment improved. From fiscal 2025 to fiscal 2028 (which will end in March 2028), analysts expect its revenue and adjusted EBITDA to grow at a CAGR of 8% and 10%, respectively.

The company isn't growing as rapidly as it did before, but its stock still looks undervalued relative to its growth potential. Its valuations are likely being compressed by the ongoing trade war between the U.S. and China, but it could attract more investors again if those tensions ease.

2. Altria

Altria, the largest tobacco company in America, might seem like a shaky investment as adult smoking rates in the U.S. drop to record lows. Its flagship Marlboro brand controls over 40% of the retail cigarette market, but its annual shipments are gradually declining.

But to offset that pressure, Altria consistently raises its prices, cuts costs, and buys back its shares to boost its earnings per share (EPS). It's also investing heavily in e-cigarettes, nicotine pouches, snus, and other smoke-free products to curb its long-term dependence on cigarettes.

Altria acquired e-cigarette leader NJOY to accelerate that forward-thinking transformation in 2023, but it doesn't expect that $2.75 billion acquisition to boost its EPS until 2026. Yet by 2028, it expects its smoke-free products to generate $5 billion in revenue -- which would be roughly a quarter of its projected revenue for the year. From 2024 to 2027, analysts expect Altria's adjusted EPS to grow at a CAGR of 4% as it ramps up its production of smoke-free products and buys back even more shares.

Altria pays a forward dividend yield of 6.5%. It's raised its payout annually ever since it spun off its overseas business as Philip Morris International in 2008, and its payout ratio of 79% gives it ample room for future dividend hikes. At 12 times forward earnings, its stock still looks like an undervalued income play for this frothy market.

3. Carnival

Carnival, the world's top cruise line operator, suffered an existential crisis in fiscal 2020 and fiscal 2021 (which ended in November 2021) as global tourism stalled out during the pandemic. To stay solvent, it idled many of its ships, slashed its spending, and nearly tripled its year-end debt from $11.5 billion in fiscal 2019 to $33.2 billion in fiscal 2021.

Yet, Carnival weathered that storm and quickly recovered in the post-pandemic market. It attracted more passengers, its occupancy percentages exceeded 100%, and it turned profitable again in fiscal 2024 as it benefited from higher fares, more onboard spending, and lower fuel costs. Its net debt also declined to $27.5 billion by the end of that year.

From fiscal 2024 to fiscal 2027, analysts expect Carnival's revenue and EPS to grow at a CAGR of 5% and 24%, respectively. That stable growth should be supported by its rollout of new destinations in the Bahamas, its expansion across more Asian ports, digitization of more onboard services to boost its onboard spending, and the addition of 10 more ships (to its fleet of 94 ships across over 800 ports) by fiscal 2028.

Those plans sound promising, but Carnival's stock still looks like a bargain at 12 times next year's earnings. It's also trading nearly 60% below its all-time high from January 2018 -- so the bulls are still overlooking its long-term growth potential.