Energy company NextEra Energy (NEE -3.95%) has been a stellar investment over the years, handily outperforming the S&P 500. A $10,000 investment at the company's IPO would be worth over $700,000 today.

Understandably, squeezing out life-changing investment returns gets harder as companies grow larger, and NextEra Energy carries a hefty $150 billion market cap today. Still, investors shouldn't discount NextEra Energy's wealth-building prowess. The company is still growing, and artificial intelligence (AI) has become a wild card that could benefit business.

Here's a look at whether investors can still make a fortune in the stock, and why NextEra Energy is an intelligent buy regardless.

Riding the green energy wave

The formula for long-term investment success is simple: Grow revenue and earnings, and the share price will follow.

The proof is in the pudding:

NEE Revenue (TTM) Chart

NEE Revenue (TTM) data by YCharts

Understanding the why is the secret. NextEra Energy is a unique company that wears multiple hats.

Its subsidiary, Florida Power & Light, is the largest electric utility in the country. Additionally, NextEra Energy Resources is the world's largest clean energy producer. It generates power from wind and solar energy, stores energy in batteries, and operates seven nuclear power plants. The utility and energy generation segments require considerable investments to build and maintain them, which is a competitive advantage when you're the industry's most significant player.

Demand for clean energy has steadily risen over the past several decades, so NextEra Energy has continually invested to grow its capacity and business. As you can see, that multi-decade trend has carved the path to growth and investment returns.

Artificial intelligence is a sneaky catalyst for NextEra's business

Fortunately for long-term investors, demand for renewable energy will only grow. According to estimates by Morningstar, renewable energy demand in the U.S. will increase by 12% annually for the next decade. Assuming this is accurate, renewables would still contribute less than half of America's power generation by 2032. The energy grid is enormous, and this multi-decade transition to renewables looks to have decades left.

That's great for NextEra Energy and its shareholders.

Additionally, AI could further boost demand for renewable energy. Corporations are pumping billions of dollars into building data centers to support AI's computing power needs. Experts believe data centers could increase their electricity consumption from 3% of total power to 8% by 2030.

Remember that many big data center spenders, like Microsoft, Meta Platforms, and Amazon, commit to a carbon-neutral footprint. That could push them toward renewable energy to power these data centers, potentially trickling down to NextEra Energy as the most prominent player.

It's not something investors can quantify, but it's hard to deny that NextEra Energy sits at the intersection between tomorrow's power grid demands (AI, electric vehicles) and how society will power these technologies.

Can NextEra make you a millionaire?

In short, yes. Well, sort of.

There is some nuance to that: Analysts believe NextEra Energy will grow earnings by an average of 8.5% annually for the next three to five years. Add a dividend that yields 2.8% today, and investors could see long-term total returns averaging 10% to 11% annually. That will double your investment every seven years or so.

Using that math, a $10,000 investment will take roughly 50 years to grow to $1 million. Since you shouldn't put all your money in one stock, only really young people with lots of money can realistically play this out. It also assumes that NextEra can generate double-digit returns for the next five decades, which is a tall task.

The reality is that NextEra can thrive as a part of a diversified portfolio that can collectively make you a millionaire over time. That's not a knock on NextEra Energy. Decades of rising demand for renewable energy have created a giant blue chip stock, and investors shouldn't avoid it simply because it probably won't multiply their money quite like it once could.

Instead, look at the stock as a steady compounder you can buy, hold, and then sleep well at night. That can still make a positive impact on any long-term portfolio.