It’s getting more expensive to be poor.

Over the past two years, prices have risen more quickly for many of the things that low-income households spend a lot of their money on, such as rent and utilities. As a result, these households — families earning less than $20,000 — are experiencing a higher rate of inflation than the public at large even as their wages have stagnated, according to a FiveThirtyEight analysis of government data.

We tend to talk about inflation as a single number affecting the whole economy. But everyone experiences a slightly different rate of inflation for the simple reason that we all spend money on different things. The price of cigarettes matters primarily to smokers; the price of diapers affects mostly parents of young children; and the price of gas is a much bigger deal to someone with an 80-mile daily commute than to someone who only takes the car out for weekend excursions.

Overall inflation has been muted in recent years; consumer prices were up just 1.1 percent in February from a year earlier, far below their long-run average. But prices are rising a bit faster for both the poor and the wealthy, who have been hit harder by the ongoing increase in college tuitions. The result: from February 2012 to February 2014, the poorest fifth of households have experienced an annual rate of inflation that’s about two tenths of a percentage point higher than the population as a whole. The richest fifth have experienced inflation about a tenth of a point higher.

The difference in the rate of inflation between income groups is too small to matter much in the short-term, adding just a few dollars to the average family’s monthly bills. But the longer that low-income families continue to experience faster price increases, the bigger the effect will be, quickly adding up to hundreds of dollars a year in extra costs for the households least able to afford it.

This trend is unusual. Past studies have found that the rate of inflation tends to be more volatile for the poor, largely because they have historically spent more of their income on gasoline, which tends to see bigger price swings than other goods. But over the long-term, low-income families’ rate of inflation tracks closely to the average household’s. This time, however, the split has been persistent: The poorest 20 percent of American households have experienced a higher rate of inflation than the overall population every month for the past two years.

We can calculate inflation for different groups using the same basic methodology that the Bureau of Labor Statistics uses to compile the Consumer Price Index, the government’s best-known measure of inflation. The CPI aims to calculate changes in the cost of living by tracking the cost of a “basket of goods.” Every month, data collectors from the Bureau of Labor Statistics fan out across the country to check prices of thousands of goods and services, from eggs to auto repair.

That basket of goods is based on the Consumer Expenditure Survey, an annual survey of about 14,000 households that collects detailed data on how Americans spend their money. Government economists use the survey to determine not just what goes in the basket but how much weight to give to each item. Housing, for example, is the biggest expense, eating up close to a third of the average household’s annual spending, so changes to the price of shelter have a much bigger impact on the overall Consumer Price Index than changes in the price of shoes, which account for less than 1 percent of average spending.

To calculate the rate of inflation for a particular group of people, all we need to know is what they’re spending their money on — how their basket of goods differs from the one used to measure inflation for the overall population. We can do this using detailed data from the Consumer Expenditure Survey, which also collects information on households’ earnings, education and various demographic factors.

The table below breaks down household spending by income groups. As a percentage of total spending, there’s actually relatively little difference between the groups. Wealthier households spend far more than poorer ones in dollar terms; the wealthiest fifth of households spend about $100,000 a year, five times as much as the poorest fifth. But both groups devote about 3 percent of their total spending to clothes and between 11 and 13 percent to food.

Still, even small percentage differences in various categories can add up. Low-income households spend 54 percent of their money on the bare necessities: housing, utilities and food prepared at home. The wealthiest households devote 44 percent of their spending to those areas, leaving them more to spend on entertainment, education and restaurant meals.

Drill down into more detailed categories and the differences become starker. The poor spend much less of their money on new vehicles (less than 1 percent, versus 5 percent for the wealthiest fifth) and more on electricity (4 percent versus 3 percent). They spend less at full-service restaurants and more on fast food; more on cigarettes and less on liquor; more on laundry and less on “domestic services.”

Since the prices of those goods rise and fall at different rates, the rate of inflation for any given group of people depends on how much they spend on each item. Prices for women’s dresses, for example, are up 7.8 percent over the past year, while gasoline prices are down 8.1 percent. So, all else equal, bike-riding shopaholics have experienced a higher rate of inflation than SUV drivers who prefer pants.

To figure out how inflation varies by income, I divided the population into five groups by earnings, then calculated how much different income groups spend on each of more than 150 goods and services. Then I applied those spending shares to the price changes for each item to construct a re-weighted Consumer Price Index — the rate of inflation experienced by each income group.

According to that analysis, the rich and poor have experienced faster inflation than those in the middle, but for different reasons. For low-income families, the biggest cause was rising rents, which are up 5.6 percent over the past two years, more than double the overall rate of inflation. The poor spend significantly more on housing than other groups, so rising costs hit them harder. Similarly, low income families devote a disproportionate share of their spending to car insurance, where prices are up 8.8 percent over the past two years, and electricity, where prices are up 4.7 percent. And the poor spend relatively little on televisions, computers and other technology items, which have seen prices fall in recent years.

Wealthier households, on the other hand, were much more affected by the 8.6 percent increase in college tuition because they spend two and a half times as much of their income on higher education than the average family. They also spend more on new cars, restaurant meals and various services that have seen faster than average rates of inflation.

This analysis doesn’t perfectly reflect the changing cost of living for different groups. The Bureau of Labor Statistics doesn’t publish sufficiently detailed information to know whether, for example, the price of organic chicken (presumably bought more often by wealthier customers) is rising more quickly or slowly than non-organic chicken. Additionally, my analysis of what people buy is based on their spending over a two-year period (2009 and 2010) and doesn’t account for how spending patterns have changed — and, importantly, how they might have changed differently for different groups. Poorer consumers might be more likely to switch from beef to chicken if beef prices rise, for example, or quicker to cut back on driving when gas prices increase. If so, my estimate may overstate the rate of inflation they actually experience.

On the other hand, lower-income households generally have less flexibility in how they spend their money. Among the biggest drivers of inflation for the poor were rising prices for rent, utilities, health care and car insurance — not exactly discretionary items. Indeed, other evidence suggests rising rents are pinching many household budgets.

Also pinching budgets: stagnant incomes. The average household income for the poorest 20 percent of Americans barely rose faster than the official rate of inflation in 2012. If you account for the higher rate of inflation they experienced, as this analysis suggests, then their income actually fell. The government hasn’t yet released 2013 income data, but there is little evidence of an acceleration in wages: Weekly earnings for workers in many low-paying sectors such as the hotel and restaurant industries rose at or below the rate of inflation in 2013.

Higher earners, on the other hand, belong to the only income group that saw incomes rise faster than inflation between 2010 and 2012; recent gains in the stock market suggest their earnings growth has likely continued since then.

It’s hard to know whether the divergence in the rates of inflation between different income groups will continue. Real estate developers are racing to build apartments in many cities, but rents are likely to keep rising until supply catches up with demand. On the other hand, there are signs that the long rise in college tuitions may at last be slowing. Health care inflation has slowed too, but no one is sure how long that trend will continue.

The overall rate of inflation, however, is likely to rise as the economy improves. The Federal Reserve expects prices to rise faster over the next two years, gradually returning to the Fed’s long-term target rate of 2 percent annually. Few consumers will welcome faster price growth, but if that inflation is the result of faster economic growth, it might also bring a more welcome development: faster wage gains.