Math calculator

Bootstrap Confidence Interval Calculator

Four intervals, and what each really covers.

Four intervals, one resample set

For the mean the percentile interval is [1.2700, 2.7850] and BCa is [1.3847, 3.3680] — the upper limit differs by 0.58. The basic interval runs the other way entirely, to [0.9950, 2.5100]. Same 4,000 resamples, three answers.

4,000 resamples of n = 20

BCa 95% CI: 1.3847 to 3.3680

The observed mean is 1.89000. The percentile interval is [1.2700, 2.7850] and the basic interval [0.9950, 2.5100]. They differ by up to 0.5830 at an endpoint, which is the bootstrap distribution telling you it is not symmetric — bias correction z₀ = 0.1345, acceleration 0.12086.

Observed

1.89000

bias -0.00444

Bootstrap SE

0.40566

SD of the resample distribution

Bias correction z₀

0.13451

0 if perfectly symmetric

Acceleration

0.12086

from the jackknife skewness

Four 95% intervals from the same resample set, with what each corrects for
MethodLowerUpperWidthWhat it corrects for
Normal1.09492.68511.5902nothing — assumes the estimator is normal
Percentile1.27002.78501.5150shape, but not bias
Basic0.99502.51001.5150bias, by reflecting — which can push it outside the data
BCa1.38473.36801.9833bias and skewness — the best of the four, and still not exact

The bootstrap distribution

observedBCaBCa1.083.77

What these intervals actually cover

Measured by drawing from a lognormal, whose true mean is 1.6487212707, and counting how often each nominally-95% interval contains it.

Measured coverage of five nominally 95% intervals at two sample sizes
Methodn = 20, 1,500 repsn = 100, 1,000 reps
Bootstrap basic82.60%89.60%
Bootstrap normal84.27%90.80%
Bootstrap percentile85.07%91.40%
Student t85.87%91.30%
Bootstrap BCa87.20%92.90%

Every method undercovers, and BCa is only the least bad — 7.8 points short at n = 20 and 2.1 short at n = 100. The bootstrap does not rescue a skewed small sample; it is an asymptotic method, and twenty observations from a lognormal is not asymptotic.

Seeded, so the same input gives the same interval BCa needs n jackknife refits, which is why it is not free It cannot invent data the sample does not contain

What this tool shows

Drawing from a lognormal at n = 20, a nominally 95% bootstrap interval achieves 82.60% by the basic method, 85.07% by percentile and 87.20% by BCa. A Student t interval on the same data manages 85.87%. Every one of them undercovers; BCa is only the least bad, and it is still nearly eight points short. The bootstrap is an asymptotic method, and twenty observations from a skewed distribution is not asymptotic.

  • Normal, percentile, basic and BCa intervals from one seeded resample set
  • The bias correction z₀ and the jackknife acceleration, printed rather than hidden
  • The bootstrap distribution plotted, with the observed value and BCa limits marked
  • Mean, median, 10% trimmed mean or standard deviation as the statistic
  • Measured coverage for all five approaches at n = 20 and n = 100
  • A seeded generator, so the same input always gives the same interval
Four methods BCa included Measured coverage Seeded and reproducible

The bootstrap cannot invent data the sample does not contain.

Updated 12 September 2026 · Works in any browser, no installation

The bootstrap estimates the sampling distribution of a statistic by resampling your own data with replacement, thousands of times, and reading the interval off the spread of the results. It works for statistics with no closed-form standard error — a median, a trimmed mean, a ratio — which is its real advantage over a textbook interval. What it does not do is fix a sample that is too small or too skewed.

At a glance

Formula shown
Draw B samples of size n with replacement, compute the statistic in each. The percentile interval takes the α/2 and 1−α/2 quantiles of those B values. The basic interval reflects them: [2θ̂ − upper, 2θ̂ − lower]. BCa adjusts the quantiles taken, using a bias correction z₀ = Φ⁻¹(share of resamples below θ̂) and an acceleration a from the jackknife skewness, replacing α/2 with Φ(z₀ + (z₀ + z_{α/2})/(1 − a(z₀ + z_{α/2}))).
Scenario support
Confidence intervals for medians, trimmed means, ratios and correlations; small samples where normality is doubtful; any statistic whose standard error has no formula; and checking whether a textbook interval is trustworthy for the data you actually have.
Educational estimate
Planning support from the values you enter — not professional advice.

