Prices are continuing to rise at their fastest rate for 40 years as fuel, energy and food costs continue to climb.
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.
The figure is now at the highest level since March 1982, when it stood at 10.2%.
The Bank of England has warned inflation will reach 11% this year.
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%.
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”.
Mr Fitzner added the cost of raw materials “leapt at their fastest rate on record”.
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.
Responding to the latest inflation rate, Chancellor Rishi Sunak said the government was “using all the tools at our disposal to bring inflation down and combat rising prices”.
“I know that people are worried about the rising cost of living, which is why we have taken targeted action to help families, getting £1,200 to the eight million most vulnerable households,” he added.