The UK inflation rate remained steady at 2.4% in October, confounding analyst expectations of a rise to 2.5%.
The Consumer Prices Index (CPI) figure included falls in food and clothing costs, but rising utility bills and petrol prices, said the ONS.
The inflation figure comes a day after data showed that wages were rising by 3.2% – the fastest pace in nearly a decade.
Core inflation also held steady at 1.9% in October.
That figure strips out the out the effects of energy, food, alcohol and tobacco prices.
Has inflation peaked?
Inflation hit a five-year high of 3.1% in November 2017, as the inflationary effect of sterling’s decline after the June 2016 Brexit vote hit its peak.
However, it is still above the Bank of England’s 2% target.
The ONS’s head of inflation, Michael Hardie, said: “Prices paid by consumers continued to rise at a steady rate, with falls in food and clothing offset by rising utility bills and petrol, as crude [oil] prices continued to rise.”
The Bank of England expects inflation will drift lower, but expects to have to raise interest rates in coming years to keep inflation at or near its target figure.
How were different retail sectors affected?
Food prices cooled off. The cost of oils and fats dropped by 6.3% compared with the previous month, while milk, cheese and eggs prices were down 1.4%.
Overall food and non-alcoholic drink prices dropped by 0.2% in October. Clothing and footwear also dipped by 0.5%.
But gas and electricity prices both jumped by 2%, while liquid fuels soared by 7.2%.
How have manufacturers fared?
Looking at the latest date, for manufacturers, the cost of raw materials was 10% higher than in October 2017.
And manufacturers increased the prices they charged by 3.3% year-on-year compared with 3.1% the previous month.
How have house prices been affected?
The ONS said house prices in September rose by an annual 3.5% against 3.1% in August.
But prices in London fell for a third month running, down by 0.3%.
What does this mean for interest rates?
Analysis by economics correspondent Andy Verity
There may not have been a change in the inflation rate, but there has been a change in expectations regarding when interest rates are likely to rise. In the City, the betting now is that the next upward move by the Bank of England is more likely than not to come as early as next May.
That would take the official rate to the giddy heights of 1%.
But is by no means obvious that rates will have to rise soon to tame inflation. If you strip out volatile items like food and fuel, so-called “core inflation” remains subdued at 1.9%.
Even though wages are rising more strongly, there’s little sign that prices are rising to compensate for those higher costs – rather, competition is holding prices down. Then again, the Bank of England has made no secret of its desire to “normalise” rates, so the markets may be right.
Is there a Brexit factor?
According to Laith Khalaf, senior analyst at Hargreaves Lansdown: “Brexit is still the elephant in the room when it comes to the future path of inflation, and consequently of monetary policy.
“That’s because the pound now waxes and wanes with the Brexit negotiations, and that has a big impact on how much UK consumers pay for imported goods.