Optimal levels of vitamin D have been a topic of heavy debate, and the correlation between 25-hydroxyvitamin D [25(OH)D] levels and mortality still remains to be established.The aim of the study was to determine the association between all-cause mortality and serum levels of 25(OH)D, calcium, and PTH.We conducted a retrospective, observational cohort study, the CopD Study, in a single laboratory center in Copenhagen, Denmark.Serum 25(OH)D was analyzed from 247,574 subjects from the Copenhagen general practice sector. In addition, serum levels of calcium, albumin-adjusted calcium, PTH, and creatinine were measured in 111,536; 20,512; 34,996; and 189,496 of the subjects, respectively.Multivariate Cox regression analysis was used to compute hazard ratios for all-cause mortality.During follow-up (median, 3.07 yr), 15,198 (6.1%) subjects died. A reverse J-shaped association between serum level of 25(OH)D and mortality was observed. A serum 25(OH)D level of 50-60 nmol/liter was associated with the lowest mortality risk. Compared to 50 nmol/liter, the hazard ratios (95% confidence intervals) of all-cause mortality at very low (10 nmol/liter) and high (140 nmol/liter) serum levels of 25(OH)D were 2.13 (2.02-2.24) and 1.42 (1.31-1.53), respectively. Similarly, both high and low levels of albumin-adjusted serum calcium and serum PTH were associated with an increased mortality, and secondary hyperparathyroidism was associated with higher mortality (P < 0.0001).In this study from the general practice sector, a reverse J-shaped relation between the serum level of 25(OH)D and all-cause mortality was observed, indicating not only a lower limit but also an upper limit. The lowest mortality risk was at 50-60 nmol/liter. The study did not allow inference of causality, and further studies are needed to elucidate a possible causal relationship between 25(OH)D levels, especially higher levels, and mortality.