Przejdź do treści
Liczbnik

Confidence Interval Calculator

Enter the sample mean, standard deviation and sample size, choose a confidence level (90%, 95% or 99%), and the calculator returns the lower bound, upper bound and margin of error. A proportion mode is also available — enter the sample proportion p and sample size n.

Reviewed byRedakcja Liczbnik
Calculator
ResultUpper bound102.94
Lower bound
97.06
Margin of error (+/-)
2.94
z-value
1.96

How we calculate the confidence interval

For a mean: CI = x +/- z * (sigma / sqrt(n)), where x is the sample mean, sigma is the standard deviation, n is the sample size, and z is the standard normal quantile (1.645 for 90%, 1.96 for 95%, 2.576 for 99%). For a proportion: CI = p +/- z * sqrt(p*(1-p)/n). Proportion results are clamped to [0, 1].

Example: mean IQ, n=100, sigma=15, 95% confidence

For a sample of n=100 people with mean IQ 100 and standard deviation 15 at 95% confidence: margin of error = 1.96 * (15 / sqrt(100)) = 2.94. Confidence interval: [97.06; 102.94]. This means there is a 95% probability that the true population mean lies within this range.

Frequently asked questions

What is a confidence interval?

A confidence interval is a range of values that, with a given probability (e.g. 95%), contains the true population parameter (e.g. the mean). It does not mean that 95% of observations fall within the range; it means that the construction method produces a correct interval in 95% of repeated experiments.

What does a 95% confidence level mean?

A 95% confidence level means that if we repeatedly drew samples and computed confidence intervals, about 95% of those intervals would contain the true parameter. It is the standard level in social sciences and medicine.

What is the difference between a CI for a mean and a CI for a proportion?

The CI for a mean uses CI = x +/- z * (sigma / sqrt(n)) and is used when estimating a quantitative mean (e.g. height, income). The CI for a proportion uses CI = p +/- z * sqrt(p*(1-p)/n) and is used for percentage shares (e.g. voter turnout).

What is the margin of error?

The margin of error is half the width of the confidence interval: z * (sigma / sqrt(n)). It tells you how much the estimate may differ from the true value. The larger n or the smaller sigma, the smaller the margin.

How can I improve the accuracy of a confidence interval?

Increase the sample size n — the width of the interval decreases proportionally to 1/sqrt(n). To halve the margin, you need to quadruple the sample. Alternatively, choose a lower confidence level (e.g. 90% instead of 99%), which gives a narrower interval at the cost of lower certainty.

What is the difference between a confidence interval and a p-value?

A p-value tests the null hypothesis — it tells you whether a result is statistically significant. A confidence interval gives the range of plausible values for the parameter. Both are complementary: a CI provides more information because it also reveals the magnitude of the effect.

Indicative result

The result is for informational purposes only. The calculator assumes a normal distribution — for small samples (n<30) with unknown sigma use the t-distribution.
  • Sample Size Calculator

    Calculate the minimum sample size for surveys and research. Choose confidence level, margin of error and expected proportion — instant result, no sign-up required.

    Statistics
  • Z-Score Calculator

    Calculate the z-score (standardized value) and its corresponding percentile in the normal distribution. Enter the value, mean and standard deviation — instant result.

    Statistics
  • Standard Deviation Calculator

    Calculate standard deviation and variance for a sample or population. Enter numbers separated by commas — instant result, no signup needed.

    Statistics