Tax season can be a stressful time of year, but it also means your refund is on the way.

For many people, tax refunds are best put toward essential expenses, like paying off everyday bills, reducing debt, or building an emergency fund. However, if you're in good shape financially and can afford to spend your refund elsewhere, investing it could be a smart move.

The average tax refund in 2021 came out to $2,827, according to the IRS. If you were to invest that money, it's possible to grow that refund to roughly $50,000 or more over time. Here's how.

Person using a phone and calculator and smiling.

Image source: Getty Images.

Choosing the right investments

The key to achieving long-term growth in the stock market is to choose the right investments. While there are countless options to choose from, there's one, in particular, that could be a great fit for many investors: an S&P 500 ETF.

This type of investment tracks the S&P 500 index itself. It includes the same stocks as the index (roughly 500 stocks from the largest U.S.-based companies) and aims to mirror its performance.

An S&P 500 ETF is one of the safer types of investments because it has a long track record of growth over time. The index itself has experienced dozens of downturns over the years, yet it's managed to recover from all of them. If the market takes a turn for the worse, there's a very good chance an S&P 500 ETF will bounce back eventually.

Despite its relative safety, the S&P 500 ETF also packs a punch when it comes to returns. Historically, the index has earned an average rate of return of around 10% per year. While your portfolio will experience ups and downs in the short term, those annual returns should average out to around 10% over time.

Maximizing your money

If you were to invest your tax refund in an S&P 500 ETF and then leave your money alone, you could earn a substantial amount over time. Say, for example, you received the average refund of $2,827. If you invest that now and are earning a 10% average annual return, that money would grow into around $50,000 within 30 years.

Keep in mind that these calculations assume you're not making any additional contributions. If you were to continue investing even a little each month, you could earn significantly more.

For instance, say that in addition to investing $2,827 right now, you also contribute $100 per month. All other factors remaining the same, you'd have around $247,000 after 30 years. If you were to invest $200 per month, you'd have roughly $444,000 in that same time period.

Investing in the stock market is a fantastic way to build wealth, and you don't need a lot of money to get started. By investing as much as you can afford and then giving your investments time to grow, you can earn more than you might think.