WASHINGTON — The National Oceanic and Atmospheric Administration’s National Climatic Data Center is calling 2012 the warmest and second most extreme year on record for the contiguous United States. The agency’s finding highlights drought conditions that have wreaked havoc on commodity costs and is starting to affect the price of foods at retail and food service.

The average temperature for 2012 was 55.3°F, 3.2°F above the 20th century average, and 1.0°F above 1998, the previous warmest year, according to the N.O.A.A. The average precipitation total for the contiguous United States for 2012 was 26.57 inches, 2.57 inches below average, making it the 15th driest year on record for the nation. At its peak in July, the drought of 2012 engulfed 61% of the nation with the Mountain West, Great Plains, and Midwest experiencing the most intense drought conditions.

The N.O.A.A. also compiles what it calls the U.S. Climate Extremes index, and 2012 was the second most extreme year on record for the nation. The index, which evaluates extremes in temperature and precipitation, as well as landfalling tropical cyclones, was nearly twice the average value and second only to 1998. To date, 2012 has seen 11 disasters that have reached the $1 billion threshold in losses, to include Sandy, Isaac, and tornado outbreaks experienced in the Great Plains, Texas and Southeast/Ohio Valley.

Every state in the contiguous United States had an above-average annual temperature for 2012, according to the N.O.A.A. Nineteen states had a record warm year and an additional 26 states had one of their 10 warmest.

Each season of 2012 had precipitation totals below the 20th century average. Winter brought below-average precipitation to both coasts and above-average precipitation to the Southern Plains, slightly lessening drought conditions that plagued the region in 2011. The winter precipitation total was 89% of normal.

Spring 2012 precipitation was 95% of the 20th century average with below-average precipitation in the Rockies and Midwest and above-average precipitation in the Northwest and Upper Midwest. Summer precipitation was 88% of normal with dry conditions in the central United States. The West coast, Gulf Coast, and Northeast were wetter than average. Autumn was drier than average for most of the central United States, with wet conditions in the Northwest, Ohio Valley, and Northeast. The autumn precipitation total was 85% of average.