By Katherine Hamilton

General Mills swung to a loss in its fourth quarter, as it aims to gain back business by cutting costs and adding more products in the new fiscal year.

The maker of cereals and pet food on Wednesday posted a loss of $2.01 billion, or $3.74 a share, in the quarter ended in May, compared with a profit of $294.0 million, or 53 cents a share, a year earlier.

Stripping out certain one-time items, adjusted per-share earnings were 95 cents, ahead of the 80 cents anticipated by analysts, according to FactSet.

Revenue rose 1% to $4.61 billion. Analysts surveyed by FactSet had forecast revenue of $4.59 billion.

The swing to a loss in the quarter was primarily driven by $1.8 billion in non-cash charges due to an increase in discount rates. General Mills also had a $1 billion non-cash valuation loss related to the planned divestiture of its Brazil business.

For fiscal year 2027, General Mills expects category growth to be below its long-term historical growth rate due to a challenging consumer backdrop. The company is projecting $3 to $3.20 in annual adjusted earnings per share, compared with analysts' outlook of $3.13 a share.

General Mills Chief Executive Jeff Harmening said the company has completed its work investing in pricing, and now aims to focus on improving sales by driving brand "remarkability."

"This includes a significant increase in innovation and renovation centered on the benefits that matter most to today's consumers," Harmening said.

General Mills, which makes Cheerios and Annie's Mac and Cheese, will focus on creating new products and centering its marketing strategy around the issues that matter most to today's consumers, including ingredients such as protein and fiber. Bold flavors and pet humanization are also focus areas, the company said.

General Mills is also aiming to cut $3 billion in costs by fiscal year 2030, as it looks for ways to operate more efficiently and offset inflation.

Write to Katherine Hamilton at katherine.hamilton@wsj.com