General Mills is taking in more money but also spending more as the cost for everything from oats to cardboard continues to rise, denting the food maker's profit.

The company, like all of its peers, has raised consumer prices on its food products — but it's not enough to offset increased expenses caused by supply chain backlogs and inflation.

The Golden Valley-based packaged food giant on Tuesday reported its quarterly earnings fell 13% for the second quarter, ended Nov. 28.

Its $5 billion in revenue for the three-month period was 6% higher than at the same time a year ago. But General Mills' overall profit fell from $688 million to $597 million.

"We've seen about half a billion dollars more in costs than we were expecting this year," chief executive Jeff Harmening said in an interview. "Those are a function of the imbalance globally between supply and demand."

The company is planning more price increases in the current quarter, but Harmening expects consumers will stick with Cheerios and Pillsbury over other brands.

"Demand for our products has been quite strong and remains quite strong against our competitors — we're gaining market share in the majority of our categories," he said.

General Mills stock fell 4% Tuesday, ending the day at $65.06 a share.

Despite missing expectations, the company has "solid longer-term trends," said Edward Jones analyst John Boylan in a research note Tuesday.

"Unfortunately, increased distribution, labor and input costs are an industrywide trend that are not unique to General Mills," Boylan wrote. "We also should see benefits from it raising product prices to help offset higher costs as the year progresses."

About 55% of General Mills' input costs come from raw materials and packaging, 30% is labor and the rest is transportation and logistics, company leaders said.

"Every time you see something get better you see something else go down," Jon Nudi, president of North American retail, told investors about supply chain and cost issues Tuesday.

General Mills has seen double-digit price increases for raw and packaging materials; the index price of oats has more than doubled in the past year, according to the Bureau of Labor Statistics, and wheat prices are at their highest level in more than a decade.

Transportation costs are also higher than expected, chief financial officer Kofi Bruce told the Star Tribune.

"I think the cost environment will continue to be a challenge for the balance of the fiscal year," he said, but price increases and other supply chain management strategies should improve profitability by spring.

Arun Sundaram, equity analyst at CFRA Research, said the company's margins "should significantly strengthen once the broader supply chain environment improves."

The North America retail segment accounts for the bulk of the company's sales, which saw sales increase 2% during the quarter. Pet food sales climbed 29% and foodservice and convenience stores jumped 23% on a continued rebound in sales to schools and restaurants.

Sales in Asia and Latin America rose 5% while Europe and Australia saw a 1% drop.

General Mills recently divested its European dough business and sold its stake in European Yoplait. Earlier this year the company paid $1.2 billion for Tyson Foods' pet treats business to expand its portfolio in the fast-growing pet food segment.

General Mills on Tuesday also updated its guidance for the rest of its fiscal year and expects to meet or exceed its key financial targets.

"The things that are within our control we're doing really well," Harmening said. "Whenever this pandemic becomes endemic and we get out of disruptions, our business will be better than it was."