Bootstrap Confidence Interval Calculator

Estimate confidence intervals using bootstrap resampling

About Bootstrap CI

Percentile: Uses quantiles of bootstrap distribution directly.

Basic: Reflects bootstrap distribution around original estimate.

Normal: Uses bootstrap SE with normal approximation.

BCa: Bias-corrected and accelerated (most accurate but complex).

What Is Bootstrap Confidence Interval?

Bootstrap confidence intervals are a non-parametric resampling technique that estimates the uncertainty of any statistical estimate without assuming a specific underlying distribution. Introduced by Bradley Efron in 1979, the bootstrap works by repeatedly drawing random samples with replacement from the original dataset to create thousands of simulated datasets, computing the statistic of interest on each, and using the distribution of those statistics to construct confidence intervals.

Unlike traditional CIs that rely on normal theory (mean ± 1.96 × SE), bootstrap CIs work for any statistic — means, medians, variances, standard deviations, interquartile ranges, percentiles, and even custom measures with no known sampling distribution. The method is particularly valuable when the underlying distribution is unknown, skewed, or when the sample size is too small for asymptotic approximations to hold.

This calculator performs bootstrap resampling for five different statistics (mean, median, variance, standard deviation, IQR) and reports four types of confidence intervals: percentile, basic, normal approximation, and bias-corrected — giving you a complete picture of estimation uncertainty.

How Bootstrap Resampling Works

The bootstrap algorithm replaces theoretical derivations with computational power. For a dataset of n observations, each bootstrap sample draws n values randomly with replacement from the original data, computes the statistic, and repeats this process B times (typically 1000-5000) to build an empirical sampling distribution.

Bootstrap Percentile CI

CI = [θ*_(α/2), θ*_(1−α/2)] from sorted bootstrap estimates

Where:

  • B= Number of bootstrap resamples (100-10,000 typically); more B gives smoother estimates
  • θ*= Bootstrap estimate of the statistic computed from a single resample
  • θ*_(q)= The q-th quantile of the sorted bootstrap distribution
  • Îą= Significance level (e.g., 0.05 for 95% CI)

Understanding the Four CI Methods

Each bootstrap CI method provides a different perspective with varying assumptions. The choice of method depends on your data and the statistic being estimated.

MethodHow It WorksBest For
PercentileTakes (α/2) and (1−α/2) quantiles of bootstrap distributionGeneral purpose; works well when bootstrap distribution is symmetric
Basic2×θ − θ* quantiles; reflects distribution around original estimateWhen bootstrap distribution is biased or skewed
Normalθ ± 1.96 × bootstrap SE; assumes normality of θ*When the bootstrap distribution is approximately normal
Bias-CorrectedAdjusts percentile limits to account for bias in the original estimateWhen the bootstrap mean differs from the original estimate

The bootstrap bias (boot mean − original estimate) tells you whether your estimator tends to systematically over- or underestimate the population parameter. Small bias suggests the estimator is reliable; large bias may indicate a need for a different estimator or larger sample size. The bootstrap standard error provides a distribution-free measure of precision.

How to Use This Calculator

Set up your bootstrap analysis in four steps:

  1. Enter your data: Type or paste comma-separated numeric values. You need at least 3 observations for meaningful resampling. The calculator accepts integers and decimals.
  2. Choose a statistic: Select Mean, Median, Variance, Standard Deviation, or Interquartile Range from the dropdown. Each bootstrap run estimates the uncertainty in this specific statistic.
  3. Select bootstrap samples: Choose 500, 1000, 2000, or 5000 resamples. More samples produce smoother results but take longer to compute. For quick exploration, 500-1000 is sufficient.
  4. Set confidence level: Pick 90%, 95%, or 99% based on your desired certainty. Read the CI from four different methods and check the bias and bootstrap SE.

Real-World Applications

Bootstrap confidence intervals are indispensable in modern data science and machine learning, where model evaluation metrics like AUC, F1 score, or RMSE often lack closed-form standard errors. Bootstrapping provides valid CIs for these complex statistics, enabling rigorous model comparison without distributional assumptions.

In econometrics and finance, bootstrap methods estimate the uncertainty of risk measures like Value-at-Risk, Sharpe ratios, and Gini coefficients — statistics for which analytic variance formulas are either unavailable or depend on strong assumptions. In environmental science, bootstrap CIs quantify uncertainty in biodiversity indices, pollution concentration estimates, and extreme event probabilities from limited field data.

In medical statistics, bootstrap methods estimate CIs for survival probabilities, hazard ratios, and cost-effectiveness ratios where parametric assumptions are questionable. In psychometrics, bootstrapping assesses the stability of factor loadings, reliability coefficients, and mediation effects with small samples.

Worked Examples

Median Income Confidence Interval

Problem:

An economist studies household incomes (in $1000s): 45,52,38,95,42,48,250,51,47,44. The distribution is right-skewed with one outlier. Bootstrap a 95% CI for the median using 1000 resamples.

