High street stalwart Greggs roared back to growth and profitability in the first half of 2021, but the looming spectre of rising costs dented investor confidence this week.

Greggs said its second quarter beat its own expectations. The easing of Covid restrictions meant total sales in the 26 weeks to 3 July jumped to £546.2m, up from £300.6m in the previous year. More cautiously, on a two-year basis total sales were broadly flat and like-for-likes in company-managed shops were still 9.2% lower than the equivalent period of 2019 – despite 2.8% two-year like-for-like growth in the second quarter.

Pre-tax profits also bounced back to £55.5m in the first half of 2021, recovering from a £64.5m loss in the same period in 2020, as stronger sales were also supported by relatively low levels of food input inflation and cost controls delivered strong margins.

Given the second quarter outperformance, Greggs said it now expected full-year profit to be slightly ahead of its previous expectation.

That was not enough to convince investors calm waters are ahead, however, with the stock ending Tuesday down 2.9% to 2,724p due to the issue of rising costs.

Greggs stressed that it expected “relatively modest” food input inflation in 2021 as a result of forward purchasing cover, but nonetheless conceded commodity price pressures were increasing, following similar warnings from Unilever, Nestlé, Heineken and Reckitt Benckiser.

Third Bridge analysts noted margins could be further squeezed in the second half: “From a pricing point of view, Greggs chose to pass on the Chancellor’s VAT discount to their customers. They now face the tricky challenge of putting their prices back up when VAT increases to 12.5% at the end of September, and 20% in 2022. This may mean short-term margin pressure for the group.”

Analysts at Barclays said the sales update suggested trading in July had slowed from the end of its second quarter, but noted “Greggs tends to trade relatively poorly during periods of hot weather, so we do not see this slowdown as a concern”.

Jefferies called the results “solid”, noting: “Greggs remains a high-quality business with clear growth levers from its store roll-out and strategic initiatives.”

Despite the share price dip this week, Greggs shares are well ahead of their pre-pandemic level, up by almost 150% since September 2020.