Measured: none of them reaches 95% on skewed data

Coverage is the only test that matters for an interval, and it is measurable: draw from a distribution whose true mean you know, and count.

Lognormal(0, 1), true mean exp(0.5) = 1.6487212707, n = 20, 1,500 replications. Basic 82.60%, bootstrap normal 84.27%, percentile 85.07%, Student t 85.87%, BCa 87.20%. All nominally 95%.

BCa wins and is still 7.8 points short. It is the only method that corrects for both bias and skewness, and on data this skewed that correction is worth about two points over percentile and nearly five over basic.

At n = 100 the gap narrows but does not close: 89.60, 90.80, 91.40, 91.30, 92.90. BCa is 2.1 points short, and the ordering is unchanged.

The basic interval is the worst at both sizes, because reflecting a skewed distribution around the point estimate moves the interval in the wrong direction — and can push an endpoint outside the range the data supports.

None of this is an argument against the bootstrap. It is an argument against reporting a bootstrap interval as though the number on the label were achieved. On this data every method is closer to a 90% interval than a 95% one.

The four methods correct for different things

They all use the same B resamples. They differ only in what they do with the resulting distribution, and on symmetric data they coincide.

The normal interval uses only the bootstrap standard error — θ̂ ± 1.96 SE — which throws away everything the bootstrap learned about the shape.

The percentile interval takes the 2.5th and 97.5th percentiles directly, so it respects the shape but assumes the bootstrap distribution is centred on the truth.

The basic interval reflects those percentiles around the estimate, which corrects for bias in the opposite direction and is the method most likely to produce an endpoint that makes no sense — a negative variance, a probability above 1.

BCa shifts WHICH percentiles are taken. z₀ measures how far off-centre the bootstrap distribution is, the acceleration measures its skewness, and together they move the quantiles to compensate. The tool prints both so you can see when they are doing work: the symmetric preset has an acceleration of 0.00503, effectively zero.

The cost is n extra refits for the jackknife, which is why BCa is not the default in every package even though it is usually the best of the four.

It cannot invent data the sample does not contain

The bootstrap resamples what you have. Anything the sample missed stays missed, and this shows up in three specific ways.

The maximum and minimum are hard ceilings. A bootstrap interval for the maximum of a distribution can never exceed the largest value observed, so it is badly wrong by construction. Extremes are where the bootstrap fails outright.

Small samples give a granular distribution. With n = 8 there are only so many achievable resample means, and the interval endpoints step between them rather than varying smoothly — visible in the tool’s fourth preset.

If the sample missed the tail, so will the interval. Twenty draws from a heavy-tailed distribution will usually not include a value from the far tail, and no amount of resampling will conjure one.

The resampling assumes independence. Time-series and clustered data need a block or cluster bootstrap; resampling individual observations destroys the dependence structure and gives an interval that is far too narrow.

How many resamples, and why the seed matters

Two separate sources of error live in a bootstrap interval, and only one of them shrinks with B.

Monte Carlo error comes from using B resamples rather than all of them, and it falls as 1/√B. A thousand is enough for a standard error; a few thousand for a percentile interval; more for the extreme quantiles BCa sometimes needs.

Statistical error comes from having n observations rather than the population, and no value of B touches it. Running a million resamples on twenty points gives a very precise estimate of the wrong thing.

This tool uses 4,000 and a fixed seed. The seed is not cosmetic: an interval that changes every time you look at it cannot be put in a paper, and a reader who reruns it should get your number.

Which means reporting the seed and B is part of reporting the interval, in the same way that reporting n is.

Against the t interval and the permutation test

Three resampling-adjacent tools that answer different questions, and choosing badly between them is common.

The t interval is better when its assumptions hold — it is exact for normal data at any n, where the bootstrap is only asymptotic. On the measured lognormal it beat percentile and basic at both sample sizes.

The bootstrap wins when there is no formula. A median, a trimmed mean, a ratio of two estimates, the difference between two correlations: the t interval has nothing to offer and the bootstrap does.

