Food groups are grappling with surging commodity costs that are hitting margins, and Nestle, with well-known brands like Nescafe coffee and Purina pet food, said price increases could only be implemented with a time lag.

Its underlying trading operating profit margin is expected to slip to around 17.5% this year from 17.7% in 2020, and then improve again from 2022, Nestle said in a statement on Thursday.

"(On the margin), we're taking a bit more of a cautious view to the full year because we see continued inflation in the system," Chief Executive Mark Schneider told reporters on a call. He said the company could hedge against some increases -- such as coffee prices that spiked this week -- but not against higher transportation costs.

"Inflation has been virtually absent for a number of years and then pointed up very sharply. It hit us directly," Schneider said, adding the problem was transitory.

Schneider said input cost inflation was expected to reach around 4% this year and the company would accelerate price increases in the second half. He said Nestle needed to raise prices by about 2% to offset 4% cost inflation. It raised prices by 1.3% in the first half, and said a better product mix and efficiencies would also help.

Peer Unilever said last week it expected cost inflation to be in the high-teens in the second half of the year, while Danone also on Thursday reported a lower operating margin for the first half.

Shares in Nestle, up almost 10% so far this year, were 0.9% lower at 0721 GMT, outperforming a 1.1% weaker sector.

Kepler Cheuvreux analyst Jon Cox said "the market probably did not want to hear about a delay in passing through prices", while the strong top line and increased growth guidance had been expected.

Nestle raised its organic growth guidance for the year to 5-6%, versus "above 3.6%" previously, after strong demand for coffee and a rebound in the out-of-home business and in China lifted sales by 8.1% in the first half and 8.6% in the second quarter.

Vontobel analyst Jean-Philippe Bertschy noted "strong sales growth in developed markets at 6.7%, compares with a flat outcome at Mondelez and Unilever, demonstrating Nestle's innovation strength".

Nestle confirmed it would deliver "consistent mid-single-digit organic growth for years to come".

Net profit rose slightly to 5.9 billion Swiss francs ($6.49 billion).

(Reporting by Silke KoltrowitzEditing by Michael Shields, Sonali Paul and Emelia Sithole-Matarise)

By Silke Koltrowitz