2014 was a good year for milk producers.

KANSAS CITY — Despite the weakness in many dairy product prices late last year, 2014 was a good year for milk producers as the average all-milk price reported by the U.S. Department of Agriculture soared nearly 20% to a record high and feed costs fell. CME Group butter prices set record highs above $3 a lb last September, with average dry whey prices peaking in the third quarter, and average nonfat dry milk and cheddar cheese prices quoted by the U.S.D.A. peaking in the first quarter.

“Average prices for major dairy products reached record highs in 2014,” the U.S.D.A. said in its Jan. 16 Livestock, Dairy and Poultry Outlook. “High dairy product prices translated into high milk prices for dairy farmers.”

But the good times of 2014 are expected to come to a screeching halt in 2015, not unlike the drastic decline in prices seen in 2009 when milk production surged after record high prices the prior year. The stress was beginning to show late last year. Nonfat dry milk prices tumbled to at least 2½-year lows and for most regions more than 5-year lows at the end of 2014 as increased milk supplies boosted production that met with lackluster domestic and export demand. Prices fell another 10% to 20% in the first three weeks of January.

A number of factors developed in 2014 that led to a less-than-rosy forecast for the current year. Milk production in the world’s five largest dairy exporters (Argentina, Australia, European Union, New Zealand and the United States) increased a combined 4% from 2013, according to the U.S.D.A. Russia then banned imports from select areas (most notably the United States and the E.U.), and China reduced milk powder imports as stocks accumulated in 2014. As world milk supplies grew, opportunities for U.S. dairy product exports declined, with multi-year highs in the value of the dollar adding to exporters woes. The U.S./world price relationship became so unbalanced that U.S. imports of butter and other products contributed to the rapid domestic price declines late last year.

In the United States, declining feed costs and rising milk prices encouraged milk production, estimated at 206 billion lbs in 2014, up 2.4% from 2013, the U.S.D.A. said. In some areas milk supplies surpassed the ability of bottlers and processors to use it.

Domestic stocks of many dairy products grew late last year. Stocks of N.D.M. totaled 217 million lbs on Nov. 30, 2014 (the most recent U.S.D.A. data available), up 90% from a year earlier, while dry whole milk stocks were up 151%, dry buttermilk was up 132%, lactose was up 33%, whey protein concentrate was up 24% and dry whey was up 7%. Natural cheese stocks increased from October to November 2014 for only the second time since 1917, the U.S.D.A. said.

As a result of rising milk production and ample stocks of most products, the U.S.D.A. in its latest Outlook trimmed its 2015 milk and dairy product price forecasts from December and from 2014 averages, in some cases substantially, even though milk production still is expected to increase 2.8% from last year.

The U.S.D.A. forecast the average all-milk price to range from $17.75 to $18.55 a cwt in 2015, down 70c from its December forecast and down 24% from a record-high $23.97 a cwt in 2014, with prices for Class 3 milk (used for cheese) forecast down 26% from 2014 and Class 4 milk (used for butter and dried products) down 27%. The midpoint of 2015 price range forecasts for cheddar cheese, butter and N.D.M. are down about 25% from 2014, while dry whey prices are forecast down about 15%.

While it usually takes a while for farmgate and wholesale price changes to reach the consumer, the Bureau of Labor Statistics said the average retail price of whole milk was $3.82 a gallon in its most recent report, down from $3.86 at the peak in 2014, with prices expected to decline as the year progresses. Retail prices for skim milk were below $3 a gallon in some areas.

A couple of other changes also may affect the dairy industry in 2015. The U.S.D.A. noted that pricing of some products, including key nonfat dry milk, was being switched from traditional indexes to being based off CME Group nonfat dry milk prices.

Lower domestic prices are expected to result in a modest increase in dairy product exports in 2015, assuming Russia lifts its ban in August, the U.S.D.A. said.

And softening the potential blow of falling milk prices on dairy farmers is a new Federal Margin Protection Program from the 2014 farm bill, which sets an average national feed price, which farmers subtract from their milk price to determine their margin, which if below a certain point will result in government payments. The U.S.D.A. indicated that more than 50% of U.S. dairy farmers were enrolled in the program for 2015.