Non-parametric Methods · MED-CI

Sample Size for Estimation of One Population Median

Estimate the independent observations needed for a chosen approximate two-sided confidence-interval width for a continuous population median.

1. Information obtained from previous study / literature

Select the shape that best approximates the anticipated outcome distribution.

Expected population SD from prior evidence. Variance V = SD² is derived automatically.

Estimate planning SD from published summaries

1. What did the previous study report?

2. Enter the published values

3. Estimate and use the SD

2. Information decided by the researcher

Total two-sided interval width; margin of error is half this value.

3. Results

Enter planning assumptions and select Calculate.

Formula, assumptions, limitations, and methodological note

Example clinical scenario

A hospital wants to estimate median emergency-department waiting time with a confidence interval narrow enough for service planning. The skewed outcome makes the population median the primary summary.

Formula and methodological note

Working-distribution shapes

Normal working distributionIllustrative standardized Normal density, symmetric with light tails.
NormalSymmetric with light tails.Illustrative standardized shape; not fitted to your data.
  • Normal: skewness 0; kurtosis 3.
  • Logistic: skewness 0; kurtosis 4.2.
  • Laplace: skewness 0; kurtosis 6.
  • Gamma (shape = 5): skewness approximately 0.89; kurtosis 4.2.
  • Exponential: skewness 2; kurtosis 9.

n = Cdist × V × (z/w)², where Cdist = 1/[s²f(m)²]. Full-precision theoretical constants are used: 2π for Normal, 48/π² for Logistic, 2 for Laplace, approximately 5.7988412855 for Gamma (shape = 5), and 4 for Exponential. The analysable result is rounded up first; adjustment then uses ceil(n/(1−r)).

The older statpsych constants—6.28, 4.66, 2.00, 5.90, and 4.00—are retained only as documented compatibility benchmarks and are not used to calculate the displayed sample size.

A median alone is insufficient to reconstruct a standard deviation. Estimation requires quartiles, or a minimum and maximum together with the previous study’s sample size. Reconstructed SDs assume an approximately Normal distribution and should be checked in sensitivity analyses.

The SD helper uses Wan et al.'s sample-size-adjusted Normal estimators: range SD = (maximum−minimum)/ξ(n), quartile SD = (Q3−Q1)/η(n), and combined SD = half of each estimate.

Skewed, multimodal, heaped, discrete, or heavily tied outcomes may make this approximation unreliable. When the required analysable sample is below 20, the large-sample median approximation is especially uncertain; obtain statistical review and consider simulation or exact-coverage methods.

This calculation plans the asymptotic approximate numerical width of a confidence interval for a continuous population median. It is not a finite-sample width or assurance guarantee. The result depends on the assumed distribution and variance.

Assumes an independent random sample, a continuous outcome, a unique median, a credible planning SD, and a credible working-distribution choice. It is not for hypothesis tests, paired or clustered designs, censored survival medians, finite-population correction, or substantially discrete/tied outcomes.

These tools support research planning and do not replace statistical consultation.

Method references

  1. Bonett DG, Price RM. Statistical inference for a linear function of medians. Psychological Methods. 2002;7(3):370–383. doi:10.1037/1082-989X.7.3.370.
  2. David HA, Nagaraja HN. Order Statistics. 3rd ed. Wiley; 2003.
  3. 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 Medical Research Methodology. 2014;14:135. doi:10.1186/1471-2288-14-135.
  4. Bonett DG. statpsych: Statistical Methods for Psychologists. R package version 2.0.0. 2026. Legacy compatibility benchmark only. doi:10.32614/CRAN.package.statpsych.

Suggested citation

Yaacob, Najib Majdi. “Sample Size for Estimation of One Population Median (MED-CI).” Web calculator. NajibMY, 2026. Accessed July 29, 2026. https://najibmy.netlify.app/tools/sample-size/estimation-one-population-median/.