One-Proportion Z-Test Calculator

This one proportion z-test calculator tests a sample proportion against a claimed proportion p0. Enter the number of successes x and the sample size n, and it returns p-hat, the z-score, the p-value, the critical values and a 95% confidence interval for p-hat — with the rejection region shaded on the standard normal curve.

One-Proportion Z-Test Calculator

Test a sample proportion against a claimed proportion — z, p-value, critical values and a 95% confidence interval, on one shaded curve.

Try:

P-value (two-tailed)
0.0047

Reject H0 at α = 0.05

p-hat = 0.60 · z = 2.83 · critical values ±1.96 · 95% CI [0.532, 0.668]

2.83z-score
0.60Sample proportion p-hat
0.0354Standard error (SE)
±1.96Critical values
[0.532, 0.668]95% CI for p-hat
Yes — both ≥ 5Validity: np0 ≥ 5 and n(1−p0) ≥ 5

How it was worked out

    Shaded bell curve

    A one proportion z-test calculator compares the proportion observed in a sample, p-hat = x/n, with a claimed population proportion p0. It computes z = (p-hat − p0) / SE, where SE = √(p0(1 − p0)/n), then finds the p-value from the standard normal curve. If the p-value is below your significance level, 0.05, reject H0; otherwise, fail to reject it.

    What is a one-proportion z-test?

    A one-proportion z-test is a hypothesis test for a single population proportion. The null hypothesis is H0: p = p0, where p0 is the claimed proportion; the alternative can be two-sided (Ha: p ≠ p0) or one-sided (Ha: p > p0 or Ha: p < p0). You use it when you have one sample of counts — for example, 120 successes in 200 trials — and want to know whether the observed proportion is far enough from the claim to be surprising. The test works because, when the sample is large enough, the sampling distribution of p-hat is approximately normal, so the test statistic follows the standard normal curve. The p-value is the tail area beyond z, and what a p-value is explains that area in plain terms.

    Choose the alternative before you look at the data: a two-tailed test asks whether the proportion differs in either direction, while a one-tailed test asks about one direction only. If you are unsure, use two-tailed — it is the standard, conservative choice. Once you have z, the p-value calculator from a z-score turns it into a one- or two-tailed p-value.

    How to do a one-proportion z-test

    1. State the hypotheses: H0: p = p0 against Ha: p ≠ p0 (two-tailed), Ha: p > p0 (right-tailed) or Ha: p < p0 (left-tailed).
    2. Check the conditions: the sample must be random, the observations independent, and np0 ≥ 5 and n(1 − p0) ≥ 5, so the normal approximation is valid.
    3. Calculate p-hat = x ÷ n, then SE = √(p0(1 − p0) ÷ n) and z = (p-hat − p0) ÷ SE. The normal distribution calculator gives the same tail areas if you want to check them by hand.
    4. Find the p-value from Φ(z) — the area under the standard normal curve beyond z in the tail (or tails) your alternative specifies.
    5. Decide: reject H0 if the p-value is below your significance level α (usually 0.05); otherwise, fail to reject H0. Also report the 95% confidence interval for p-hat.

    Worked example: x = 120, n = 200, p0 = 0.5

    Suppose a coin is tossed 200 times and lands heads 120 times. Is the coin fair? Here p-hat = 120 ÷ 200 = 0.60, SE = √(0.5 × 0.5 ÷ 200) = 0.0354, and z = (0.60 − 0.50) ÷ 0.0354 = 2.83. The two-tailed p-value is 2 × (1 − Φ(2.83)) = 0.0047, well below 0.05, so reject H0 — the coin does not look fair. The critical values are ±1.96, and |z| = 2.83 exceeds them. The 95% confidence interval for p-hat is 0.60 ± 1.96 × √(0.60 × 0.40 ÷ 200) = [0.532, 0.668], which does not contain 0.5. The half-width of that interval, 0.068, is the margin of error calculator result for the same data.

    A second sample, x = 52 in n = 100, gives p-hat = 0.52, z = 0.40 and a two-tailed p-value of 0.689 — far above 0.05, so fail to reject H0. The same sample size can give a very different verdict; the p-value, not the size of p-hat alone, is what decides.

    One-proportion z-test formula

    The test statistic is z = (p-hat − p0) ÷ √(p0(1 − p0) ÷ n), where p-hat = x ÷ n. The standard error uses the null value p0, not p-hat, because the test assumes H0 is true. The confidence interval, by contrast, uses p-hat in its standard error: p-hat ± z*√(p-hat(1 − p-hat) ÷ n).

    Significance level αTwo-tailed critical valuesOne-tailed critical value
    0.10±1.6451.282
    0.05±1.961.645
    0.01±2.5762.326

    At the 5% level the two-tailed critical values are ±1.96 and the one-tailed critical value is 1.645, which is why z = 2.83 is significant but z = 0.40 is not. The confidence interval calculator builds intervals from a mean and standard deviation, while this page builds the interval for a proportion. If you need a z-score from raw data first, use the z-score calculator.

    When is the one-proportion z-test valid?

    The z-test is valid when the sample is random, the observations are independent (or the sample is under 10% of the population), and both np0 ≥ 5 and n(1 − p0) ≥ 5. The two count conditions make sure the normal approximation to the binomial is close enough — they are the same conditions the NIST/SEMATECH e-Handbook gives for this test. With p0 = 0.5 and n = 200, np0 = 100, so the conditions are easily met; with p0 = 0.05 and n = 40, np0 = 2, so they fail and the z-test should not be used. For a small sample, or a very small or large p0, use an exact binomial test instead. Reading what margin of error means helps here too, because the same sample size and proportion drive both the test and the interval. The choice between a p-value and a z-score is explained in p-value vs z-score.

    How to interpret the p-value and the confidence interval

    Reject H0 when p < α and fail to reject it when p ≥ α. A p-value of 0.0047 means that, if H0 were true, a result this far from p0 would occur about 0.47% of the time by chance alone; it is not the probability that H0 is true. The 95% confidence interval gives the same verdict from the other side: for a two-tailed test at 5%, the interval excludes p0 exactly when p < 0.05. In the worked example the interval [0.532, 0.668] excludes 0.5, matching the decision to reject H0. The left- and right-tail probabilities behind the p-value are the areas the chart above shades.

    One-proportion z-test FAQs

    What is the formula for a one-proportion z-test?

    The formula is z = (p-hat − p0) ÷ SE, where p-hat = x ÷ n and SE = √(p0(1 − p0) ÷ n). For x = 120, n = 200 and p0 = 0.5, p-hat = 0.60, SE = 0.0354 and z = 2.83.

    How do you find the p-value for a one-proportion z-test?

    Find Φ(z), the area to the left of z under the standard normal curve. For a right-tailed test the p-value is 1 − Φ(z); for a left-tailed test it is Φ(z); for a two-tailed test it is 2 × (1 − Φ(|z|)). With z = 2.83 the two-tailed p-value is 0.0047.

    When do you reject H0 in a one-proportion z-test?

    Reject H0 when the p-value is smaller than your significance level α, usually 0.05. With p = 0.0047 and α = 0.05 you reject H0; with p = 0.689 you fail to reject H0.

    What are the conditions for a one-proportion z-test?

    The sample must be random, the observations independent, and np0 ≥ 5 and n(1 − p0) ≥ 5. These conditions let the normal approximation to the binomial be used; if they fail, use an exact binomial test instead.

    What is p-hat in a one-proportion z-test?

    p-hat is the sample proportion, p-hat = x ÷ n. For 120 successes in 200 trials, p-hat = 120 ÷ 200 = 0.60.

    How do you find the critical value for a one-proportion z-test?

    The critical value comes from the standard normal curve for your α and tail. For a two-tailed test at α = 0.05 it is ±1.96; for a one-tailed test at α = 0.05 it is 1.645 (right) or −1.645 (left).

    What is the 95% confidence interval for p-hat?

    The 95% confidence interval is p-hat ± 1.96 × √(p-hat(1 − p-hat) ÷ n). For p-hat = 0.60 and n = 200 it is [0.532, 0.668].

    Can I use a one-proportion z-test with a small sample?

    Only if np0 ≥ 5 and n(1 − p0) ≥ 5 still hold. If either count is under 5, the normal approximation is unreliable and an exact binomial test is the right choice.

    Keep going: you can browse all the calculator tools on the tools page. The formulas and the np0 ≥ 5 rule used here follow the NIST/SEMATECH e-Handbook of Statistical Methods.

    More Tools to Explore

    Z-Score Calculator

    Turn any value into a z-score and find its percentile and probability on the bell curve.

    Try Calculator

    Normal Distribution Calculator

    Find probabilities, percentiles and critical values for any normal distribution.

    Try Calculator

    P-Value Calculator from Z-Score

    Turn any z-score into a one- or two-tailed p-value — or work backwards from a p-value to its z-score.

    Try Calculator

    Z-Score to Percentile Converter

    Convert a z-score to a percentile in a normal distribution. Enter your z-score to see the percentage of values below it.

    Try Calculator

    IQ Bell Curve Calculator

    Convert an IQ score into a z-score, percentile and rarity on the bell curve.

    Try Calculator

    Explore All Statistical Tools

    Browse all 31 free statistics tools in one place — no sign-up, instant results.

    Browse All Tools