Notes · methods

Getting a mean and SD from a median and IQR: when it holds, when it lies

2026-07-10

It’s 11pm, the trial you’re extracting reports the outcome as a median with an interquartile range, and your model wants a mean and a standard deviation. The paper never prints either. Before you reach for the conversion, notice the tension: authors usually report a median precisely because the data are skewed. The standard conversion assumes they aren’t.

The estimator family

The workhorse is Wan et al. (2014, BMC Med Res Methodol 14:135), scenario C2: median (m), first and third quartiles (Q1, Q3), and sample size n. The mean estimate is the simple centre of the three quantiles:

mean ≈ (Q1 + m + Q3) / 3

Luo et al. (2018, Stat Methods Med Res) refined this with sample-size-dependent weights; for median+IQR the difference is small, so the equal-weight form above is the usual reporting choice. The SD is where the work is:

SD ≈ (Q3 − Q1) / (2 × Φ⁻¹((0.75n − 0.125) / (n + 0.25)))

Φ⁻¹ is the inverse standard normal CDF. Because Φ⁻¹(0.75) = 0.6745, for large n the whole denominator collapses to 1.35, giving the back-of-envelope form SD ≈ IQR / 1.35. The n-correction matters below ~50 per arm.

A worked example

Suppose a trial reports a median of 8.4, an IQR of 5.9 to 11.2, and n = 50 per arm.

mean ≈ (5.9 + 8.4 + 11.2) / 3 = 25.5 / 3 = 8.50

For the SD, the quantile argument is:

(0.75 × 50 − 0.125) / (50 + 0.25) = 37.375 / 50.25 = 0.7438
Φ⁻¹(0.7438) = 0.655

SD ≈ (11.2 − 5.9) / (2 × 0.655) = 5.3 / 1.310 = 4.05

So 8.50 ± 4.05 goes into your effect-size sheet, not 8.4, and not IQR / 1.35 = 3.93, which quietly ignores the small-sample correction.

When the conversion is a lie

Wan/Luo assume an approximately normal underlying distribution. Two cheap checks tell you whether that assumption survives contact with the data.

Symmetry. Compare the two halves of the IQR: m − Q1 against Q3 − m. In the example that’s 2.5 vs 2.8: close, so a symmetric approximation is fair. A ratio far from 1 signals skew.

The floor test. For a strictly non-negative outcome (a biomarker, a count, a time), check whether the recovered distribution implies impossible values: is mean − 2·SD < 0? Here 8.50 − 8.10 = 0.40, still positive: plausible.

Now a skewed case: median 3.0, IQR 1.2 to 8.5. The halves are 1.8 vs 5.5: heavily right-skewed. The formulas return mean ≈ 4.23, SD ≈ 5.41, and mean − 2·SD = −6.6 for a quantity that cannot go below zero. The conversion has manufactured a number that describes no real distribution. Pooling it as a mean difference imports that distortion into every downstream estimate.

When the checks fail, don’t convert-and-hope. Either meta-analyse the medians directly (McGrath et al., 2019, Statistics in Medicine, and the metamedian package) or carry the trial through a sensitivity analysis both ways. The Cochrane Handbook (§10.5.3, Meta-analysis of skewed data) is explicit that skewed continuous data can mislead a meta-analysis.

Flagging it in your record

A recovered mean and SD are not the same object as reported ones, and a statistical reviewer will ask which they are. Whatever holds your extraction, record the method by name (Wan 2014 C2), the exact inputs (m, Q1, Q3, n), the symmetry and floor checks with their results, and a derived marker on the value itself. “We estimated the mean and SD from the median and IQR via Wan (2014); the median sat symmetrically within the IQR and the implied lower bound stayed above zero” is a complete answer two years later. It’s also the kind of provenance worth capturing automatically, alongside the source quote, rather than reconstructing from memory at revision.