Solution Steps:

  1. 1Step 1: Enter data: 45,52,38,95,42,48,250,51,47,44. Select statistic = Median, B = 1000, CL = 0.95.
  2. 2Step 2: The original median = (47+48)/2 = 47.5. The mean would be skewed by the 250 outlier, but the median is robust.
  3. 3Step 3: Bootstrap resampling draws 1000 samples of size 10 with replacement, computes each median, and sorts them.
  4. 4Step 4: The 2.5th and 97.5th percentiles of the bootstrap median distribution form the percentile CI. Normal, basic, and bias-corrected CIs provide alternative perspectives.

Result:

The bootstrap percentile 95% CI for the median is approximately [42, 72], reflecting the right skew in the data. The original median of 47.5 is a point estimate; the CI tells us the true population median likely lies between roughly 42 and 72 thousand dollars.

Standard Deviation of Small Sample

Problem:

A quality engineer measures 8 component lengths (mm): 10.2,9.8,10.5,10.0,9.9,10.3,10.1,10.4. Bootstrap the 95% CI for the standard deviation with 2000 resamples.

Solution Steps:

  1. 1Step 1: Enter the 8 measurements, select statistic = Std, B = 2000, CL = 0.95.
  2. 2Step 2: Original sample SD = 0.25 mm. With only 8 observations, the exact distribution of the sample SD is complex (chi-related).
  3. 3Step 3: Bootstrap creates 2000 resampled datasets and computes each sample SD from the resampled data.
  4. 4Step 4: The bootstrap distribution of SDs reveals the sampling uncertainty. The percentile CI captures the middle 95% of this distribution.

Result:

The bootstrap percentile 95% CI for the standard deviation is approximately [0.13, 0.33] mm. Despite the small sample, the CI is reasonably narrow, confirming that the process SD is well under 0.5 mm — an important finding for capability analysis.

IQR for Skewed Data

Problem:

Response times (ms) from a web server: 120,145,132,890,156,140,148,135,160,155,150,142. A few slow responses skew the data right. Bootstrap 95% CI for the IQR.

Solution Steps:

  1. 1Step 1: Enter the 12 response times, select statistic = IQR, B = 1000, CL = 0.95.
  2. 2Step 2: Original IQR: sort → Q1 ≈ 137.5, Q3 ≈ 155, IQR = 17.5 ms. The IQR is less sensitive to the 890 outlier than the SD.
  3. 3Step 3: Each bootstrap sample reorders the data, and the IQR varies depending on which values are resampled.
  4. 4Step 4: The bootstrap percentile CI for the IQR shows how much the IQR estimate varies due to sampling.

Result:

The bootstrap percentile 95% CI for the IQR is approximately [8, 30] ms. The lower bound is well above zero, confirming that there is genuine variability in response times beyond measurement noise. The relatively wide CI reflects the small sample size and the presence of an outlier.

Tips & Best Practices

  • ✓Use at least 1000 bootstrap samples for published results — 500 is fine for quick exploration but may have visible Monte Carlo noise.
  • ✓Check the bootstrap bias: if it exceeds 25% of the SE, your estimator may need adjustment or the sample may be too small.
  • ✓The percentile CI is the default workhorse method — use it unless the bootstrap distribution is heavily skewed or biased.
  • ✓Bootstrap works best with n ≥ 10 — with fewer observations, the resampled datasets lack sufficient variability.
  • ✓The BCa CI (simplified version) adjusts for bias — compare it with the percentile CI to check for consistency.

Frequently Asked Questions

For confidence intervals, 1000 bootstrap samples is the standard minimum, and 2000-5000 is recommended for stable quantile estimates. More samples reduce Monte Carlo error but increase computation time. The theoretical lower bound is about 100 for basic estimates, but the tail quantiles (2.5%, 97.5%) require more samples for precision because they are based on fewer observations in the sorted bootstrap distribution.
The bootstrap assumes that your sample is representative of the population (i.i.d. data) and that the statistic of interest changes smoothly with the data. It does not assume normality or any specific distribution. However, the bootstrap can fail for very small samples (n < 8), for the minimum or maximum of a distribution, or when the data has complex dependence structures (time series, clustered data) that require specialized bootstrap variants.
The percentile method is the most commonly used and works well when the bootstrap distribution is roughly symmetric. The bias-corrected (BCa) method is theoretically superior — it adjusts for both bias and skewness — but is more complex. The normal approximation method is the simplest but assumes the bootstrap distribution is normal. In practice, report the percentile CI as your primary result and check whether the basic and BCa methods agree; if they diverge substantially, the estimate may be unreliable.
Bootstrap bias is the difference between the mean of the bootstrap estimates and the original sample estimate. Small bias is common and usually not a concern. Large bias (>25% of the SE) suggests your estimator may be biased for this dataset, and you might consider bias correction or a different estimator. Bias can also indicate that the bootstrap is not appropriate — for example, with heavy-tailed distributions or when n is very small.
Most statistics can be bootstrapped, but some require caution. The bootstrap works well for means, medians, variances, correlations, regression coefficients, and quantiles. It struggles with the minimum/maximum (the bootstrap cannot generate values beyond the observed range), with very small samples, and with statistics that are not smooth functions of the data. For time series and clustered data, use block bootstrap or cluster bootstrap variants.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Bootstrap Confidence Interval Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.