You may have heard that timing the market is a losing game and that most investors can't successfully do it. Knowing this is one thing, but it might not stop you from attempting it.

Before you try to time the market, you should understand that there's more at stake than just missing the bottom of a crash or the top of a bull run. And over the years, trying to time the market can cost you a lot of money. Here's how much.

Bronze bear and bull figures staring at each other.

Image source: Getty Images.

Investing can be emotional 

When you invest, you're usually doing it with an end goal in mind. Maybe that goal is retirement, or perhaps you're saving so that you can buy a new home. Investing during bull markets when prices are increasing can make you feel successful, as you see the value of your investments grow -- and your financial security isn't in danger. The better the stock market does, the more fun you have participating in it so you buy new investments, even as they become more expensive.

Investing during a bear market may give you different emotions like anxiety or fear. Because you plan on eventually using your money, watching it decline in value during a down market cycle can be very difficult. It may even set off some panic alarms. If they ring loud enough and the threat to your livelihood seems imminent, it may make you react emotionally and sell out of your investments. 

This method of investing may feel good, but is the exact opposite of what you should do. Instead of buying when investments are trading at low prices and selling them when they're trading at high prices, you're buying in at high prices and selling them when they've tanked. Additionally, you may think that selling out of your investments will prevent you from losing money. But the time you spend out of the market may make you miss out on some very important trading days, which can cost you a lot.

How much exactly? 

JPMorgan's asset management arm has put an exact price to these missed days in its Guide to Retirement report. If you invested $10,000 into the S&P 500 on Jan. 3, 2000 and left it completely invested until Dec. 31, 2019, you would've received an average annual return of just over 6%. Your $10,000 would've grown to $32,421.

This 20-year period of time includes roughly 5,000 days during which the stock market was open. But as the table below shows, if you missed just the 10 best days out of those 5,000, you'd have less than half as much money. Miss the best 20 days, and you'd barely have made any money at all over 20 years, and you'd have lost money if you missed more winning days.

Time Invested Since Jan. 3, 2000 Dollar Value  Annualized Performance
Fully invested into S&P 500 $32,421 6.06%

Missed 10 best days 

$16,180 2.44%

Missed 20 best days

$10,176 0.08%

Missed 30 best days 

$6,749 (1.95%)

Missed 40 best days 

$4,607 (3.8%)

Missed 50 best days

$3,246

(5.47%)

Missed 60 best days

$2,331 (7.02%)

Data source: JPMorgan.

What's the cause?

Beating the stock market is hard. When you're out of the market, you might feel safer, but you risk missing out on huge gains.

For example, the stock market bottomed out on March 23, 2020. If you'd been waiting for the perfect investment opportunity and delayed putting money in because you believed that the stock market would further decline, you would've missed out on about 67% worth of market returns from the bottom.

If and when you time the market correctly, it can be exciting. But the risk of getting it wrong is much greater. No one can be 100% certain of what the stock market is going to do. Because of this, time in the market is more important than timing the market. Instead of playing this guessing game, focus on using strategies like asset allocation and diversification. They will help reduce your portfolio risk, potentially enhance your returns, and help you stay invested for the long term.