For many people, investing in the stock market is a path toward a stress-free retirement. The earlier you start, the more money you'll have later. If you start early enough, turning $100,000 into $1 million is highly achievable.

And there are several ways to do it. Here are just four.

1. Save money monthly

When you think about the daunting task of saving $100,000, it helps to remember that you don't have to save it all at once. Most people don't have $100,000 sitting around waiting to be invested, but if you take a percentage out of your paycheck monthly and pay yourself first, it can add up quickly and significantly.

Grown-up stacking coins on a coffee table with a child.

Image source: Getty Images.

As a rough example, if you save $1,000 every month and invest it in the stock market, that will amount to $100,000 in about eight years, and that's without compounding. If you start when you're young, then at the end of eight years, when you have already put away more than $100,000, you'll still have many, many years ahead to make that money grow.

2. Invest in dividend stocks

There are many reasons dividend stocks are attractive, especially for retirees looking for passive income. But they're also an excellent way to make sure your money is working for you as you save for retirement.

Companies that pay dividends are usually committed to providing shareholder value, and that permeates throughout how they do business, leading to results that are focused on profitability and cash generation. That helps them thrive when there's economic volatility and still provide value when investors are more interested in growth investing.

Dividend stocks provide returns no matter how the stock itself or the stock market in general is doing, providing more security for investors. Last year, when the S&P 500 lost nearly 20% of its value, dividend investors still got their payouts. Under severe circumstances -- such as the early phase of the pandemic -- some companies might suspend their dividends. But most didn't, and certainly the safest ones didn't, and they raised their dividends as usual.

3. Diversify

It only takes one fantastic investment to supercharge your money. Even if you make a few wrong picks, just one that skyrockets can make up for many losses and can certainly outweigh some so-so results.

Let's use Amazon as an example. If you had invested $100,000 in Amazon 11 years ago, you would have $1 million today.

AMZN Total Return Level Chart

AMZN total return level data by YCharts.

But if you had invested less money in several stocks that looked like they had promise many more years ago instead, there's a possibility you could still have turned $100,000 in $1 million. After all, $10,000 invested in Amazon 25 years ago would be worth $2 million today, and if you had spread around the other $90,000, you'd still be a millionaire even if you lost that $90,000 in its entirety.

Since you don't know what stock is going to be the next Amazon, investing some of your funds in many different stocks gives you the best chance to find at least one multibagger.

4. Don't try to beat the market

Along with efforts to diversify, it's a good idea to put a chunk of your money into an index fund or exchange-traded fund (ETF) that mirrors the market, such as an S&P 500 ETF. If you believe that the market overall offers the best chance of wealth creation, let it work for you. 

If you had previously put $100,000 into the S&P 500, it would have taken around 27 years to become $1 million today.

^SPX Chart

^SPX data by YCharts.

That's a broad example to illustrate how this principle works, and for most people, it won't be as simple as plunking down that kind of sum in one shot. But if you put some of your money into the S&P 500 and add to it over many years, within less than three decades, it could turn into something truly spectacular.

The key to all these methods is starting young, adding money regularly, and sticking with it for the long term. That gives you the best chance of retiring as a millionaire.