A permutation test is for a hypothesis, not an interval. It is exact rather than asymptotic, because it enumerates rearrangements of the observed data rather than resampling from it — a genuinely different argument.

The two are often confused because both “resample”. Permutation samples WITHOUT replacement under a null; the bootstrap samples WITH replacement under no null at all. The first gives a p-value, the second an interval.

Reporting a bootstrap interval

Four things, and the first is the one most often left off.

Name the method. Percentile, basic and BCa give different intervals from the same resamples, and “bootstrap 95% CI” does not say which.

Give B and the seed. They are what make the number reproducible, and they cost half a line.

Give n. The bootstrap’s guarantees are asymptotic, so the reader needs to know how far from asymptotic you were.

And say what statistic you bootstrapped. A bootstrap interval for a median and one for a mean answer different questions about the same data, and on skewed data they will not overlap.

Sources and methodology

References for the bootstrap and its interval methods.

Method. All four intervals come from ONE set of resamples, which is what makes their disagreement a property of the methods rather than of sampling noise. BCa’s bias correction is computed from the share of resamples strictly below the observed statistic, clipped to 1/(2B) at each end so a degenerate case cannot produce an infinite z₀, and the acceleration from a full leave-one-out jackknife rather than an approximation. The generator is mulberry32 with a fixed seed, so the same input always produces the same interval. The coverage figures quoted on this page are measurements, not citations: draws from Lognormal(0, 1) whose true mean is exp(0.5) = 1.6487212707, 1,500 replications at n = 20 and 1,000 at n = 100, counting how often each nominally-95% interval contained it. Fewer than three values, and any non-finite value, return no result. That engine is verified on every change against 95 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Confidence IntervalIntervals for a mean or a proportion using t at every sample size and Wilson rather than the textbook Wald formula — with both methods shown, because Wald returns [0,0] at zero successes.
Permutation TestEnumerates every split below 400,000 — two groups of ten is 184,756 of them — so the p-value is a ratio of two integers with no distribution assumed anywhere.
Prediction IntervalFor the next single observation, printed beside the confidence interval: the confidence factor goes to zero as n grows while this one converges to 1.95996 and stops.
Standard ErrorStandard error of a mean or proportion, printed beside the standard deviation it gets confused with — the ratio is always √n, and at n = 50 that is a factor of seven.
Mean, Median and ModeAll three centres marked on your own data, every mode rather than just the first, and the mean-median gap read as a direct measure of skew.
Trimmed MeanTrimmed and Winsorized means at any fraction, plotted across the full sweep — because a 0% trim is the arithmetic mean and a 50% trim is exactly the median, so the trim fraction is a dial between them.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. Bootstrap intervals are asymptotic: on skewed data at n = 20 a nominally 95% interval achieves between 82.6% and 87.2% depending on the method, so the label overstates the guarantee. The bootstrap also cannot recover information the sample does not contain, which makes it unsuitable for extremes and for dependent data without a block or cluster scheme.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (5 updates)

Published 12 September 2026

  1. Published a bootstrap tool that computes all four intervals — normal, percentile, basic and BCa — from ONE seeded resample set, so any disagreement between them is a property of the methods rather than of sampling noise.
  2. Measured what they actually cover instead of quoting the label. Drawing from a lognormal whose true mean is exp(0.5) = 1.6487212707, at n = 20 with a nominal 95%, the achieved coverage is basic 82.60%, bootstrap normal 84.27%, percentile 85.07%, Student t 85.87% and BCa 87.20%. Every method undercovers and BCa is only the least bad.
  3. Showed the convergence rather than implying it: at n = 100 the same five reach 89.60, 90.80, 91.40, 91.30 and 92.90. The bootstrap is asymptotic, and twenty observations from a skewed distribution is not asymptotic.
  4. Printed the bias correction z₀ and the jackknife acceleration, so a reader can see when BCa is doing real work — 0.00503 on the symmetric preset, effectively nothing.
  5. Seeded the generator. A bootstrap interval that changes every time you look at it cannot be put in a paper, and the suite asserts both that the same seed reproduces it and that a different seed does not.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.