The number of infections Americans acquire during hospital stays every year has declined substantially over the last decade, federal health officials said in a report on Wednesday, as hospitals have worked to improve their practices and nursing homes’ role in medical care has grown.

Federal health officials said there were about 722,000 hospital infections in 2011, far fewer than past estimates, which put the number around 1.7 million a year. At the 2011 rate, one in every 25 patients contracted an infection while in the hospital; by previous estimates, about one in 20 did.

Officials emphasized that the old estimate, published in 2007 using data from 2002, was less precise.

The new figures were the result of the first nationally representative count of hospital infections. Under the new survey, which health officials put in place several years ago to gain a more precise understanding of hospital infections at a time when they were growing, surveyors randomly selected more than 10,000 patients at 183 hospitals, enough to draw a broad sample of infections.