Bootstrap Confidence Interval Calculator
Bootstrapping resamples your data thousands of times to build a confidence interval for any statistic, even ones with no closed-form formula (medians, ratios, custom functions). Paste your numbers, pick a statistic, and get normal, percentile, basic, and BCa intervals side by side. Every interval matches R's boot package, and nothing leaves your browser.
I want to bootstrap the using the BCa method at 95%.
New to bootstrapping? Read the 4-min primer
What the bootstrap does. Resample your data with replacement many times, recompute the statistic on each resample, and use the spread of those values as a stand-in for the sampling distribution. The bootstrap turns "I have one sample" into "here is what the statistic would have looked like across many samples", without assuming a parametric form.
Three ways to get the CI from the resamples. The percentile CI sorts the bootstrap distribution and takes the α/2 and 1−α/2 quantiles. The basic CI (reverse percentile) reflects the distribution about the original estimate. The BCa method adjusts for bias and skewness using a jackknife-derived acceleration; it is the best-practice default for moderately skewed statistics.
Bias and SE. Bias is the mean of the bootstrap distribution minus the original statistic; if it is large relative to the SE the parametric CI is suspect. The bootstrap SE is the sd of the bootstrap distribution and is a drop-in replacement for the analytic standard error.
When the bootstrap struggles. Very small n (under 10), heavy-tailed data where the variance is infinite, or statistics that depend on a single extreme order value (like the maximum). For those cases, increase B, use BCa rather than percentile, and treat the CI as approximate.
Small samples, skewed distributions, or non-standard statistics where the parametric CI is unreliable or undefined.
e.g. a CI for the median of a heavy-tailed cost variable, or the IQR of response times.
xraw data, one value per lineθstatistic to bootstrapBresamples, method, level, and a seed
Enter data to see the interval
| method | lower | upper | width |
|---|
InferenceEnter data above to see a plain-English conclusion.
How this is computed
✓ No data leaves your browser
✓ Verified against R's boot::boot.ci()
✓ Free, no sign-up
The bootstrap math, end to end
One resampling loop, four ways to read the interval. Here is what happens between the numbers you paste and the bounds above.
set.seed(seed); boot() would, and every interval matches boot.ci().boot.ci() this tool uses boot's default: the regression estimate of influence when B ≥ n, and the leave-one-out jackknife when B < n. BCa is second-order accurate and almost always preferable to percentile when the distribution is skewed.When the bootstrap is the wrong tool
| If you have... | Use instead |
|---|---|
| n < 10 with no model | The bootstrap needs enough information in the sample to mimic the population. With n < 10 the resamples are too repetitive. Try a fully parametric model with a likelihood-based CI. |
| A statistic depending only on the maximum or minimum | Order-statistic-driven statistics have non-smooth sampling distributions; the bootstrap can be inconsistent. Use extreme-value asymptotics or subsampling. |
| Time-series or autocorrelated data | The independent-resample assumption is broken. Use a block bootstrap (moving / circular / stationary) sized to the autocorrelation range. |
| A simple mean of mildly normal data | The parametric t-CI is exact under normality, faster, and gives the same answer to two decimals. Use the Confidence Interval Calculator. |
| Heavy-tailed data with infinite variance (Cauchy-like) | The bootstrap will systematically underestimate the spread. Use a truncated-mean estimator or a robust scale (MAD). |
| A regression coefficient | The bootstrap CI is fine, but for clean inference use the model-based CI. For non-Gaussian residuals, a residual or wild bootstrap is preferred. |
Frequently asked questions
When should I use a bootstrap CI instead of a t-interval?
Use a bootstrap CI when the sampling distribution is not normal, the statistic is non-standard (median, ratio, percentile), or the sample is too small for the central limit theorem to kick in. Bootstrap is also the only practical option for many ML metrics like AUC or F1. Skip it when n is very small (under 20) or the data has heavy outliers.
What is the difference between percentile, BCa, and basic intervals?
Percentile uses the 2.5th and 97.5th quantiles of the bootstrap replicates, simple but biased for skewed statistics. BCa (bias-corrected and accelerated) adjusts for both bias and skew and is the preferred default. Basic (reverse percentile) reflects the percentiles around the original estimate. Normal uses the bootstrap standard error with a bias correction. The calculator shows all four side by side, and they match R's boot.ci() exactly.
How many bootstrap resamples do I need?
For confidence intervals, 2,000 resamples is the practical minimum and 10,000 is standard. For BCa or bootstrap hypothesis tests, use at least 5,000. The calculator runs 2,000 by default and lets you raise B up to 50,000; because it reproduces R's random-number generator exactly, the same seed and B give the same interval every time.
Why does BCa sometimes fall back to the percentile interval?
BCa needs a finite bias correction (z0) and acceleration (a). When the bootstrap distribution is degenerate, for example when every value is identical or a huge share of resamples land on the same value, z0 or a is not finite and BCa is undefined. The calculator detects this and shows the percentile interval instead, with a note.
Does this calculator match R's boot package?
Yes. It reproduces R's Mersenne-Twister and the R_unif_index sampler, so set.seed(seed); boot() draws the identical resamples. The normal, basic, and percentile intervals use boot's norm.inter interpolation, and BCa uses the Efron (1987) bias correction with the regression estimate of empirical influence when B ≥ n and the jackknife when B < n, matching boot::boot.ci(). Verified against R 4.6.0.
Go deeper
Numerical accuracy: R's Mersenne-Twister and R_unif_index resampling, reproduced exactly; the normal, basic, and percentile CIs use boot's norm.inter interpolation; BCa uses the Efron (1987) bias correction with the regression estimate of empirical influence when B ≥ n and the jackknife when B < n, matching boot::boot.ci(). Verified against R 4.6.0 to 1e-8 across every method.