The largest upward effect came from gas and electricity bills which continued to increase by more than a year ago, reflecting the phasing in of recent tariff increases from major suppliers.
There were also large upward effects from food and non-alcoholic beverages, mainly due to vegetable prices which increased this year but fell a year ago; and clothing and footwear, where prices rose by more than last year - this reflecting higher priced replacement stock this year and more widespread sales a year ago, particularly on footwear and children's clothing.
Meanwhile, RPI inflation rose in May to 3.0%, up from 2.6% in April. The main factors influencing it were similar to the CPI, including higher petrol, gas and electricity prices - this against a backdrop (ironically) of falling airfares.
Housing costs excluded from the CPI also had an effect, following an increase in the depreciation component (the amount needed to keep a house at current market value).
Elsewhere, RPIX inflation - the all items RPI excluding mortgage interest payments - hit 2.9% in May, up from 2.4% in April.