Skip to content

Confidence Interval Calculator

Calculatorsβ€’Client-Side & Private

Enter a sample mean, standard deviation and size to get the confidence interval with the z or t critical value shown. Free, in your browser.

Tool workspace

Sample Statistics

Enter the sample mean, standard deviation and sample size.

The average of your sample.

Sample SD (s) or population SD (Οƒ) β€” pick which below.

How many observations are in the sample.

Standard deviation type
Confidence level
Important Usage Notice

A 95% confidence interval means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true population mean. It does not mean there is a 95% probability that this particular interval contains the mean. The t-distribution is used for a sample SD when n < 30; with a known population SD the z-distribution is used.

95% Confidence Intervalt with df = 24
45.87 – 54.13

We are 95% confident the true population mean lies between 45.87 and 54.13.

Critical value
2.064

t with df = 24

Standard error
2.000

SD 10 ÷ √25

Margin of error
Β± 4.13

Critical value Γ— standard error

Interval width
8.26

Upper minus lower bound

How the Interval Changes

Same sample, different confidence levels

90% confidence46.58 – 53.42
95% confidenceCurrent45.87 – 54.13
99% confidence44.41 – 55.59

Higher confidence means a wider interval. To narrow it, collect a larger sample β€” the margin shrinks with 1 Γ· √n.

Confidence Interval Formula

CI = xΜ„ Β± critical value Γ— (s Γ· √n); use z when Οƒ is known, t with df = n βˆ’ 1 when s is estimated

Where:

  • xΜ„Sample mean β€” Centre of the interval
  • s Γ· √nStandard error β€” How precisely the mean is estimated
  • z / tCritical value β€” Depends on the confidence level (and df for t)
  • dfDegrees of freedom β€” n βˆ’ 1 for the t-distribution

Step-by-Step Worked Example

Example Scenario: A sample of 25 students has a mean score of 50 with a sample standard deviation of 10. Find the 95% confidence interval.

1Standard error
SE = 10 ÷ √25 = 10 ÷ 5 = 2.00

The standard deviation of the sample mean.

2Critical value
df = 25 βˆ’ 1 = 24, so t(0.975, 24) = 2.064

Sample SD with a small sample, so use t with 24 degrees of freedom.

3Margin of error
Margin = 2.064 Γ— 2.00 = 4.13

Critical value times the standard error.

4Interval
50 Β± 4.13 β†’ 45.87 to 54.13

Add and subtract the margin from the sample mean.

Final Calculated Result:95% CI: 45.87 – 54.13 (with z = 1.96 the interval would be 46.08 – 53.92)

Loading tool controls…

Calculations processed locally β€” numerical inputs never leave your browser
Free Instant Private

Verify it yourself: press F12, open the Network tab, and use this tool β€” your inputs never leave your browser.

Confidence Interval Calculator at a glance

Price
Free
Account
Not required
File uploads
None β€” your files are never uploaded
Category
Calculators

Who uses Calculators?

Students, homeowners and small businesses working out money, health or study figures β€” from mortgages to BMI.

How to Use Confidence Interval Calculator

Follow these simple steps to get instant results in your browser.

1

Enter the Sample

Type the sample mean, standard deviation and sample size (at least 2).

2

Pick SD Type and Level

Choose sample SD (t) or known population SD (z), and 90%, 95% or 99% confidence.

3

Read the Interval

See the lower and upper bounds, critical value, standard error and margin of error.

πŸ’‘

What is Confidence Interval Calculator & How Does It Work?

Confidence Interval Calculator builds the interval for a population mean from a sample: enter the sample mean, standard deviation and sample size, pick a confidence level (90%, 95% or 99%), and it returns the interval with the critical value, standard error and margin of error shown. A sample of 25 with mean 50 and SD 10 gives a 95% interval of 45.87 to 54.13 using the t-distribution.

The tool picks the right distribution for you: z when the population standard deviation is known, t with df = n βˆ’ 1 when the standard deviation is estimated from the sample (the usual case, and the default for n under 30). For large samples the t critical value converges to z, so the tool switches to the z approximation at df β‰₯ 30. The page also shows the same sample at all three confidence levels, so the trade-off is visible: higher confidence means a wider interval.

