Companies throughout the food chain are changing the way they do business in response to soaring grain costs, and consumers are likely to bear the brunt in the form of rising food prices.

Farmers are making the broadest cuts to their livestock herds in decades, meaning meat at the supermarket will likely cost more in coming years. Middlemen are trying to shorten the duration of supply contracts to 90 days from one year so they can pass on higher costs more quickly. And food brands are shrinking the contents of their packages, from ice-cream cartons to beverage containers.

"Everyone's adjusting," Brenda C. Barnes, chief executive of Sara Lee Corp., said Thursday after the company reported a $695 million loss for the quarter ended June 28. That included an $850 million after-tax charge, mostly for writing down the value of bakery businesses hit by soaring wheat costs.

The Downers Grove, Ill., food giant, whose stable includes bread, cheesecake and hot dogs, is winnowing its product lineup and reducing the amount of meat in its Hillshire Farm deli packages, among other steps. Sara Lee expects its commodity and energy costs to climb an additional $500 million in its fiscal year ending June 2009, following a $350 million increase in fiscal 2008.

Nestle SA, which on Thursday reported a strong profit for the first half of the year, has raised its prices on thousands of products in recent months, passing at least some of its higher costs on to consumers.

Before the grain markets stirred in the summer of 2006, the price of corn had stayed below $3 a bushel for a decade. In the space of two years, it surged as high as $7 a bushel. Soybean and wheat made similar moves.

Global grain demand has outstripped production for much of this decade, draining supplies to unusually low levels. Strong economic growth in the developing world is giving hundreds of millions of people the means to afford richer diets, such as grain-fed meat. High oil prices on top of aggressive government mandates, meanwhile, are stoking production of corn-derived ethanol fuel. U.S. ethanol makers, while still struggling for profitability, are forecast to consume one-third of the corn now growing across the Midwest — double their appetite of just two years ago.

In the past month, the speculative fever has eased. The corn futures contract for September delivery rose 14.25 cents a bushel to settle at $5.22 a bushel Thursday. Still, the efforts by ranchers, bakers and meatpackers to shift the burden of higher grain prices show they think their raw-material costs aren't returning to their old levels soon.

"They know prices aren't going backward," says David A. Schawk, chief executive of Schawk Inc., a Des Plaines, Ill., firm that designs packaging for companies. He figures that up to 5 percent of grocery products are shrinking, a level he calls unprecedented.

Food companies with strong brands are having the most success passing higher costs to consumers. The stock price of cereal maker Kellogg Co. is up 11 percent since the grain-price rally began.

"I think we are in the early stages of this," said Paul D. Ridder, chief financial officer of Tasty Baking Co., a Philadelphia maker of snack cakes, which raised prices of its single-serving items by 8 percent during its second quarter ended June 28.

During the first six months of 2008, the consumer-price index for food compiled by the U.S. Bureau of Labor Statistics rose at a seasonally adjusted annualized rate of 6.8 percent, with retail prices of breakfast cereal, bakery products and cooking oil among the fastest climbers. That six-month inflation rate is far higher than anything U.S. consumers have had to stomach in 18 years.

Michael Swanson, an economist at Wells Fargo & Co., thinks the food inflation rate could rise as high as 6 percent next year. Paul Prentice, president of Farm Sector Economics, Colorado Springs, Colo., said he expects retail food prices to rise about 7.5 percent in 2009.

The U.S. Department of Agriculture sees food prices climbing 4.5 percent to 5.5 percent this year and 4 percent to 5 percent in 2009. Even under this more conservative forecast, the average family of four would see its annual food costs hit $9,800 in 2009, up about $1,200 since 2006.