If you want to get your portfolio to $1 million by the time you retire but you don't have a big lump sum of money to invest in today, you can start by investing every month. And if you can maintain that habit over the long term, your gains can be significant, potentially putting you on track to end up with a portfolio worth at least $1 million.

I'll show you how investing $340 per month could eventually result in a portfolio balance of $1 million, and that's even if you factor in a slowdown in the markets in the years ahead. If the market performs better, your balance may end up significantly higher.

An ideal fund to invest into on a regular basis

When you're investing for the long term, it's important to have a go-to investment to put money into on a regular basis. This way, you average out your cost; you aren't worried about timing the market and trying to find the precise and best time to buy shares of a business. By continually adding to your position, you'll spread your average cost over not only months, but years as well.

An exchange-traded fund (ETF) that can be suitable for this approach is the Invesco QQQ Trust (QQQ 2.42%). It tracks the Nasdaq-100 index, which includes the top nonfinancial stocks on the Nasdaq exchange. It's a great way to invest in top growth stocks without having to worry about how that list may change over time; the index does the rebalancing for you.

And the Invesco fund charges a fairly modest expense ratio of 0.2%. It's arguably a reasonable fee to pay, given the massive, market-beating returns it has generated for investors over the past decade.

^SPX Chart

^SPX data by YCharts

Here's a how a $340-per-month investment will grow over the years

The big question when trying to project a future portfolio balance is what the average, annual return will be. Historically, the S&P 500 (^GSPC 2.13%) has generated average returns of about 10%. And if the Invesco fund has soundly outperformed it, you might assume that it'll continue doing so and that you perhaps should expect a higher annual return of 11% or 12% -- maybe even higher than that.

The danger, however, is that with growth stocks performing so well over the past few years, a slowdown may be inevitable. If you use conservative estimates, you can ensure you aren't making projections based on an ideal scenario.

In the table, you'll see what your portfolio balance might look like after 30-plus years of making monthly investments of $340, assuming annual growth rates between 8% and 10%.

  Growth Rate
Year 8% 9% 10%
30 $510,100 $627,121 $774,971
31 $556,700 $690,234 $860,428
32 $607,167 $759,267 $954,834
33 $661,822 $834,776 $1,059,126
34 $721,014 $917,368 $1,174,338
35 $785,120 $1,007,708 $1,301,614

Calculations by author.

While it may take over 30 years for this size of an investment to grow your portfolio to $1 million, it may take less time if the markets perform better, or if you invest more money along the way.

Staying the course, and staying invested, can lead to great returns for investors

Billionaire investor Warren Buffett once said, "The most important quality for an investor is temperament, not intellect." If you can resist the temptation to make moves due to emotions, that can help you in achieving your goals for retirement. While it may be temping to invest in the latest hot trend, that can end up doing much more harm than good.

Investing is a long-term process, and while some investors may score big short-term profits, doing so often requires taking on considerable risk. With an ETF like the Invesco Trust, you're getting exposure to top stocks while also keeping your risk relatively low over the long haul.