Findings In this cohort study of 489 patients who had a vitamin D level measured in the year before COVID-19 testing, the relative risk of testing positive for COVID-19 was 1.77 times greater for patients with likely deficient vitamin D status compared with patients with likely sufficient vitamin D status, a difference that was statistically significant.