For the equivalent of a few hundred dollars each month, you could accumulate more than $1 million for your retirement. But achieving this amazing accomplishment will take more than saving.

Growing your nest egg considerably will take investing your money. Here's how much you should invest each year to become a millionaire by the time you retire.  

Bag full of $100 bills.

Image source: Getty Images.

How much do you need?

Over the last 94 years, investing in a portfolio of large-cap stocks would've earned you a 10.2% average rate of return. If you invested $1,200 a year for 30 years and earned this rate of return on average, your accounts would've grown to $226,000. Double your savings to $2,400 each year and earn the same rate of return, and your accounts would end up being worth $452,000 -- and if you can invest $6,000, they could grow to nearly $1.13 million. 

Risk versus reward

But investments in only equities are among the riskiest of asset allocation models. You are compensated for that extra risk with a higher rate of return, but it comes with more volatility. And from year to year, this type of investment will have higher highs and lower lows, like in 2008 when the S&P 500 was down 37%, or 2013 when this index was up 32%. 

If these fluctuations are too severe for you, staying invested may be hard and you may find yourself selling out of your holdings so that you can avoid losing money. And in this case, your risk tolerances may not match the way your accounts are invested, and adding some conservative investments could help you be more consistent.

But in exchange for lessened volatility, you'll get a lower rate of return. How much less would determine how much more you should contribute if you want the same results. For example, if you only had 50% stock and 50% bonds, your rate of return on average over the same period of time would've been 8.7%. But in 2008, this portfolio would've only lost 16%, and in 2013, it would've only gained 15%. And you would need $7,500 saved annually for 30 years if you wanted to grow your account to $1 million.

Boosting your savings

If you contribute to a 401(k) at work, you could be eligible for a company match. If your employer offers a match program, it will contribute a certain percentage of your income for every dollar that you do up to a max. So if you earn $75,000 and your company matches 100% of your contributions up to 4% of your salary, it will add $3,000 extra to your 401k every year. Because you will be doing the same, that will be a total of $6,000, and you could reach the million-dollar savings goal in 30 years.

If you don't have access to a program like this, one of your best courses of action may be cutting your expenses. Creating a budget where you detail your expenses and designating them as necessary or discretionary could help you determine which ones are the most dispensable. Getting rid of something like your heating bill may not be possible, but you could perhaps reduce it. And some of the things you use, like subscription services, could be eliminated completely or cut back on.

If you have spare time, working just a few more hours at the same job or a second one could significantly boost your savings. And asking for and receiving a raise with your current employer would be ideal -- and you could direct your extra earnings toward savings instead of upgrading your lifestyle. 

Having a million dollars saved when you retire could make your retirement very comfortable. Understanding how much you should invest and for how long are crucial pieces of information that will help you reach this monumental milestone. And the more time you have before you plan on reaching your goal, the more small tweaks may help get you there.