Minnesota corn and soybean farmers are expected to set records this year, both for the total amount of the crops grown and the average number of bushels per acre that will be harvested, federal agriculture officials said.

But current corn and soybean prices are below the costs of production for most growers, and producers would lose money if they sold all of their crops now, said Bruce Peterson, president of the Minnesota Corn Growers Association until last week.

“It’s the great irony in agriculture that good is bad,” said Ed Usset, grain marketing economist for the University of Minnesota Center for Farm Financial Management. “A great crop means that we’re going to have lower total revenue.”

Demand for corn and soybeans remains healthy, Usset said, but supply in the U.S. and around the world has outrun demand, so crop prices have been stubbornly low and there’s no rally in sight.

“Minnesota producers should feel good about one thing,” he said. “We are the ones with the good crop.”

Corn production is forecast at 1.43 billion bushels, 4 percent above the previous high in 2012. And yields are expected to average 184 bushels per acre, 28 bushels more than last year and seven bushels per acre above the previous record in 2010.

The forecast is part of the latest monthly national crop production report issued Friday by the U.S. Department of Agriculture. It is based upon conditions as of Oct. 1, so it doesn’t reflect weather conditions during the past two weeks.

Soybean production in the state is expected to be 364 million bushels, which would be 11 percent above the previous high in 2010. The forecast yield is 48 bushels per acre, which would also be the highest ever, surpassing the previous record of 45.5 bushels per acre in 2005.

Jeff Coulter, corn specialist at the University of Minnesota Extension, attributes the success mainly to growing conditions that have been optimal this season.

“It comes down to the weather,” he said. “This year we had timely, well-distributed rainfall. The temperatures weren’t too hot, and there was little stress on the crops.”

Coulter said it helped to have an early spring that gave growers a head start but having a slightly longer growing season is not as important as moisture, especially during the hottest weeks of summer.

“In years when we can have timely rainfall, we do super-well,” he said.

Peterson, who grows corn and soybeans with his family near Northfield, said the latest federal estimates seem to be generally on target. “Most guys are just wrapping up soybean harvest, and they’re just getting into corn harvest,” he said, and the soybean yields have been tremendous.

Nationally, corn production is expected to fall 5 percent from last year’s record, with states including Illinois, Missouri, Indiana, Nebraska and Arkansas with average or subpar crops because of too much rainfall, and Iowa, Wisconsin, Minnesota and South Dakota setting records.

“If you have a record crop, prices are bad, but at least you have more to sell,” Usset said.

Minnesota sugar beet growers are also having a good but not a record year, with production forecast at 12 million tons, up 23 percent from 2014, which was an unusually poor year because of cold spring weather and late planting. Sugar beet yields are forecast at 27.8 tons per acre, up 5.3 tons from last year.

Peterson said farmers cope with low prices by watching the market closely, and some sold part of their corn crop in mid-July when futures prices jumped briefly. “That’s why most farmers will store what they can in bins and wait,” he said, “in hopes that there’ll be a little bit of price appreciation that’ll work out better next spring.”