Yet many experts say that even if the tests were accurate, there would still be uncertainty in how to treat patients. There is considerable debate about how much vitamin D is needed and whether vitamin D supplements even prevent various diseases. Vitamin D is usually made by the body when the skin is exposed to sunlight and is also contained in oily fish and some fortified drinks like milk.

Some doctors said they had switched to other testing laboratories because of Quest’s problems. But Quest, based in Madison, N.J., offers numerous tests, from routine blood work to sophisticated genetic tests. No one type of test represents a large potion of its revenue, which was $5.45 billion for the first nine months of 2008.

The company said the retesting would not have a material effect on its earnings. The company’s stock price rose 80 cents Wednesday to $49.20, approximately in the middle of its 52-week range.

Image Dr. Lawrence D. Rosen, of Oradell, N.J., said retesting was an inconvenience for the more than 20 of his patients needing it. Credit... Juan Arredondo for The New York Times

Quest’s problems with the vitamin D analysis arose after it shifted in 2006 and 2007 to a new test of its own design, replacing an older F.D.A.-approved test. The new test promised to be more accurate and offer more detailed information, Quest executives said. But the test relied on a sophisticated instrument called a mass spectrometer, which can be tricky to use, especially for high-volume testing.

Dr. Wael A. Salameh, the medical director for endocrinology at Quest’s most sophisticated laboratory, which is in San Juan Capistrano, Calif., said some materials used to calibrate test results had been faulty. And four of the seven Quest testing laboratories around the country did not always follow proper procedures, he said.

Quest would not say how many patients were affected. But a spokesman did not deny that thousands of doctors were sent letters in October. Each doctor had at least one patient, and in many cases dozens of patients, who had a possibly inaccurate test result.