Aiming for $1 million by retirement can be a great goal for investors. If you get your portfolio to that level, you'll have plenty of options as to how you want to enjoy your retirement.

You can invest in dividend stocks, which can help provide you with a recurring source of income during retirement. Or you could take a portion of the money out each year. Either way, accumulating that much will give you plenty of flexibility in how you want to live your life at that stage.

But how much do you need to invest today if you want to get to $1 million without having to take on too much risk?  I'll show you how much you would need to invest today based on your age and years until retirement remaining, and the expected annual growth rate of your portfolio.

Additional savings can make up for investing later on in life

Ideally everyone would invest a few thousand dollars in their teens into the next Amazon and be set for life. Unfortunately, that's not a realistic scenario for most people. Finding the next big growth stock can be extremely difficult, and setting aside that much money at a young age isn't a possibility for everyone.

But the good news is that even if you don't invest in your teens, or even your 20s or 30s, you can make up for investing later on in life by putting more money into stocks. If you put money into a growth-oriented exchange-traded fund (ETF), you could invest less than $100,000 even in your 40s and potentially still be on track to have $1 million by the time you retire.

How much should you aim to have in your portfolio right now?

If you want to grow your portfolio to $1 million, here's how much you'll want to target having today, assuming you retire at the age of 65.

Age Years to Retirement 5% Growth 10% Growth 15% Growth
30 35 $181,290 $35,584 $7,509
35 30 $231,377 $57,309 $15,103
40 25 $295,303 $92,296 $30,378
45 20 $376,889 $148,644 $61,100
50 15 $481,017 $239,392 $122,894

Calculations by author.

There are multiple possible scenarios here. If you're an ultra-risk-averse investor who wants to keep risk as low as possible and invest only in the safest of stocks, you might want to look at the 5% growth column, where returns may be very modest over the long haul. The downside of this is that by sacrificing returns in exchange for safety, you'll need to have a lot more money invested today.

If you're just aiming to generate average market returns of around 10%, which is the S&P 500's long-run average, then the 10% growth column is where you'll want to focus on.

Lastly, if you're a growth-oriented investor looking to take on some risk in exchange for potentially market-beating returns of 15% in the long run, then the last column is where your focus should be. Keep in mind that you don't have to take on significant risk with this type of approach.

Investing in an ETF such as the Invesco QQQ Trust (QQQ 0.08%) can potentially help you here. The fund invests in the top 100 nonfinancial stocks on the Nasdaq. And over the past 10 years, it has generated returns of around 390%. That averages out to a compounded annual growth rate of 17.3%.

By investing in the top growth stocks on the Nasdaq, the fund can potentially deliver market-beating returns. While there may be some off years when it underperforms the market due to the volatility that comes with investing in growth-oriented stocks, this can be a suitable investment if you have a lot of investing years left, have time for stocks to recover from any downturns along the way, and don't think you'll need the money in the near future.

Don't have nearly enough today? Invest along the way

The table shows you how much you would need to invest today, assuming you put in a lump sum and do nothing else. But if you don't have enough money to invest that much right now, you can still add to your portfolio over the years.

Although inflation is making it more difficult than ever to save money, if you can put aside $50 per week, that could be $2,600 per year that you can add to your portfolio every year. The more you add to your portfolio, the greater your gains will be in the end.

Although it may seem discouraging if you aren't investing at an early age, you can still add funds along the way, and hopefully as your earnings grow. An ETF like the Invesco QQQ Trust can make it easy; rather than worrying about picking individual stocks, you can just aim to put money into that fund every month, every quarter, or every year. By doing that, you can set yourself up for a better future and more financially secure retirement.