Becoming a stock market millionaire isn't easy, but it is possible -- with the right investments.

Exchange-traded funds (ETFs) can be a fantastic option for many investors, especially those looking for a low-maintenance investment that requires less research and upkeep than individual stocks.

While there are countless ETFs to choose from, there's one fund with legendary investor Warren Buffett's seal of approval. And with the right strategy, it could put you on the path to becoming a millionaire.

Warren Buffett's top recommendation

For the most part, Buffett's investment portfolio is comprised of individual stocks. However, there is one ETF he owns and often recommends to other investors: the S&P 500 ETF.

Through his holding company Berkshire Hathaway, Buffett owns both the Vanguard S&P 500 ETF (VOO -0.41%) and SPDR S&P 500 ETF Trust (SPY -0.38%). A decade ago, he also famously bet that this type of investment could outperform a group of hedge funds.

He not only won that bet, but trounced the competition: His S&P 500 investment earned returns of around 126% over 10 years, while the five hedge funds averaged returns of just 36% in that time frame.

There's a good reason why Buffett has long recommended the S&P 500 ETF: Not only can it see significant earnings over time (sometimes more than actively managed funds), but it's also one of the safest investments out there.

The S&P 500 ETF tracks the index itself, so each fund includes stocks from 500 of the largest and strongest companies in the U.S. This provides instant diversification, and it can help protect your savings against downturns. While no investment is immune to volatility, if there are any companies that will survive a slump, it will be those in the S&P 500.

Perhaps one of the biggest advantages of this investment, though, is that it requires next to no effort on your part. All the stocks in the fund are chosen for you, and because it's a long-term investment, you don't need to worry about when to buy or sell. Simply invest whatever you can afford and then let the ETF do the rest of the work for you.

Reaching millionaire status

There are never any guarantees when it comes to the stock market, but the S&P 500 itself has a long track record of earning positive returns over time -- despite experiencing substantial short-term volatility.

Historically, the index itself has earned an average rate of return of around 10% per year. While it's unlikely you'll see 10% returns every single year, the annual ups and downs have averaged out to around 10% per year over many decades.

To reach $1 million or more, you'll need to invest consistently for as many years as possible. How much you'll need to invest each month, though, will depend on how much time you have. If we assume you're earning a 10% average annual return, here's what it would take to reach $1 million in total savings:

Number of Years Amount Invested per Month Total Savings
40 $200 $1.062 million
35 $325 $1.057 million
30 $525 $1.036 million
25 $850 $1.003 million
20 $1,500 $1.031 million

Data source: Author's calculations via Investor.gov.

The more time you have to save, the less you'll need to invest per month. Even if you can't afford to invest much right now, getting started sooner rather than later will make it easier to build a million-dollar portfolio.

Is it safe to invest right now?

It can be a daunting time to invest, especially as experts continue to ring recession alarm bells. If you're concerned that the market may take another dip, it can be tempting to hold off for a while.

However, it's still wise to keep investing -- even if a recession is looming. In fact, continuing to invest throughout the market's low points is one of Buffett's best pieces of advice.

Back in 2008, at the height of the Great Recession, Buffett wrote a piece for The New York Times. Though each recession is different and nobody knows for certain what this one may look like, his advice still rings true:

Let me be clear on one point: I can't predict the short-term movements of the stock market. What is likely, however, is that the market will move higher, perhaps substantially so, well before either sentiment or the economy turns up. So if you wait for the robins, spring will be over.

The stock market may be intimidating at the moment, but the right investments can help keep your money safer. For many investors, the S&P 500 ETF can be a fantastic option to protect your portfolio while maximizing your long-term earnings.