While it may feel counterintuitive to buy a stock at an all-time high, companies that are charting a path toward higher earnings can often justify a record market cap. This principle is why the largest U.S.-based companies by market cap -- like Microsoft (MSFT -1.73%) -- have enjoyed multi-decade expansion periods where all-time highs are seemingly shattered every few years.

Megacap growth stocks are undoubtedly responsible for leading the broader indexes to new heights, but there are plenty of pockets of the market that are enjoying their own rallies.

Oil and gas integrated giant ExxonMobil (XOM -0.01%), utility Vistra (VST -3.07%), and home improvement giant Home Depot (HD -0.58%) are three dividend stocks that just hit all-time highs. Here's why three Fool.com contributors picked these stocks as candidates for moving even higher.

Two people discussing a purchase while standing next to a shopping cart with a wooden board on it.

Image source: Getty Images.

Bulls have been energized about buying ExxonMobil stock, but there's no reason to think the enthusiasm will soon wane

Scott Levine (ExxonMobil): ExxonMobil is the only supermajor stock that has outperformed the S&P 500 (^GSPC -1.11%)so far in 2024. In fact, ExxonMobil has remained so alluring among investors this year that they've recently driven the stock to its all-time high. And still, shares of ExxonMobil remain a worthwhile consideration -- especially with its dividend, which currently offers a forward yield of 3.1%.

Although the year-to-date 8% rise in the price of U.S. benchmark West Texas Intermediate crude oil surely played some part in the market's appetite for ExxonMobil stock, the company reported strong second-quarter 2024 financial results that also motivated energy investors to buy. For its recently completed quarter, the company reported that the Pioneer merger is already proving fruitful, contributing $500 million in earnings for the quarter. Additionally, the company reported free cash flow of $4.9 billion in Q2 2024, contributing to a total $15 billion in free cash flow for the first half of 2024.

While ExxonMobil stock has performed well so far this year, there's no reason to suspect it can't continue climbing. Should the company continue to achieve strong results from its Permian assets (both those gained through the Pioneer merger and others) investors may choose to continue powering their portfolios with ExxonMobil stock -- especially since the company will be well positioned to sustain the dividend, which it has raised for 41 consecutive years.

Investors will likely maintain their interest in buying ExxonMobil stock if the company succeeds in developing growth projects related to alternative energy, helping to diversify its business and mitigate the risk of a downturn in oil and gas prices. For one, ExxonMobil is working with Air Liquide to develop a hydrogen production facility. In addition, the company is working with SQ On to develop a lithium production facility located in Arkansas.

AI investment is fueling demand for nuclear energy

Lee Samaha (Vistra): Microsoft's recent 20-year power purchasing agreement with Constellation Energy signals a growing recognition that nuclear power has a big future. The technology company needs to secure a long-term, secure source of power for its cloud services' data centers as demand grows for AI-powered applications.

The deal will result in restarting the Three Mile Island nuclear power plant and help Microsoft ensure it meets its emissions aims, as nuclear reactors don't produce carbon emissions. In addition, they provide a regular and predictable power source without the intermittency of renewable energy.

The Constellation deal reads well for Vistra because the latter has expanded its nuclear capability this year via its acquisition of Energy Harbor in March. The deal added 4,000 megawatts (MW) of nuclear capacity to the 2,400 MW of nuclear capacity Vistra ended 2023 with. As such, 6,400 MW of Vistra's total 40,700 MW capacity will be in nuclear.

Optimism over Vistra signing potential deals with cloud services providers has led the market to turn Vistra into the best-performing stock on the S&P 500 this year. Moreover, if the optimism proves to be well founded, Vistra's long-term earnings and cash-flow prospects could have significant upside potential. That would also likely result in a dividend hike (recall that Vistra started the year yielding 2.3%), alongside excellent capital returns for investors.

Home Depot is packed with potential

Daniel Foelber (Home Depot): 2024 has been a wild ride for Home Depot investors. In March, the stock was up nicely on the year and was on its way to surpassing its all-time high from December 2021. But then, Home Depot suffered a brutal sell-off as investors feared weak consumer spending would impact discretionary purchases like home improvement. Those fears proved correct, as Home Depot slashed its full-year guidance when it reported second-quarter results in August.

In the earnings release, Home Depot said the cut was because the company now sees the second-half consumer demand environment consistent with the first half. In other words, the macroeconomic situation shows no signs of turning the corner.

So why, investors might wonder, has Home Depot stock rocketed 19% higher in the last three months? Given the fundamentals haven't changed, the simplest reason is that investor sentiment has improved, and lower interest rates could help consumers, the housing market, and in turn, Home Depot.

Home Depot is the kind of cyclical company that can thrive during a consumer-led economic boom -- which we haven't really seen since 2020 and 2021. In fact, Home Depot's results over the last few years have been fairly poor -- with flatlining or slightly declining sales and net income.

HD Revenue (TTM) Chart

HD Revenue (TTM) data by YCharts

Glass half-full investors may consider Home Depot a long-overdue coiled spring for outsized growth. Even though Home Depot isn't showing signs of improvement yet, patient investors may be ok with simply holding the stock and letting it grow into its valuation. Home Depot has a price-to-earnings ratio of 27.6 -- which is above its historical average. But keep in mind that valuation is based on trailing earnings. If Home Depot can kick into a new growth gear and sustain double-digit earnings growth, it could make today's somewhat pricey valuation reasonable in hindsight.

What's more, Home Depot has an excellent dividend. The stock yields 2.2% and Home Depot's payout ratio is only 58.4% -- which is healthy for a reliable blue-chip dividend stock.

With Home Depot's best days likely ahead, it wouldn't be surprising if the stock has plenty of room to run from here.