Nobody loves inflation, the economic force that makes your morning cup of coffee cost more tomorrow than it does today. But here’s the thing: Despite the fact that it’s making everything more expensive over time, a modest amount of inflation is completely necessary for economic growth, and knowing what the inflation rate is, whether it’s high or low, can help guide your money decisions.

What Is Inflation?

Inflation is the tendency for prices of goods and services to rise over time. Too much inflation suggests that an economy is facing serious troubles—but negative inflation, otherwise known as deflation, is an even bigger problem. Achieving inflation that’s not too hot, not too cold, but just right is needed to drive spending among businesses and consumers, and thereby create a baseline of economic growth.

Typically expressed as a percentage that indicates a year-over-year rate of growth, the inflation rate gives you a quick and ready measure of the changing purchasing power of consumers and businesses. Measuring inflation is a matter of national importance, and maintaining a steady rate of inflation is one of the two main jobs of the Federal Reserve (the other is promoting full employment).

Another way to think about inflation is in the context of the value of a country’s currency, like the U.S. dollar. As prices rise, each dollar you hold buys fewer goods and services. As the purchasing power of each dollar declines, the general cost of living goes up. Why? Because now the public spends the same amount of money but gets fewer things for it.

While high inflation can hamstring the economy by depressing purchasing power, too-low inflation is also undesirable as it puts a damper on growth by keeping too much money out of the economy in savings accounts, as people stop spending and wait for the value of their dollars to increase. The optimal inflation level encourages spending today instead of saving, which feeds economic growth at just the right level.

How To Calculate Inflation Rates

The two most frequently cited indexes that calculate the inflation rate in the U.S. are the Consumer Price Index (CPI) and the Personal Consumption Expenditures Price Index (PCE). These two measures take different approaches to measuring and calculating inflation.

What Is CPI Inflation?

The Bureau of Labor Statistics (BLS) calculates CPI inflation by gathering spending data from tens of thousands of regular consumers around the U.S. It tracks a basket of commonly purchased goods and services, including things like food, gasoline, computers, prescription drugs, college tuition and mortgage payments, to gauge how prices generally change over time.

Two components of this basket—food and energy—can see very significant changes in price from one month to the next, depending on seasonal demand and potential supply disruptions at home and abroad. For this reason, the BLS also publishes Core CPI, a measure of so-called “underlying inflation,” which intentionally leaves out volatile food and energy prices.

A version of the CPI for urban wage earners and clerical workers (CPI-W) is used by the BLS to calculate the cost-of-living adjustment (COLA) annual increase in Social Security benefits meant to preserve purchasing power and counteract inflation. This measure is also often used by companies to maintain their employees’ purchasing power each year.

How Is CPI Inflation Calculated?

The BLS calculates CPI inflation by taking the average weighted cost of a basket of goods in a given month and dividing it by the same basket from the previous month.

Prices that make up CPI inflation calculations come from the BLS’ Consumer Expenditure Surveys, which assess what real Americans are buying. Approximately 24,000 consumers from around the U.S. are surveyed by the BLS every quarter, and another 12,000 consumers maintain annual diaries of their purchases. The makeup of the basket of goods and services changes gradually over time, following the survived buying habits of consumers, but overall, CPI inflation is calculated from a pretty fixed set of goods and services.

What Is PCE Inflation? How Is It Calculated?

The Bureau of Economic Analysis (BEA) calculates PCE inflation based on price changes of a basket of goods and services, somewhat similarly to how CPI inflation is calculated. The key difference is where the data comes from: Instead of asking consumers how much they’re spending on certain goods and services, the PCE tracks the prices businesses report selling goods and services for.

This distinction may seem like a matter of semantics, but it means PCE’s able to better track expenditures that consumers do not pay for directly, like medical care paid for by employer-provided insurance or Medicare and Medicaid. CPI doesn’t keep up with these in-direct expenses.

Finally, PCE’s basket of goods is less fixed than CPI’s, which helps it account better for when consumers substitute one kind of good or service for another when it gets more expensive. As the price of beef rises, for instance, consumers may shift to purchasing more chicken. PCE updates to reflect this while CPI generally doesn’t.

The BEA’s personal consumption expenditures price index also calculates a core PCE measure, like CPI, that strips out volatile food and energy prices. The Federal Reserve considers Core PCE to be its most important measure of inflation in the U.S.—although it also considers other inflation data when setting monetary policy. In general, the Federal Reserve aims to keep inflation (as calculated by Core PCE) at about 2%, though it has said it will let this rate run higher short term to encourage recovery from Covid-19-related economic damage.

The Bottom Line on Inflation

Inflation may be a force for good or your worst enemy: It all depends on your point of view. If you’re retired and living on a fixed income, higher rates of inflation dilute the purchasing power of your money. But if you owe debt, like a big mortgage, rising rates of inflation slowly make your debt easier to pay as the amount you borrowed is fixed but its value’s purchasing power diminishes each time inflation rises. If your employer raises your salary to combat inflation, this can make it even easier to pay back your balance.

Ultimately, inflation is also a large motivation to invest. To preserve and grow your purchasing power, you need a return on investment (ROI) that’s above the current rate of inflation. You’re unlikely to see returns high enough to fend off inflation when you hold your money as cash in a bank account. But historically investing has helped people grow their money about 7% on average each year—and that’s accounting for inflation.