How much money do you need if you want to become a millionaire? That number is probably lower than you think -- especially if you have time on your side. 

Investing in the stock market helps your money grow. And if you invested for 30 years, you could grow your account to $1 million dollars by doing this one simple thing. 

Dollar folded in the shape of an arrow pointing up.

Image source: Getty Images.

Between 1926 and 2020, a portfolio made up of 100% large-cap stocks earned an average rate of return of 10.2%. If you could've saved $6,000 a year for 30 years ($500 a month), and invested it at this rate, your account would've grown to $1.13 million. If these returns continue, you still have a chance of becoming a millionaire over the next 30 years by taking this action -- but there are some important things you should first consider. 

How you feel about volatility

If you made this investment, you would have all of your holdings in stocks. And while this rate of return could've gotten you to millionaire status, it wouldn't have been without highs and lows. Low years would've included ones like 1931 where you would've lost 43% of your wealth while high ones would've included years like 1933 when you would've gained 54% in a single year.

Volatility like this isn't for everyone, and it's possible that no matter your age, these types of ups and downs will make you nervous. If that's the case, you might consider trading a lower rate of return for a higher annual contribution. For example, over this same time period, a portfolio made up of 60% stocks and 40% bonds earned an average rate of 9.1%, and investing $7,000 annually for 30 years would've grown your accounts to $1,060,598.

It's also possible that you feel comfortable with these types of fluctuations now but won't when you're older. Review your risk tolerances annually, making sure they haven't changed. Adjusting accordingly is a good way to avoid being too aggressive when you plan on using your money soon. 

Time in the market

On Jan. 2001 the S&P 500 opened the year trading at 1,320. After suffering losses in 2001, 2002, and again in 2008, it closed out the decade lower than it started, at 1,258. But the following decade was one of extreme growth, and this index finished out 2020 at 3,756 -- almost three times higher than 20 years before.

Having too much exposure to some of the worst years while missing out on some of the best years could significantly pull down your average. And the best way of making sure this doesn't happen is with time in the market. This means that rather than guessing which years will experience positive growth and which will be negative, you invest every year, no matter what. 

Consistency matters

Making your annual contributions, investing the money, and staying invested the entire time are extremely important. There may be times when you can't meet your goal and invest less than what you planned. There may also be periods of volatility when your nerves get the best of you and you decrease your stock exposure, or money ends up sitting in cash longer than you planned.

If you use an investing strategy like this, consistency is key. The more contributions you skip, the further away it could put you from your projections. And making sure that you take any unplanned breaks in your investing into account can help you stay on target for meeting your goal. 

The stock market has experienced steady growth since its inception. And investing in it can help you become a millionaire with just $500 a month. The earlier you can start, the more time you have and the higher your chances could be of reaching $1 million.