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.
3. Results
Enter planning assumptions and select Calculate.
Suggested sample-size wording
Recommended sensitivity analysis: Examining plausible alternative working-distribution assumptions is highly recommended. If completed, add: “Alternative working-distribution assumptions were examined in sensitivity analyses.”
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: 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.
Technical results
Method references
- 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.
- David HA, Nagaraja HN. Order Statistics. 3rd ed. Wiley; 2003.
- 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.
- 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/.