Statistics & probability

Bootstrap confidence interval calculator from raw data

Resample observations to calculate percentile or basic bootstrap intervals for a mean or median, with seed and replicate controls.

Your numbers

Separate values with commas or spaces. Entries must be finite and within ±10¹²; missing values are not silently removed. Use 2–200 observations.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A nonparametric bootstrap treats the observed sample as an empirical population and resamples it with replacement. Each resample has the original sample size, and its mean or median becomes one replicate statistic. This page uses those statistics to construct a percentile or basic interval, calculate a bootstrap standard error and summarize estimated bias. A fixed seed makes the particular Monte Carlo experiment reproducible without claiming that its endpoints are exact population quantities.

THE FORMULAPercentile: [q*_(α/2),q*_(1−α/2)]; basic: [2θ̂−q*_(1−α/2),2θ̂−q*_(α/2)].

A worked example

The default observations 1,2,4,8,10 have sample mean five. With 1,000 replicates, xorshift32 seed 123 and the percentile method at nominal 95%, the interval endpoints are two and eight. A replicate may repeat ten several times or omit it entirely because sampling is with replacement. Changing the replicate count or seed can change the empirical tail quantiles and therefore the reported endpoints.

Good to know

Supports 2–200 observations and 200–10,000 seeded replicates. Only percentile and basic intervals for a mean or median are implemented; BCa is not. These are approximate intervals, not guaranteed finite-sample coverage statements. Observations should be independent and representative. Clustered or time-dependent data need suitable resampling units. Small, tied or constant samples can give unstable or degenerate intervals.

Resampling does not manufacture new population information

A bootstrap sample contains only values that already appeared in the observations. Repetition and omission mimic variation under the empirical distribution; they cannot reveal an unobserved tail or repair a biased sampling process. If every observation equals seven, every replicate mean and median also equals seven. A zero-width interval in that case describes a degenerate empirical resampling experiment rather than certainty about the population.

The sample size stays fixed within each replicate. Drawing fewer observations would describe a different resampling procedure. The statistic is recomputed from each full resample, which is particularly important for a median because it cannot be recovered by averaging selected original ranks. Quantiles use linear interpolation between ordered replicate statistics, so another package with a different quantile convention may return slightly different endpoints.

The default seeded percentile interval spans two through eight around an observed mean of fiveMean 5; percentile interval [2,8]258Resample: 1,1,2,4,10 → mean 3.6
For values 1,2,4,8,10, the sample mean is five. One thousand resamples with seed 123 give percentile endpoints two and eight at nominal 95%. The displayed resample is illustrative, not necessarily the first seeded replicate.

The Mean and proportion confidence interval calculator uses parametric formulas. This page instead resamples the raw observations to approximate statistic uncertainty.

Interval construction and Monte Carlo precision are separate choices

A percentile interval takes the replicate distribution’s tail quantiles directly. A basic interval reflects those quantiles around the original estimate and can extend outside the observed data range. Neither method automatically provides the bias and acceleration correction of BCa. Choose the interval method for the statistical problem before interpreting the endpoints; a narrower interval alone does not establish that a method is more accurate.

More replicates reduce Monte Carlo noise but do not remove sampling bias or dependence. Keep the seed and replicate count with the result so a calculation can be reproduced, and avoid searching seeds for favorable endpoints. The reported standard error is the sample standard deviation of replicate statistics, while the reported bias is their mean minus the original estimate. Those summaries do not certify the nominal interval coverage.

A few questions, answered

Can I bootstrap repeated observations from one person as independent rows?

Not automatically. The independent resampling unit must match the design; clustered or dependent observations usually require a different bootstrap scheme.

Why do percentile and basic intervals differ?

They transform the replicate quantiles differently. The basic method reflects them around the original estimate, while the percentile method uses them directly.

Find your calculator

Start typing to explore the library.