You may think you have a lot of reasons to stay out of the stock market. Maybe you’re wary of Wall Street. Maybe you’ve seen stock prices jump around and decided you’d rather not go on that ride. Maybe you’re scared of putting your hard-earned money into something you don’t really understand. Or maybe you think you don’t have enough money to invest.

Whatever concerns you might have about the market, you have one big reason to stick with stocks: inflation.

What’s inflation again?

You know when an older person says something along the lines of, “Back in my day, a movie ticket only cost a nickel!”? That’s because of inflation. It’s the unfortunate but common phenomenon of prices going up over time, which in turn causes the value of the money in your wallet to go down.

In recent years, inflation’s been pretty low—most recently at 1.6 percent, as of the end of June 2019, based on the year-over-year change in the Consumer Price Index. That means that, overall, the average prices of common items tracked for the index (from coffee to clothes, gas and glasses) went up by 1.6 percent over the past year. By comparison, inflation averaged 2.4 percent last year and has gone as high as nearly 14 percent in 1980 and 17 percent way back in 1917, according to InflationData.com. (Far less frequently, it can also go negative—which is called deflation and comes with its own set of issues—like in 2009 when the average rate went down 0.3 percent.)

How does that translate into dollars and cents? Well, a gallon of fresh whole milk that cost $2.88 in June 2018, for example, cost $3.05 in June of this year. And electricity went from an average of $68.32 to $69.62 per 500 kilowatt hours in the same period.

Why do prices go up?

It’s mostly about supply and demand. A high demand for products and services, as well as a low supply of them, should push prices higher, according to basic economic principles. And that applies to more than just the final products. If the cost of what’s needed to make something goes up, companies will likely raise prices to compensate. For example, when the Trump administration enacted tariffs to raise prices on aluminum, that drove up costs for companies that use the material to make soda and beer cans, and they passed that extra cost to their beverage consumers.

Another reason: If our country’s money supply was to go up—either via our central bank, the Federal Reserve, or due to rising wages—it could also boost inflation. That’s because more money in circulation means more money to spend means more demand for products.

Companies can raise prices arbitrarily, too, but the competition inherent in our capitalistic system theoretically limits that from happening too much.

What does all this have to do with investing?

Inflation’s effects on your spending are probably clear: Higher inflation means higher prices, which means that $1 earned yesterday won’t stretch as far tomorrow as it does today. You might not notice slight changes in your day-to-day spending, but over the long-term, they can add up to quite a strain on your budget.

For example, let’s say you plan to retire in 30 years and estimate you’ll need to save $1 million in order to cover all your costs in retirement. But when you’re finally ready to retire, a million won’t be worth as much as you think. At the current inflation rate of 1.6 percent, you’d actually need about $1,609,946 in 30 years to retain the same purchasing power that $1 million holds today. That’s a sizable difference—and remember that inflation rate is considered low. (The Federal Reserve uses a 2-percent inflation target to inform its policies.)

To cover that spread, you could save more, either by boosting your savings rate or working longer. Or you could put your money to work instead. Unfortunately, the average interest rate you’ll earn from a savings account is currently just about 1.3 percent, according to Bankrate, i.e. not enough to keep up with inflation. And while you can find banks offering better deals, with rates reaching nearly 2.5 percent, investing in a well-diversified portfolio that includes stocks may help improve your chances of higher returns. Even a conservative portfolio of 20-percent stocks and 80-percent bonds has gained 6.7 percent, over the long term, according to data from Vanguard, handily beating inflation.

But isn’t investing risky?

Yes, while investing will help you overcome inflation risk, you still will have other risks to worry about. That’s why it’s important to build a well-diversified portfolio with a mix of stocks, bonds and cash—and, drilling down further, with a variety of small-, mid- and large-cap company stocks across all different sectors and geographic regions. Spreading your portfolio across such a wide range of investments helps boost the odds that some will rise even as others fall. And don’t worry. We’re not suggesting you hand pick every one of those different assets yourself. Investing in mutual funds and exchange-traded funds (ETFs) is a relatively low cost way to gain exposure to hundreds of different stocks at once and reduce risk in your portfolio.

Anything else I should know about inflation?

Remember that inflation varies for different types of expenses, so how inflation affects you personally will be as unique as your budget.

Plus, when it comes to retirement planning, you have to take into account that your spending habits are likely to change, too. For example, you may not have commuting costs anymore, but you might hope to have more leisure travel expenses to cover. And those things that retirees often spend more on—like health care or visiting family—unfortunately tend to experience higher inflation rates than others. For example, the cost for a private room at a nursing home in 2018 was a whopping $100,375 for the year, according to insurance firm Genworth Financial. That’s up from $65,185 in 2004, which amounts to an average annual inflation rate of 3.2 percent for this particular expense. By the year 2048, assuming an inflation rate of just 3 percent a year, Genworth estimates that cost will rise to a stunning $243,648 a year. Exponential ouch.

That’s why many money experts overestimate inflation when helping you crunch the numbers for your retirement plan. Some suggest doubling whatever the current inflation rate is, meaning they’d use 3.2 percent in today’s calculations. Some even recommend saving for health care in a completely separate account with a totally different approach.

Whatever you decide to do for your own long-term investing strategy, be sure to keep inflation in mind. That way you can prepare your personal financial plan to beat this potential wealth killer and achieve all your financial goals.

* Investing involves risk including loss of principal. This information is presented for educational purposes only and is not a recommendation to buy or sell a specific security or engage in a particular strategy.