Saving for retirement isn't easy. But to enjoy your senior years as comfortably as possible, you'll need a robust retirement fund.

Accumulating $1 million or more may seem like an insurmountable task, but it's easier than you may think to achieve. Even if you're not already wealthy, it's possible to retire a millionaire with the right strategy. Here's how to get started.

1. Stop saving and start investing

A savings account may seem like the safest place to keep your money, especially when the stock market is volatile. But even the best savings accounts only offer interest rates of around 1% to 2%, which isn't even enough to keep up with inflation. That means over time, your savings will actually lose value.

The S&P 500, on the other hand, has historically earned an average rate of return of around 10% per year. The stock market is also safer than it may seem, especially over the long term.

In the short term, it can be volatile. But over decades, the market has consistently seen positive average returns. In fact, despite several major stock market crashes and recessions, the S&P 500 has seen returns of more than 167% since 2000.

^SPX Chart.

^SPX data by YCharts.

While it can be intimidating, investing is one of the most effective ways to generate wealth over time. If you're aiming to accumulate at least $1 million by retirement age, it can make your goal far more attainable.

2. Invest consistently

Although the stock market has consistently performed well over the long term, it can still be intimidating to invest when stock prices are shaky. Sometimes, it may be tempting to stop investing until the market starts to recover.

However, if you don't invest during downturns, you're missing out on an easy way to make more money.

When the market is in a slump, stock prices are lower. Not only does that give you the opportunity to invest in high-quality stocks for bargain prices, but it also means you'll see more significant returns when the market inevitably recovers.

It's not always easy to invest when the market is volatile. But doing so could increase your long-term earnings and make it easier to retire a millionaire.

3. Give your money time to grow

Time is your most valuable asset when it comes to building wealth in the stock market, and the more time you give your money to grow, the more you can earn.

For example, say you already have $100,000 saved for retirement, and you're investing $200 per month. Assuming you're earning a modest 8% average annual return, here's approximately how much you can earn depending on how long you continue investing.

Number of Years Total Savings
20 $567,000
25 $860,000
30 $1,278,000
35 $1,892,000

Source: Author's calculations via Investor.gov

It's never too late to start investing. But the earlier you can begin, the easier it will be to make a lot of money.

Retiring a millionaire is a lofty goal, and it's not always easy. However, it's not as difficult as it may seem, either. With the right strategy and a long-term outlook, it's possible to accumulate $1 million or more in the stock market.