Short of winning the lottery, investing is the fastest way for the average person to become a millionaire. It's not without risk, but for those who can stay focused on the long term, it's possible to earn substantial returns with minimal effort.

I'll show you how easy it can be by demonstrating how you can go from $0 to over $359,000 in just 20 years.

How investing can make you $359,000 in 20 years

Stock market returns average 10% annually, but a year's actual returns are often far from this average. Some years, returns are over 20%, and other years see losses just as large. This kind of volatility can make some people leery of investing, but there are risks to not investing as well.

Smiling seniors clinking champagne glasses.

Image source: Getty Images.

What if you spent $500 per month? If you simply spent $500 per month for 20 years, you might accumulate a few more personal possessions, but you wouldn't have any savings to speak of. That's a problem for those who plan to retire eventually.

What if you put $500 per month into a savings account? You might think a savings account is a good compromise if you don't feel comfortable risking your money in the stock market. But that's not a great idea.

If you put $500 per month in a savings account that earned the national average annual percentage yield (APY) of 0.06%, you'd only have about $120,720 at the end of 20 years -- about $720 more than you contributed yourself. 

A savings account may come out ahead in years when the stock market crashes, but in the long term, you need the stock market if you're going to build up the kind of wealth necessary to retire.

What if you invested $500 per month? If you put $500 every month in the stock market for 20 years and earned a 10% average annual rate of return, you'd have about $359,130 when it's all said and done, despite only contributing $120,000 of your own money.

The remaining $239,130 comes from investment earnings. Not to mention, your gains are over $238,000 more than what you would have had if you'd simply put your money in a savings account.  

The trick isn't to avoid investing, but to learn how to do it in a way that minimizes your risk while maximizing your profits.

Tips for balancing risk and reward while investing

Have a cash emergency fund: A savings account isn't a great place for long-term savings, but it is a good choice for money you'll need in the next few years. You should never invest your emergency fund or money you plan to spend within five to seven years because the stock market's short-term volatility could force you to take a loss if you need to withdraw your money at a specific time. By only investing money you don't need to use for the foreseeable future, you can avoid this issue.

Diversify your portfolio: You should also make sure to diversify your portfolio. That includes limiting your exposure to stocks by investing some of your money in bonds and other safer investments.

The percentage of your portfolio that's invested in stocks should decrease over time while the percentage invested in bonds should increase. A good rule of thumb for determining how much to invest in stocks is 110 minus your age. So a 50-year-old would have 60% of their portfolio invested in stocks and 40% in bonds.

You also have to make sure you have broad market exposure. This means you've invested in many different sectors, like tech, communication, healthcare, and industrial stocks. Sometimes, an event or industry shift will hit a particular sector hard, as the COVID-19 pandemic has done with many tourism-related businesses. By investing in multiple sectors, you ensure that the ups and downs of a single sector won't weigh too heavily on your portfolio.

One of the best ways for beginners to get broad market exposure is by investing in an index fund. These are collections of stocks and bonds you purchase as one package. If you invest in an S&P 500 index fund, you're instantly gaining ownership in the 500 U.S. companies that make up the index.

Index funds let you enjoy the gains of established companies without any one of them becoming overweighted in your portfolio. It's also an affordable way to invest in many companies compared to purchasing stock in each company individually.

$359,000 is just the beginning

The above example shows how investing can help you make $359,000 in 20 years, but there's no clear ceiling as to how much you can earn. It all comes down to how much you can afford to invest, what you invest in, and how long you can leave the money there before you need to take it out. Try the above tips to see what kind of a difference investing can make to your net worth.