Magnesium deficiency is common but difficult to diagnose and to assess in clinical practice. The use of a magnesium loading test was therefore evaluated to diagnose magnesium deficiency in 661 hospitalized patients with medical conditions assumed to interfere with magnesium uptake and excretion. Thirty millimoles of magnesium sulphate were administered intravenously during 8 h as a loading test and related to the urinary excretion in the following 24 h. A group of 30 patients without any known predisposition for magnesium deficiency and a group of 27 healthy volunteers served as controls. The mean (with 95% confidence interval) magnesium retention was 4 (-2-10)% in the control group of patients and 3 (-2-8)% in healthy subjects. A significantly higher retention was observed in all the groups of the patients: atrial fibrillation 18 (11-25)%, other arrhythmias 18 (11-24)%, hypertension 27 (20-33)%, coronary artery disease 25 (20-30)%, congestive heart failure 31 (26-37)%, cerebrovascular events 38 (24-51)%, gastrointestinal disorders 22 (14-29)%, diabetes mellitus 16 (9-22)%, and alcoholics 33 (29-36)%. The percentage of patients with a retention greater than mean + 2 SD of the two control groups varied between 22% and 54% among the different patient groups. The mean serum magnesium among the patient groups was similar to the control group of patients, except for the alcoholics, hypertensives and young healthy controls, who had significantly reduced levels. Magnesium retention was significantly correlated to age and renal function, and among the alcoholics negatively correlated to serum magnesium.(ABSTRACT TRUNCATED AT 250 WORDS)