How to convert a median and IQR to a mean and SD
Why conversion is needed
Meta-analysis of continuous outcomes usually pools means and standard deviations. Many studies report a median with an interquartile range (IQR) instead, often because the data are skewed or the sample is small. Leaving those studies out wastes evidence; converting them adds an assumption. The aim is to do it transparently.
The formulas
With sample size n, first quartile Q1, median m and third quartile Q3:
Mean (Luo et al., 2018):
mean ≈ w × (Q1 + Q3)/2 + (1 − w) × m, where w = 0.7 + 0.39/nStandard deviation (Wan et al., 2014):
SD ≈ (Q3 − Q1) / (2 × Φ⁻¹((0.75n − 0.125)/(n + 0.25)))Φ⁻¹ is the inverse of the standard normal distribution. As n grows the denominator approaches 2 × 0.6745 = 1.35, the familiar "IQR ÷ 1.35" rule.
Worked example
A trial reports length of hospital stay for 60 patients as median 6 days (IQR 4 to 9).
- Weight: w = 0.7 + 0.39/60 = 0.7065.
- Mean ≈ 0.7065 × (4 + 9)/2 + 0.2935 × 6 = 6.35 days.
- z = Φ⁻¹((0.75 × 60 − 0.125)/(60 + 0.25)) = 0.6583.
- SD ≈ (9 − 4) / (2 × 0.6583) = 3.8 days.
These numbers come from the same code as the free effect size converter, which also checks your inputs and shows the source for each method.
Check for skew first
In the example, the median is 2 days above Q1 but 3 days below Q3, so the data lean to the right. That is common for length of stay and is exactly where the estimate is least reliable. Before converting:
- Compare (Q3 − m) with (m − Q1). Clearly unequal distances suggest skew.
- Think about the outcome. Times, costs and counts are often skewed; many physiological measurements are not.
- If several studies are skewed, consider presenting them separately or asking a statistician about other methods.
- Always run a sensitivity analysis with the converted studies removed.
How to report it
In your methods, state which studies were converted, which formulas you used (cite Wan et al., 2014 and Luo et al., 2018), and the sensitivity analysis. In your data extraction sheet, keep the original median and IQR next to the estimates.
Sources
Wan X, Wang W, Liu J, Tong T. Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile range. BMC Med Res Methodol 2014;14:135. Luo D, Wan X, Liu J, Tong T. Optimally estimating the sample mean from the sample size, median, mid-range, and/or mid-quartile range. Stat Methods Med Res 2018;27:1785–1805. Higgins JPT, Li T, Deeks JJ. Chapter 6: Choosing effect measures and computing estimates of effect. In: Cochrane Handbook for Systematic Reviews of Interventions.
Frequently asked questions
Can I convert a median and IQR to a mean and SD?
Yes, as an estimate. Common methods are Luo et al. (2018) for the mean and Wan et al. (2014) for the SD. The estimate assumes the data are roughly normally distributed, so check for skew and run a sensitivity analysis without converted studies.
What is the formula for SD from the IQR?
SD ≈ (Q3 − Q1) / (2 × z), where z = Φ⁻¹((0.75n − 0.125)/(n + 0.25)) (Wan et al., 2014). For large samples z approaches 0.6745, so SD ≈ IQR / 1.35.
When should I not convert a median to a mean?
When the data are clearly skewed, for example lengths of stay, costs or biomarkers with long tails. A large difference between (Q3 − median) and (median − Q1) is a warning sign. Consider analysing medians separately or seeking statistical advice.
Is it acceptable to estimate the SD from the range?
Only as an exploratory step. The Cochrane Handbook advises against routinely estimating an SD from the range, because the range depends heavily on sample size and extreme values.
