Skip to content
snowkitCalc

Confidence intervals, step by step

Enter your sample mean, standard deviation and size, or a proportion, to get the interval and the margin of error.

Statistics with the working

Your value
Work backwards
Start from

z-score
Percentile
P(X < x)
P(X > x)
Two-tailedP(|Z| > |z|)
Value at the percentile

Working

    Every number updates as you type.

    Turn a value into a z-score and a percentile, get the p-value of a z or t statistic, or build a confidence interval for a mean or a proportion. Every number updates as you type, and the working shows the formula with your values. It is free and runs in your browser.

    How to use the calculators, step by step

    1. Choose a tab: Z-score, P-value or Confidence interval.
    2. For a z-score, enter the Value x, the Mean and the Standard deviation. You can also work backwards from a percentile or a z-score.
    3. For a p-value, choose z or t, enter the Test statistic and the Degrees of freedom for t, then choose Left, Right or Two-tailed and the significance level.
    4. For a confidence interval, choose a mean or a proportion and enter the sample figures and the Confidence level.
    5. Read the results and the Working underneath.

    What a z-score tells you

    A z-score says how many standard deviations a value sits above or below the mean: z = (x − μ) ÷ σ. A score of 130 on a test with mean 100 and standard deviation 15 has z = 2. If the values follow a normal distribution, z turns into a percentile: about 97.7% of values fall below z = 2. The percentiles assume a normal distribution, so treat them with care for skewed data.

    Reading a p-value carefully

    A p-value is the probability of a test statistic at least as extreme as yours if the null hypothesis were true. When it is below your chosen significance level α, the result is called statistically significant at that level. A p-value above α does not prove there is no effect, and a small p-value does not say the effect is large or important. Choose one-tailed or two-tailed, and α, before looking at the data. For a t statistic, the degrees of freedom are usually n − 1 for one sample.

    Confidence intervals for a mean and a proportion

    For a mean, the interval is the sample mean plus or minus a critical value times the standard error s ÷ √n. The t distribution with n − 1 degrees of freedom is used unless the population standard deviation is genuinely known, which is rare. For a proportion, the Wilson score interval is shown first because it behaves well with small samples and with proportions near 0 or 1; the simpler Wald interval, p̂ plus or minus z times √(p̂(1 − p̂) ÷ n), is shown for comparison and can be misleading in those cases.

    How the numbers are computed

    The normal distribution uses a double-precision approximation accurate to at least nine significant figures even far out in the tails, and its inverse is refined with Newton steps. The t distribution is computed exactly from the regularised incomplete beta function, so p-values and critical values match statistical tables. Everything runs in your browser and nothing is sent anywhere.

    Worked example

    A class has a mean test score of 70 and a standard deviation of 10. A student scores 85, so z = (85 − 70) ÷ 10 = 1.5. About 93.3% of scores fall below that, so the student is at roughly the 93rd percentile.

    Who uses it

    Statistics students checking homework and replacing printed tables, teachers explaining the normal curve, researchers who need a quick p-value, and people making sense of survey results. To describe a list of numbers first, use the statistics calculator.

    Questions

    What is a good z-score?

    It depends on the context. A z-score of 0 is average, and scores beyond about 2 or minus 2 are unusual in a normal distribution.

    One-tailed or two-tailed?

    Use two-tailed when you care about a difference in either direction. Decide before you look at the data.

    Why does it use t instead of z for a mean?

    The population standard deviation is rarely known. The t distribution allows for the extra uncertainty in small samples.

    Is my data stored?

    No. Everything runs in your browser.

    Where to next

    Carry on with what you just made, still on your device.

    More from Snowkit