Having $5,000 to invest might not sound like much when you're bombarded with headlines that say you need seven figures to retire. Or perhaps even saving $5,000 to invest seems like an impossible goal.
Regardless of your perspective, investing $5,000 now and keeping it there for the long haul could make a huge difference down the road. If you had invested $5,000 in the S&P 500 index 35 years ago, your investment would be worth about $125,000 today.
When I started investing about six years ago, I had substantially less than $5,000, but if I had that much now and was starting from scratch, here's exactly what I'd do.

Image source: Getty Images.
Open a Roth IRA
With $5,000 in my bank account, I'd need to open an investment account first, and I'd choose a Roth IRA, hands down, over any other account.
Though your Roth IRA contributions won't get you a fatter refund at tax time, that money grows completely tax-free. If you wait until you're 59 1/2 and you've had the account for a least five years, all that money is completely tax-free as well.
I'd rather sacrifice a tax break today in exchange for unlimited tax-free growth. Plus, you can take out your contributions (but not the earnings) without penalties or taxes whenever you want, though you want to avoid doing so to let your investments grow over time.
My first investment: An S&P 500 fund
After opening my Roth IRA and transferring my $5,000, I can invest the money. Instead of trying to craft a diversified portfolio on my own (something that's really hard even for experts to do), I'd invest the entire $5,000 in an S&P 500 index fund, which takes care of the diversification for me. Such a fund automatically invests your money in 500 of the biggest, most profitable companies in the U.S.
Since the S&P 500 index represents about 80% of the U.S. stock market's value, I'd essentially be locking in the market's growth. Over long periods (think a decade or more), that's an investment that's nearly always been profitable. In time, I'd want to add individual stocks to my portfolio, but I'd be happy to start from scratch with the S&P 500's average annual return of about 10%.
Data by YCharts.
Ignore the stock market
Granted, it's impossible to completely ignore stock market news, especially if there's a crash like we experienced in March 2020. But corrections (a drop of 10% or more) and bear markets (a drop of at least 20%) are completely normal parts of investing. In fact, bear markets happen about once a decade, but the stock market has always recovered.
The worst thing you can do after a crash is to sell in a panic. So no matter how bad the news is, I'd keep my money invested, knowing that in the long term, I'd most likely come out ahead. Even a dramatic crash seems like a blip when you look at the astronomical growth the stock market delivers over many decades.
$5,000 would be just the start
I'd also invest the $5,000 all at once. A 2012 Vanguard study found that historically, when you have a lump sum of cash, you get better results 66% of the time by investing it all at once versus dollar-cost averaging. That's because having more time in the market is typically better.
But I wouldn't wait to accumulate another large pile of cash to continue investing. From there, I would start investing on a schedule regardless of the market's performance.
I'd figure out how much I could afford to invest and make getting my full 401(k) company match my top priority (after all, that's free money). Then, I'd focus on maxing out my Roth IRA. Since I'm under 50, I can invest $6,000 in 2022, though if you're over 50, you can kick in an extra $1,000. And if I still had extra savings, I'd split the difference between unmatched 401(k) contributions and investing in individual stocks in a taxable brokerage account.
But even if you don't have $5,000 to invest, you can follow the same strategies outlined above. Many brokerages allow you to open a Roth IRA with no minimum and start investing with only a few dollars. The sooner you start, the more time the market will have to work its magic.