Most people tend to think of inflation on a micro level—how it impacts the price of groceries, for example—but it also has a very real effect on your investments. Inflation can influence stock market returns, outpace savings interest rates, and reduce your purchasing power during retirement.

The future depends on what you do today. Understanding how inflation affects your investments can put you in a better position to manage your money and reach your near and long-term goals. Here’s what you need to know.

What exactly is inflation?

You’ve probably noticed that the price of a gallon of milk isn’t the same as it was several years ago. Inflation is the percentage increase of the cost of goods and services over time. It’s measured by the Bureau of Labor Statistics, which compiles data to determine the Consumer Price Index (CPI). The CPI includes items such as groceries, gas, electricity, clothes and used cars.

The CPI tracks the cost of those goods and how those prices compare to the previous 12 months and is one way investors can look at inflation, since it shows how the cost of consumer goods is increasing or decreasing.

In January 2018, the CPI was 1.8 percent. That means prices had increased 1.8 percent in the past year. In other words, a car that was $15,000 in 2017 would cost $15,270 in 2018.

Inflation also affects how much a person’s salary is worth year after year. If you work for an employer, you likely receive a cost-of-living increase. This raise is supposed to offset inflation and ensure that your salary doesn’t lose earning power. If inflation is 2 percent and your boss gives you a 1.5 percent raise each year, you actually end up earning less because your income has not kept up with inflation.

While higher inflation tends to be demonized, lower inflation can be problematic as well. After the end of the Great Recession, inflation dipped as low as 1.1 percent in November 2010. When inflation is too low, wages also tend to drop, as they did between 2008-2010. It’s a bit like a see-saw that needs to be kept in balance.

How does inflation affect investors?

New data shows that increasing inflation can adversely affect the stock market. During the period between 1928 and 2017, the S&P 500 had a median return of almost 16 percent when inflation was below 3 percent. When inflation reached 3 percent or more, the return dipped to 6.5 percent.

Another important factor is how the rate of inflation compares to the previous year. When inflation is higher than it was the year before, stocks increase 5.6 percent on average. If inflation figures decrease compared to the year before, the S&P 500 grows an average of 18.3 percent.

These figures show that investors need to keep their eyes on increasing inflation, but always consider the historical context.

How can investors beat inflation?

When most people think about losing their hard-earned money in the stock market, they imagine a dramatic event, such as investing in the wrong stock or hiring the wrong, ill-intentioned advisor to manage their affairs. But ordinary people lose money every day due to inflation.

If you have a savings account that yields a percent interest lower than inflation each year, you’re technically losing money. For example, if inflation is close to 2 percent, a .01% percent savings account will give you a negative yield over time. Do you need to “save” your savings account? Answer these two questions to find out.

One way you may be able to outpace inflation is by investing. If you can handle higher risk, you may want to consider investing in a variety of mutual funds and stocks that could help grow at a higher rate than inflation. Keep in mind, though, higher stock market returns come with a higher measure of risk. Be sure to do your research before you make a move.

How does inflation affect retirement savings?

Retirees who are living off a fixed income also need to be wary of inflation. A good rule of thumb for retirees is to only withdraw 4 percent or less of their savings each year they’re retired. Taking out more than 4 percent could result in retirees outliving their retirement savings because of rising costs and reduced purchasing power.

Since rising inflation can be partly responsible for a drop in stocks, retirees also need to have two years’ worth of expenses in liquid accounts such as a CD, money market or savings account. Having enough liquid savings to last them through a slow period will prevent retirees from selling stocks during a low point in the market and draining their accounts even further.

Watch the Fed for investment clues.

The Federal Reserve has a strong hold on how inflation grows or decreases. If inflation is increasing too much—like it did in the early 80s—the Fed can stymie that by raising interest rates. When the Fed decides to increase interest rates, it forces lenders, banks, and other entities to increase their own rates. As interest rates increase, people stop borrowing as much because interest rates are higher. The decrease in borrowing slows inflation.

Some experts are fond of saying, “Don’t fight the Fed.” In essence, what they’re saying is that when the Fed makes a move, you may want to correlate your investment thinking to what that move implies, either an anticipated slowing or a heating-up of the economy.