One-Sample Proportion Test Calculator

StatisticsLast updated: August 22, 2026

A one-sample proportion test asks whether an observed percentage differs significantly from a theoretical or expected proportion (p₀). Whether a survey result clears the 50% threshold, whether the defect rate on a production line exceeds the contractual limit, and whether the success rate of a treatment departs from the value reported in the literature are all decided with this test.

The test rests on the normal approximation to the binomial distribution, so it first checks that the expected numbers of successes and failures (n·p₀ and n·(1−p₀)) are at least 5. The calculator reports the z value with and without a Yates continuity correction, the corresponding p-values, the critical z, the Cohen h effect size, and — instead of a Wald interval — a Wilson score confidence interval for the proportion; it also shows the rejection region on a shaded normal curve.

The number of observations carrying the characteristic of interest: respondents who said yes, defective items, patients who recovered.
The total number of observations. The number of successes cannot exceed this value.
%
Enter it as a percentage: type 50 for 50%, and 2.5 for 2.5%.
A directional hypothesis should be chosen only if the direction of the difference can be justified in advance.
Sets the false positive risk. In the social sciences 5% is the common choice.
The probability that the interval covers the true parameter.

One-Sample Proportion Test Formulas

Hypotheses:        H₀: p = p₀   ·   H₁: p ≠ p₀
Sample proportion: p̂ = x / n
Assumption:        n·p₀ ≥ 5  and  n·(1 − p₀) ≥ 5
Standard error:    SE = √[ p₀(1 − p₀) / n ]
Test statistic:    z = (p̂ − p₀) / SE
Continuity corr.:  z_c = (|p̂ − p₀| − 1/(2n)) / SE,  the sign is kept
Wilson interval:   [ p̂ + z²/(2n) ± z·√( p̂(1−p̂)/n + z²/(4n²) ) ] / (1 + z²/n)
Effect size:       h = 2·arcsin√p̂ − 2·arcsin√p₀

The thresholds for Cohen h are the same as for d: 0.20 small · 0.50 medium · 0.80 large. The standard error is computed with p₀ under H₀, while the confidence interval uses the observed p̂; this is why the test and the interval can occasionally disagree in borderline cases.

How to Calculate

  1. Enter the number of observations carrying the characteristic of interest (x) and the total sample size (n).
  2. Type the expected proportion you are comparing against as a percentage: 50 for 50%, 2.5 for 2.5%.
  3. Choose the hypothesis direction, the significance level (α), and the confidence level.
  4. Check the expected-count rows: if either n·p₀ or n·(1−p₀) falls below 5, use an exact binomial test instead of the normal approximation.
  5. Read the continuity-corrected z and p-value together with the decision line, and see where z falls in the rejection region on the shaded normal curve.
  6. Report the Wilson confidence interval and the Cohen h effect size; if the interval contains the expected proportion, the difference is not significant.

Worked Examples

Does the survey result clear the 50% threshold?

In a sample of 100 people, 62 gave a positive answer; p̂ = 0.62. The expected counts are 50 and 50, so the assumption is met and the standard error is 0.05. The uncorrected z = 2.400 (p = 0.016) and the continuity-corrected z = 2.300 (p = 0.021), and H₀ is rejected in both cases. The Wilson 95% confidence interval runs from 52.21% to 70.90% and does not contain 50%; Cohen h = 0.242 is a small effect.

z (continuity corrected): 2.3000 · p-value (corrected): p = 0.021 · z (uncorrected): 2.4000

Is the defect rate above the contractual limit?

18 defects were found in 300 products; p̂ = 0.06 against a contractual limit of 4%. The expected number of defects is 12 and the expected number of sound items is 288, so the assumption is met. In a right-tail test the uncorrected z = 1.768 (p = 0.039), while the continuity-corrected z = 1.621 (p = 0.053); with the corrected result H₀ cannot be rejected. The Wilson 95% interval runs from 3.83% to 9.28% and contains 4%.

z (continuity corrected): 1.6205 · p-value (corrected): p = 0.053 · z (uncorrected): 1.7678

A small sample that violates the assumption

3 successes were observed in 40 trials (p̂ = 0.075) against an expected proportion of 2%. Because the expected number of successes is only 0.80, the condition n·p₀ ≥ 5 is not met and a warning is issued. The uncorrected z = 2.485 (p = 0.013), while the continuity-corrected z = 1.920 (p = 0.055); the two results pointing to different decisions shows that the normal approximation is strained on this sample. The Wilson 95% interval runs from 2.58% to 19.86%.

z (continuity corrected): 1.9200 · p-value (corrected): p = 0.055 · z (uncorrected): 2.4846

Frequently Asked Questions

What is the continuity correction and when is it used?
The number of successes is a discrete variable (0, 1, 2, …), but the normal distribution is continuous. The Yates continuity correction compensates for this mismatch by subtracting 1/(2n) from the absolute difference, which makes the p-value slightly larger. On small and medium samples the corrected result is closer to the exact binomial test; as n grows the two values converge.
What should I do if the condition n·p₀ ≥ 5 is not met?
The normal approximation is not reliable in that case; the p-value can depart noticeably from the true binomial probability. The correct method is the exact binomial test (binom.test in R, Nonparametric Tests → Binomial in SPSS). For the confidence interval, the exact Clopper–Pearson interval can be used; the Wilson interval behaves far better than Wald even under these conditions, but it is still asymptotic.
Why is the standard error computed with p₀ instead of p̂?
A hypothesis test is carried out under the assumption that H₀ is true; under H₀ the true proportion is p₀, so the standard error of the sampling distribution is √[p₀(1−p₀)/n]. A confidence interval makes no such assumption and uses the observed p̂. This is why the test and the interval can occasionally disagree in borderline cases (p ≈ α); that is not an error but the consequence of the two methods answering different questions.
What is the difference between the Wilson and Wald intervals?
The Wald interval has the form p̂ ± z·√(p̂(1−p̂)/n) and, despite its simplicity, has three problems: on small n its actual coverage probability falls far below the nominal level, it collapses to zero width when p̂ = 0 or 1, and it can run outside [0, 1]. The Wilson score interval suffers from none of these and gives reasonable coverage even on samples as small as n = 10, which is why Wilson is reported by default.
How is the proportion test related to the chi-square goodness-of-fit test?
With two categories, the square of the z value from a two-tailed proportion test is exactly equal to the chi-square goodness-of-fit statistic on the same data: z² = χ², and the p-values match. The chi-square test is inherently two-sided; if you want a one-tailed test, you must use the proportion test. With more than two categories the proportion test does not apply and a chi-square goodness-of-fit test is required.
Why is Cohen h used instead of a simple difference in proportions?
The practical meaning of a difference in proportions depends on where the proportions sit on the scale: a 2-point gap between 2% and 4% is a much bigger effect than a 2-point gap between 50% and 52%. The arcsine transformation stabilizes the variance and solves this problem, making h interpretable with the same thresholds as d (0.20 / 0.50 / 0.80). Sample size computations in power analyses are also based on h.
What should I do if I want to compare the proportions of two groups?
This calculator compares a single proportion against a fixed benchmark. To compare the proportions of two independent groups, use a two-proportion difference test or a chi-square test of independence on a 2×2 table; if the expected cell counts are small, Fisher's exact test is preferred. If the two proportions come from the same people at two time points, McNemar's test is the correct method.