The interpretation is stated carefully on the page, because it is the most commonly misunderstood idea in statistics: a 95% interval means about 95% of intervals built this way over repeated sampling would contain the true mean β€” not that there is a 95% probability this particular interval contains it.

⚑

Key Features & Capabilities

βœ“

z or t, Chosen Correctly

t with df = n βˆ’ 1 for a sample SD; z for a known population SD.

βœ“

Three Confidence Levels

90%, 95% or 99%, with the same sample shown at all three.

βœ“

Every Component Shown

Critical value, standard error and margin of error, not just the bounds.

βœ“

Correct Interpretation

States what a confidence interval does and does not mean.

βœ“

Narrowing Guidance

Explains that the margin shrinks with 1 ÷ √n.

Pro Tips

  • β€’Bookmark this tool for instant one-click access anytime.
  • β€’Adjust values using direct input or sliders for instantaneous recalculation.
  • β€’All processing happens in your browser session for maximum speed and data safety.

🎯 Common Use Cases

Survey ResultsPut a margin of error around a survey mean.
Lab MeasurementsReport a measured mean with its uncertainty.
A/B Test MeansSee whether two groups' intervals overlap before claiming a difference.
Reporting a Poll ResultA survey of 400 people with mean rating 7.2 and SD 1.5 gives a 95% interval of 7.05 to 7.35 β€” report the interval, not just the mean.
πŸ“

Confidence Interval Calculator - Mean Interval

Formula Equation:
CI = xΜ„ Β± critical value Γ— (s Γ· √n); use z when Οƒ is known, t with df = n βˆ’ 1 when s is estimated

The standard error s ÷ √n measures how precisely the sample mean estimates the population mean. Multiplying it by the critical value (1.96 for 95% z; 2.064 for 95% t with 24 df) gives the margin of error, added and subtracted from the mean.

✏️

Worked Example

  1. 1Sample of 25, mean 50, sample SD 10, 95% confidence
  2. 2SE = 10 ÷ √25 = 10 ÷ 5 = 2.00
  3. 3df = 25 βˆ’ 1 = 24, so t(0.975, 24) = 2.064
  4. 4Margin = 2.064 Γ— 2.00 = 4.13
  5. 595% CI = 50 Β± 4.13 β†’ 45.87 to 54.13 (with z = 1.96 the interval would be 46.08 to 53.92)
πŸ“š

Sources & Further Reading

Frequently Asked Questions about Confidence Interval Calculator

Frequently asked questions

Take the sample mean Β± critical value Γ— (SD Γ· √n). For a sample of 25 with mean 50 and SD 10, the standard error is 2.00 and the t critical value with 24 degrees of freedom is 2.064, giving 50 Β± 4.13 = 45.87 to 54.13.

Use z when the population standard deviation is known. Use t (with df = n βˆ’ 1) when the standard deviation is estimated from the sample β€” which is the usual case, and what this tool defaults to for n under 30.

If you repeated the sampling many times, about 95% of the intervals built this way would contain the true population mean. It does not mean there is a 95% probability that this particular interval contains the mean.

Higher confidence needs a larger critical value (2.576 instead of 1.96 for z), which widens the margin of error. To narrow the interval, collect a larger sample β€” the margin shrinks with 1 Γ· √n.

The margin of error is the critical value times the standard error β€” half the width of the interval. For the example above it is 4.13, so the interval is the mean 50 plus or minus 4.13.

47.23 to 52.77. The standard error falls from 2.00 to 1.41 (10 Γ· √50), and with 49 degrees of freedom the tool uses the z value 1.96, so the margin is 1.96 Γ— 1.41 = 2.77.

46.58 to 53.42. The t critical value with 24 degrees of freedom is 1.711 at 90% (instead of 2.064 at 95%), so the margin is 1.711 Γ— 2.00 = 3.42.

Complementary utilities for your workflow

View all β†’
You are here

Confidence Interval Calculator

Confidence interval with z or t critical value shown.

Current tool

Speed Calculator

Speed in km/h, mph, m/s and knots β€” or solve for distance or time.

Try tool