Those studies have tracked hospital admissions and disease patterns after chemicals were detected in water supplies. They found that various contaminants were often associated with increased incidents of disease. That research  like all large-scale studies of human illnesses  sometimes cannot definitively say that chemicals in drinking water were the sole cause of disease.

But even the E.P.A., which has ultimate responsibility for the Safe Drinking Water Act, has concluded that millions of Americans have been exposed to drinking water that fails to meet a federal health benchmark, according to records analyzed by The Times. (Studies and E.P.A. summaries can be found in the Resources section of nytimes.com/water.)

Communities where the drinking water has contained chemicals that are associated with health risks include Scottsdale, Ariz.; El Paso, Tex., and Reno, Nev. Test results analyzed by The Times show their drinking water has contained arsenic at concentrations that have been associated with cancer. But that contamination did not violate the Safe Drinking Water Act.

In Millville, N.J., Pleasantville, N.J., and Edmond, Okla., drinking water has contained traces of uranium, which can cause kidney damage. Those concentrations also did not violate the law. (Contaminant records for each of the 47,500 water systems that provided data are at nytimes.com/contaminants.)

“If it doesn’t violate the law, I don’t really pay much attention to it,” said Stephen Sorrell, executive director of Emerald Coast Utilities Authority, which serves Pensacola, Fla. Data show that his system has delivered water containing multiple chemicals at concentrations that research indicates are associated with health risks. The system has not violated the Safe Drinking Water Act during the last half-decade.

The Times analysis was based on water test data collected by an advocacy organization, the Environmental Working Group. The data, which contain samples from 2004 to this year, are from water systems that were required by law to test for certain contaminants and report findings to regulators. The data were verified by comparing a randomly selected sample against millions of state records obtained by The Times through public records requests.

The Times examined concentrations of 335 chemicals that government agencies have determined were associated with serious health risks. The analysis counted only instances in which the same chemical was detected at least 10 times for a single water system since 2004, at a concentration that the government has said poses at least a 1-in-10,000 risk of causing disease.