UK inflation, the rate at which prices rise, edged up to 9.1% in the 12 months to May, from 9% in April, the Office for National Statistics (ONS) said.
Inflation is the pace at which prices are rising. For example, if a bottle of milk costs £1 and that rises by 5p compared with a year earlier, then milk inflation is 5%.
The ONS said rising prices for food and non-alcoholic beverages helped fuel inflation in May, with the biggest cost increases seen in bread, cereals and meat.
Customers are putting less in their baskets, switching to budget ranges and are worried about the future, its chairman Lord Stuart Rose said.
Grant Fitzner, chief economist at the ONS, said the prices of goods leaving factories rose at their fastest rate in 45 years in May, driven by "widespread food price rises".
But he said the steep rises in food and record high petrol prices had been "offset" by the price of clothes rising less than they did this time last year, along with a drop in computer game costs.