Skip to main content

Confidence intervals & samples

Confidence Interval Calculator

Z-based interval and margin of error for the population mean from n, xΜ„, and Οƒ or s.

By Jeff Beem

Updated

Sample data & confidence

Population (Οƒ) or sample (s) standard deviation.

Result
Plus/Minus22.8000 Β± 0.5292
Percentage margin22.8000 Β± 2.32%
Interval[22.2708 – 23.3292]
Z (critical value)Z = 1.9600 (95%)

How it was calculated

22.8000 Β± 1.9600 Γ— (2.7000 / √100) = 22.8000 Β± 0.5292

xΜ„ Β± Z Γ— (Οƒ / √n). Margin of error (MoE) = Z Γ— (Οƒ / √n).

Using this calculator

Defaults: n = 100, xΜ„ = 22.8, Οƒ = 2.7, 95% β†’ interval about [22.271, 23.329]. Enter your own n, mean, and Οƒ or s; pick a confidence level for the Z cutoff and margin of error.

Example: n = 100, xΜ„ = 22.8, 95% confidence

Sample size 100, mean 22.8, standard deviation 2.7, 95% level: Z β‰ˆ 1.96, margin of error β‰ˆ 0.529, interval about [22.271, 23.329]. That is roughly Β±2.3% of the mean. Assumes a normal model (or large n); very small samples may need a t critical value instead.

Reading the panel

Inputs you need

n, sample mean xΜ„, and Οƒ or s. The form opens at 100, 22.8, and 2.7. Population Οƒ is fine when you know it; otherwise use sample s from your data.

Margin of error vs interval

Margin of error is the half-width Z Γ— (Οƒ/√n). The interval is xΜ„ minus and plus that amount. Percent margin divides MoE by |xΜ„| for reporting.

Confidence level and Z

Changing 90% / 95% / 99% swaps the critical value Z and widens or narrows the band. The Z table lists two-tailed cutoffs from 70% to 99.99%.

Larger n, tighter interval

Standard error is Οƒ/√n, so doubling sample size shrinks MoE by about √2. Try n = 400 on the same mean and Οƒ to see the interval narrow.

Confidence interval calculator: margin of error and Z

n = 100, xΜ„ = 22.8, Οƒ = 2.7, 95%: MoE β‰ˆ 0.529, interval [22.271, 23.329]. Z critical values for 70%–99.99%.

What this calculator does

Builds a two-tailed Z interval for the population mean: xΜ„ Β± Z Γ— (Οƒ/√n). Shows margin of error (absolute and percent of xΜ„), [lower, upper], the Z used, and the substituted formula. Assumes normal sampling distribution or large n; does not replace a t-interval for tiny samples.
  • Default run:
    n = 100, xΜ„ = 22.8, Οƒ = 2.7, 95% β†’ MoE β‰ˆ 0.529, about [22.271, 23.329].
  • Limits:
    Summary statistics only; no raw data upload. Enter Οƒ when known, s when estimated from the sample.

Formula and interpretation

Margin of error MoE = Z Γ— (Οƒ/√n). Interval endpoints are xΜ„ βˆ’ MoE and xΜ„ + MoE. A 95% level means the procedure captures the true mean in about 95% of repeated samples, not that there is a 95% chance the mean lies in your one interval (the mean is fixed; the interval is random).
  • Z examples:
    90% β†’ 1.645; 95% β†’ 1.960; 99% β†’ 2.576 (two-tailed normal).
  • Οƒ vs s:
    Use population Οƒ if known; sample s is typical from data.

Using the form

Defaults match the example above. Clear resets to those values. Toggle the Z table to compare levels without retyping. For very small n (often under 30 with unknown Οƒ), consider a t critical value; this page stays on Z for coursework-style problems with stated Οƒ or large n.

Why sample size matters

MoE shrinks when n grows because Οƒ/√n gets smaller. Same Οƒ and Z, n = 400 instead of 100 cuts the margin of error in half. That is why surveys push for larger samples when they need tighter estimates.

Confidence Interval Calculator FAQ

What does a 95% confidence level mean?

If you repeated sampling and built intervals the same way many times, about 95% of those intervals would contain the true population mean. It describes the method, not the odds that your one interval is β€œright.” This tool uses the matching Z critical value (β‰ˆ 1.96 at 95%).

How do I find the Z-score for a confidence level?

For a two-tailed normal interval, Z is the cutoff so the middle area equals your confidence percent. Common values: 90% β†’ β‰ˆ 1.645, 95% β†’ β‰ˆ 1.960, 99% β†’ β‰ˆ 2.576. Use the dropdown here or open the Z-value table (70%–99.99%).

What is the difference between sample and population standard deviation?

Population Οƒ divides by N around the true population mean. Sample s uses xΜ„ and divides by nβˆ’1. Large n makes them close. Enter either in the standard deviation field; the tool uses it in xΜ„ Β± Z Γ— (Οƒ/√n). Very small n may need a t-interval instead of Z.

How do I calculate margin of error?

For the mean, margin of error = Z Γ— (Οƒ/√n). With defaults (n = 100, Οƒ = 2.7, 95%), that is about 0.529. The panel also shows percent margin relative to xΜ„.

What is the sample mean confidence interval formula?

xΜ„ Β± Z Γ— (Οƒ/√n), or [xΜ„ βˆ’ MoE, xΜ„ + MoE] where MoE is margin of error. Default run: 22.8 Β± 0.529 β†’ about [22.271, 23.329] at 95%.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

Β© 2026 CalcRegistry Reference Last System Check: July 2026Free Online Utility Tools