Investing in the stock market is a proven method of building lasting wealth, especially for those who hold onto their investments over long periods of time. And these days, amateurs have all the tools necessary to be successful at it.

Like many individual investors out there, you're probably wondering what it would take to retire with a million dollars. This seems to be a psychologically important level that people aspire to. And it's certainly achievable.

To get yourself on a better path to reach that goal, consider investing in these two popular Vanguard exchange-traded funds (ETFs).

Compelling options

One option I urge investors to look at is the Vanguard S&P 500 ETF (VOO 1.00%). It holds shares of all the companies in that benchmark index -- 500 of the largest and most profitable companies in the U.S. -- giving investors exposure to every sector of the economy. And its expense ratio of 0.03% is extremely low.

In the past 10 years, the Vanguard S&P 500 ETF has returned 234%, including dividends. Assuming that it continues to deliver that same annualized return of 12.8%, a $100,000 initial investment would grow into a position worth over $1 million in 20 years (if you reinvest your dividends). Of course, should the ETF produce lower average returns, it would take longer to get to a seven-figure sum.

Another option to consider is the Vanguard Growth ETF (VUG 1.82%), which provides investors exposure to 200 or so of the largest growth businesses in the U.S. Its fees are also very low, as its expense ratio of 0.04%. indicates.

The Vanguard Growth ETF has returned 305% over the past decade, including dividends. That translates to a stellar compound annual growth rate of 15%, meaning it would take about 17 years for a $100,000 initial investment to turn into $1 million.

Investors could put money into both of these ETFs or choose just one based on their preferences and exposure needs. The good news is that Vanguard is a reputable firm with a history that spans nearly 50 years. And these two ETFs have a combined $1 trillion-plus in assets under management, so you can rest assured knowing that your money is invested alongside that of many others.

Keep this in mind

Investors who want to retire as millionaires need to maintain the right mindset. Perhaps the most important aspect of this is to always keep a long-term approach. The stock market inevitably will experience bouts of excitement and periods of pessimism. It's a volatile arena in the short term. But when measured over the longer term, the U.S. market has always trended upward.

Consequently, patience must be the name of the game. The earlier you begin to invest, and the longer you keep your money invested, the better your chances of becoming a millionaire. The numbers back this up.

It's also paramount that you learn to ignore the noise. There is no shortage of commentary and analysis about the state of the markets and the economy. Pundits constantly hold forth on their views about what's coming next.

All that chatter can easily prompt people to deviate from their long-term strategies, and instead try to trade in and out of stocks to benefit from a rising stock market or avoid a bearish period. But studies show that attempting to "time the market" is a losing proposition.

Investors who apply these guidelines while investing in either or both of the Vanguard ETFs discussed here for the long term can put themselves on track to retire with million-dollar nest eggs.