Greggs said strong demand for festive bakes, mince pies and salted caramel lattes helped its like-for-like sales rise 18.2% in the final quarter.
This took its total sales for the year to a better-than-expected £1.51 billion.
The British baker and food-to-go chain, which trades from 2,328 stores, however kept to its previous forecast of limited profit growth for the year in light of higher costs for energy, ingredients and staff.
It said today that cost inflation would continue to be "material" in 2023, but it was confident it would make progress.
"While market conditions in 2023 will remain challenging, our value-for-money offer of freshly-prepared food and drink is highly relevant as consumers look to manage their budgets without compromising on quality and taste," its chief executive Roisin Currie said
Analysts on average expect Greggs to post pretax profit of £148m for 2022, up from £145.6m in 2021, according to a Refinitiv estimate.