More sophisticated buying techniques let Greggs shrug off the increases in the price of flour and sugar that accompanied the devaluation of sterling last September.
Greggs also kept its wages bill down, without wholesale redundancies, and cut the cost of its energy requirements.
Taxable profit for the 24 weeks to 12 June was pounds 2.9m, up from pounds 2.3m.
About one-fifth of sales come from bread, the market for which was weak, the company said. Sandwich sales, however, were stronger.
Overall turnover rose 6 per cent to pounds 48.3m as the company benefited from six new shop openings. It now has 492 retail outlets, and expects to open its 500th shop later in the year.
Mike Darrington, managing director, said the company was about to embark on a capital expenditure programme. He was preparing to spend pounds 6m in the current year, and pounds 12m next.
About half the bakery products sold in Greggs' outlets are prepared at the high street premises, and half made in one of Greggs' seven bigger baking plants. The company will spend to upgrade both. It is keen to expand into London, the West Midlands, and the West Country.
Earnings per share were 17p, up from 13.4p. The dividend was increased by 20 per cent to 6p.
The shares have risen from 400p to 708p over the past 12 months, but were unchanged yesterday.Reuse content