A proportion test calculator determines whether a sample proportion differs significantly from a hypothesized population proportion, or whether two independent groups have different success rates. Use it to run a one-proportion or two-proportion z-test, choose a one-tailed or two-tailed hypothesis, and get the z-statistic, p-value, critical value, confidence interval and a clear reject / fail-to-reject decision. When your sample is too small for a reliable normal approximation, the calculator switches to an exact binomial test or Fisher’s exact test instead.
Proportion Test Calculator
Test a hypothesis about one proportion or compare two proportions. Get the z-statistic, p-value, critical value, confidence intervals, a clear decision and a full step-by-step solution instantly.
Written by Jhanzayb, Chartered Accountant (ACA) and Associate Member of ICAP ยท Calculation logic tested against SciPy
In Short: Enter the number of successes and the sample size, pick your alternative hypothesis and significance level, and read the result. If the p-value is at or below your significance level (usually 0.05), you reject the null hypothesis. If it is above, you fail to reject it. Every result also comes with a plain-English interpretation, a step-by-step solution and a ready-to-copy APA-style sentence for assignments and reports.
Proportion Hypothesis Test Calculator – What Is a Proportion Test?
A proportion test is a hypothesis test for categorical yes/no data. It tells you whether the share of “successes” in your sample is far enough from a benchmark, or from another group, that chance alone is an unlikely explanation.
A “success” is simply whatever outcome you are counting such as a customer who clicked, a patient who recovered, a voter who supports a policy, a part that failed inspection. The test compares the sample proportion (pฬ = x รท n) with a claimed value, or with the proportion in a second group.
Like every hypothesis test, it works with two competing statements:
- Null Hypothesis (Hโ) – Nothing unusual is going on. The true proportion equals the claimed value, or the two groups have the same proportion
- Alternative Hypothesis (Hโ) – The proportion is different from, less than, or greater than the claimed value (or one group’s proportion differs from the other’s)
You then ask: if Hโ were true, how likely is a result at least as extreme as mine? That probability is the p-value.
Proportion tests are used in A/B testing, quality control, opinion polls, clinical studies, marketing, education research and plenty of coursework. If your data are averages (heights, prices, scores) rather than yes/no counts, you want a t-test instead.

Proportion Test Vs Proportion Z-Test
People often use these two terms as if they meant the same thing. They don’t.
A proportion test is the broad term. It covers any hypothesis test that asks whether a proportion differs from a benchmark, or whether two proportions differ from each other.
A proportion z-test is one specific method inside that family. It uses the normal approximation, which works well when the sample is large enough.
| Method | Question It Answers | Relies On the Normal Approximation? |
|---|---|---|
| One-proportion z-test | Does one sample differ from a benchmark? | Yes |
| Two-proportion z-test | Do two independent groups differ? | Yes |
| Exact binomial test | Does one (often small) sample differ from a benchmark? | No |
| Fisher’s exact test | Do two independent groups differ, in a 2 ร 2 table? | No |
So a proportion test does not have to be a z-test. When samples are small, or the proportion is very close to 0 or 1, the z-test can make the evidence look stronger than it really is, and an exact test is the safer choice.
You don’t have to decide this on your own. The proportion test calculator’s default Auto setting picks the method that suits your numbers and shows you which one it used. If you specifically want a z-test, you can force it in Advanced options.
One Sample Proportion Test Calculator Vs Two Sample Proportion Test Calculator
The two tests answer different questions, so choosing the right one matters.
| One-Proportion Test | Two-Proportion Test | |
|---|---|---|
| Question | Does my sample match a known or claimed proportion? | Do two independent groups have different proportions? |
| Data you need | x, n and the claimed value pโ | xโ, nโ and xโ, nโ |
| Example | A factory claims 2% of items are defective. You find 9 in 300. | Version A converts 120 of 1,000 visitors, version B converts 150 of 1,000. |
| Null hypothesis | p = pโ | pโ = pโ |
| Standard error uses | The claimed value pโ | The pooled proportion of both groups |
| Small-sample alternative | Exact binomial test | Fisher’s exact test |
A Quick Rule: If you have one sample and a number to compare it against, use one proportion. If you have two groups and want to compare them with each other, use two proportions.
Which Statistical Test Should You Choose?
If you are unsure which test fits your data, start here.
| Method | When to Use It |
|---|---|
| One-proportion z-test | Compare one sample proportion against a benchmark or claimed value |
| Two-proportion z-test | Compare two independent sample proportions |
| Exact binomial test | Compare one sample proportion against a benchmark when the sample is small |
| Fisher’s exact test | Analyze a 2 ร 2 table when an exact method is preferred, especially with small counts |
| Pearson chi-square test | Compare categorical frequencies in a contingency table, including tables larger than 2 ร 2 |
| McNemar’s test | Compare paired or matched binary observations, such as before-and-after on the same people |
The calculator covers the first four directly. For the last two, see Proportion Z-Test vs Chi-Square Test and When Should You Not Use a Proportion Test? below.
How to Use the Proportion Test Calculator (Step by Step)
- Choose the Tab – Select “One proportion” to compare a sample with a benchmark, or “Two proportions” to compare two independent groups
- Try a Quick-Start Example (Optional) – The example cards fill in realistic numbers and show a complete result, which is a quick way to see how the tool behaves
- Enter Your Counts – Use whole numbers: the number of successes and the sample size for each group. Do not enter percentages in these fields. For the hypothesized proportion pโ you can type
0.5or50% - Pick the Alternative Hypothesis – Two-tailed tests for any difference, left-tailed tests whether the proportion is smaller, right-tailed tests whether it is larger. Decide this before you look at the data
- Choose the Significance Level (ฮฑ) – Use a preset (0.10, 0.05, 0.025, 0.01 or 0.001) or enter a custom value such as
0.02or2% - Read the Result – The calculator updates as you type. Start with the decision banner, then check the p-value, the difference in percentage points, the confidence interval and the assumption checks
- Open Advanced Options If You Need to – You can force the z-test or the exact test, turn on continuity correction, and change the number of decimal places. Otherwise leave the method on Auto
- Save or Report Your Result – Copy the results as text, download a CSV, print a clean results page, or copy the ready-made APA-style sentence
A/B Testing Tip: Enter your new variant as Group 1 and the control as Group 2. The difference and the relative change are calculated as Group 1 minus Group 2, so an improvement shows up as a positive number.
How This Proportion Test Calculator Works
This section explains exactly what happens behind the buttons, so you can trust the numbers and cite them with confidence.
What the Calculator Asks for
- Number of Successes and Sample Size – The sample proportion is pฬ = x รท n. The calculator checks that x is a whole number between 0 and n
- Hypothesized Proportion (One-Proportion Test) – The value in your null hypothesis. It must be strictly between 0 and 1
- Two Groups (Two-Proportion Test) – Successes and sample size for each group
- Alternative Hypothesis and Significance Level – These decide the p-value direction and the critical value
How It Chooses the Method
The calculator uses expected-count guidelines to decide whether the normal approximation is suitable. For a one-proportion test, it checks the expected number of successes and failures under the null hypothesis (both nยทpโ and nยท(1 โ pโ) should be at least 10). For a two-proportion test, it checks all four expected counts in the pooled 2 ร 2 table (each should be at least 5). When these conditions are not met, the calculator recommends an exact method: the exact binomial test for one proportion, Fisher’s exact test for two.
These are practical guidelines, not absolute laws. Textbooks and software packages use slightly different thresholds, and the right choice can depend on your research context.
You always see which method was used. The “Method & assumption checks” list says whether it was chosen automatically or selected by you. If you override the recommendation in Advanced options, the calculator tells you what it would have recommended.
Calculation Limits
Exact tests are very accurate but need more computation than a z-test, so the calculator sets limits: the exact binomial test supports up to 1,000,000 observations, and Fisher’s exact test supports a combined sample of up to 2,000,000. If you go beyond a limit, the calculator shows a “Calculation limit reached” warning and uses the z-test instead, so you are never silently given a different method. For very large samples the z-test and the exact test give nearly identical answers anyway.
The probability chart for exact tests is drawn only when the range of outcomes is small enough to be readable.
What Each Result Means
| Result | What It Tells You |
|---|---|
| Decision banner | “Reject” or “fail to reject” the null hypothesis at your chosen ฮฑ, shown first so you see the answer immediately. |
| Z-statistic | How many standard errors your sample proportion (or difference) sits from what Hโ predicts. Exact tests don’t use one, so it isn’t shown for them. |
| P-value | The probability of a result at least this extreme if Hโ were true. |
| Critical value | The z-value that marks the edge of the rejection region. If your z-statistic is beyond it, you reject Hโ. |
| Standard error | The expected sampling variability of the proportion under Hโ. |
| Pooled proportion | (Two proportions) The combined success rate of both groups, used because Hโ says they are equal. |
| Difference in proportions | (Two proportions) The absolute gap in percentage points, calculated as Group 1 minus Group 2. Often easier to interpret than the z-statistic. |
| Relative risk | (Two proportions) Group 1’s proportion divided by Group 2’s. The result also states the relative change as a percentage, for example +25.00%. |
| Odds ratio | (Two proportions) The odds of success in Group 1 divided by the odds in Group 2. |
| Confidence interval | A plausible range for the true proportion, or for the difference between proportions. |
| Cohen’s h | An effect size that helps you judge whether a statistically significant difference is also meaningful. The calculator labels it very small (below 0.2), small, medium or large (0.8 and above). |
| Chi-square equivalent | (Two proportions, z-test) zยฒ, which equals the Pearson chi-square statistic for a 2 ร 2 table. |
| Assumption checks | Expected-count checks, a reminder about independence and random sampling, and a note on the method used. |
| APA-style sentence | A reporting sentence generated from your actual result, including direction, test statistic, p-value and confidence interval. |
How Zero Counts Are Handled
Some results cannot be calculated when a count is zero, and the proportion test calculator says so instead of inventing a number.
- Relative Risk – If Group 2 has zero successes, the ratio cannot be estimated, and the calculator shows “Not estimable: the group 2 proportion is zero”
- Odds Ratio – If the relevant odds denominator is zero, the ordinary odds ratio is infinite or undefined, and the calculator shows “Infinite or undefined: the relevant odds denominator is zero”
- Z-test with Every Outcome the Same – If all observations in both groups are successes, or all are failures, the pooled proportion is 0 or 1 and the z-statistic doesn’t exist. The calculator then explains this and suggests Fisher’s exact test
No zero or “correction” value is substituted silently. Remember also that relative risk and odds ratio are descriptive measures of association. They do not by themselves show cause and effect.
Which Confidence Interval Should You Report?
The proportion test calculator shows more than one interval because students and researchers are often unsure which one to use. The table below shows what it recommends and why.
| Test | Recommended Interval | Other Intervals Shown | Best Used When |
|---|---|---|---|
| One proportion | Wilson score | Wald, Clopper-Pearson (exact) | Wilson is a strong default for most reports, including small samples. Clopper-Pearson pairs naturally with the exact binomial test. The Wald interval is the textbook formula but can be unreliable for small samples or proportions near 0 or 1. |
| Difference between two proportions | Newcombe-Wilson | Wald (unpooled standard error) | Newcombe-Wilson performs well across sample sizes. Wald is the familiar textbook version. |
Two details worth knowing:
- Intervals are Always Two-Sided – They use a confidence level of 1 โ ฮฑ even when you run a one-tailed test, so they do not correspond directly to a one-tailed hypothesis test. The calculator adds a note when you choose a one-tailed alternative
- Edge Case – If x is 0 or n, the Wald interval collapses to a single point and should not be reported. The calculator flags this
Why the Test Uses a Pooled Standard Error But the Interval Does Not
For a two-proportion test, Hโ says both groups share the same true proportion, so it makes sense to combine them into one pooled estimate when computing the test statistic. A confidence interval has no such assumption. It describes the difference you actually observed, so it uses each group’s own proportion. This is standard practice, and it is why the p-value and the interval can occasionally disagree slightly right at the boundary.
How Accuracy Was Checked
The proportion test calculator’s results were tested against SciPy, including edge cases. The full method, example inputs, expected outputs and reference software are in “How We Tested This Calculator” further down the page.
What the Calculator Will Not Tell You
It cannot check that your data were collected properly. If the sample is biased, observations are not independent, or you tried many comparisons and picked the best one, no calculator can rescue the conclusion. Treat the output as a statement about the data you entered.
Saving and Reporting Your Results
Below every result you’ll find a “Save your results” panel:
- Copy results puts the full result, including the inputs, in your clipboard as plain text
- Download CSV exports the same values for Excel or Google Sheets
- Print or save PDF prints only the results, in a clean layout
- Copy sentence (next to the APA-style sentence) copies the one-line reporting statement for your assignment or report
The APA-style sentence is generated from the calculation itself, with the correct direction, test statistic, p-value and confidence interval. For exact tests it names the exact binomial test or Fisher’s exact test and never invents a z-statistic. Adjust the decimals to match your instructor’s or journal’s rules.
One-Proportion Z-Test Calculator Formula
For a sample of size n with x successes, the sample proportion is:
pฬ = x รท nThe test statistic is:
z = (pฬ โ pโ) รท โ[ pโ(1 โ pโ) รท n ]The denominator is the standard error under the null hypothesis. Notice that it uses pโ, the value you are testing, not pฬ.
Continuity Correction (Optional): The z-test approximates a discrete distribution with a smooth one. Subtracting 1/(2n) from |pฬ โ pโ| before dividing by the standard error compensates, and makes the test slightly more conservative.
P-value:
- Two-tailed: p = 2 ร P(Z โฅ |z|)
- Left-tailed: p = P(Z โค z)
- Right-tailed: p = P(Z โฅ z)
Critical Values at ฮฑ = 0.05: ยฑ1.96 (two-tailed), โ1.645 (left-tailed), +1.645 (right-tailed).
Two-Proportion Z-Test Calculator Formula
With xโ successes out of nโ in group 1, and xโ out of nโ in group 2:
pฬโ = xโ รท nโ pฬโ = xโ รท nโUnder Hโ the two proportions are equal, so we pool them:
pฬc = (xโ + xโ) รท (nโ + nโ)The test statistic is:
z = (pฬโ โ pฬโ) รท โ[ pฬc(1 โ pฬc)(1/nโ + 1/nโ) ]For the confidence interval of the difference, the unpooled standard error is used instead:
SE = โ[ pฬโ(1 โ pฬโ)/nโ + pฬโ(1 โ pฬโ)/nโ ]The p-value and critical values are found from the standard normal distribution exactly as in the one-proportion case.
Penn State’s online statistics course explains the two-independent-proportions test in a free lesson.
Proportion Z-Test Calculator Examples (Worked Solutions)
You can reproduce each of these in the calculator with the quick-start cards.
Example 1 – Is the Coin Fair? (One-Proportion Z-Test)
A coin lands heads 58 times in 100 flips. Is it fair?
- Hโ: p = 0.5. Hโ: p โ 0.5. ฮฑ = 0.05
- Sample proportion: pฬ = 58 รท 100 = 0.58
- Standard error: โ(0.5 ร 0.5 รท 100) = 0.05
- Test statistic: z = (0.58 โ 0.50) รท 0.05 = 1.60
- Two-tailed p-value: 2 ร P(Z โฅ 1.60) = 0.1096
- Critical values: ยฑ1.96
Since 1.60 is inside ยฑ1.96, and 0.1096 is greater than 0.05, we fail to reject Hโ. Fifty-eight heads is not unusual enough for a fair coin to rule it out. The 95% Wilson interval for the true proportion of heads is about 0.482 to 0.672, which comfortably includes 0.5.
Note what this does and doesn’t say. It does not prove the coin is fair. It only says 100 flips are not enough evidence to call it unfair.
Example 2 – Does Version B Convert Better? (Two-Proportion Z-Test)
Version A converts 120 of 1,000 visitors (12%). Version B converts 150 of 1,000 (15%). Is there a difference?
- Hโ: pโ = pโ. Hโ: pโ โ pโ. ฮฑ = 0.05
- Pooled proportion: (120 + 150) รท 2,000 = 0.135
- Pooled standard error: โ[0.135 ร 0.865 ร (1/1000 + 1/1000)] = 0.01528
- Test statistic: z = (0.12 โ 0.15) รท 0.01528 = โ1.963
- Two-tailed p-value: 0.0496
The p-value is just under 0.05, so we reject Hโ at the 5% level. But look at how thin the margin is. At ฮฑ = 0.01 the result would not be significant, and if you switch on continuity correction the p-value rises to about 0.058. The 95% Newcombe-Wilson interval for the difference runs from about โ0.060 to 0.000, so it only just excludes zero.
This is the kind of result where you should lean on the effect size and the confidence interval, not just the yes/no verdict. A three-point lift is probably real but could also be very small. More data would settle it.
Reading the Sign in the Calculator: The proportion test calculator always reports Group 1 minus Group 2. With version A entered as Group 1, you’ll see a difference of โ3.00 percentage points and a relative change of โ20.00%. If you enter version B as Group 1, the same test shows +3.00 percentage points and a relative lift of +25.00%. The z-statistic changes sign, but the p-value (0.0496) is identical. See Proportion Test in A/B Testing for how to set this up.
Example 3 – A Small Sample (Exact Binomial Test)
In a pilot study, 3 of 12 participants respond to a treatment. Is the true response rate different from 50%?
Here nยทpโ = 12 ร 0.5 = 6, below the usual threshold of 10, so the normal approximation is shaky. The proportion test calculator switches to the exact binomial test automatically.
- Exact two-sided p-value: 0.1460
- 95% Clopper-Pearson interval: about 0.055 to 0.572
For comparison, a plain z-test would give z = โ1.73 and p โ 0.083, which looks noticeably more convincing than the exact answer. That gap is exactly why the exact test exists. With small samples, the approximation can make evidence look stronger than it is.
How to Interpret a Proportion Test Result
A proportion test result has several parts, and they work best read together. This table puts the interpretation in one place.
| Result | Interpretation |
|---|---|
| p-value โค ฮฑ | Reject the null hypothesis. The data are statistically significant at your chosen level. |
| p-value > ฮฑ | Fail to reject the null hypothesis. The data do not provide enough evidence, which is not the same as proving no difference. |
| Confidence interval for a difference excludes zero | Evidence of a difference at the corresponding two-sided level. |
| Confidence interval for a difference includes zero | No statistically significant difference at the corresponding two-sided level. |
| Confidence interval for one proportion excludes pโ | Evidence that the true proportion differs from pโ at the corresponding two-sided level. |
| Small effect size | The difference may be statistically detectable but practically modest. |
| Large effect size | The difference may be more substantial, depending on context. |
An Important Qualification. The confidence-interval statements assume the interval and the test use compatible methods and significance levels. Exact tests, continuity corrections and different interval procedures can produce small discrepancies. For example, with 120 of 1,000 versus 150 of 1,000, the z-test gives p = 0.0496, while the 95% Newcombe-Wilson interval for the difference runs from about โ0.0600 to โ0.0000. Both agree here, but the result is borderline and a slightly different method could tip it either way. Treat results this close to the line with caution.
Reading Your Result in Four Steps
- Start with the Decision Banner – It tells you whether the result is statistically significant at your ฮฑ
- Check the p-Value Against ฮฑ – Notice how close it is. A p-value of 0.049 and one of 0.0001 both “reject”, but they are not equally convincing
- Look at the Size of the Difference – For two groups, the calculator shows the gap in percentage points and the relative change. Then check the confidence interval to see how precisely the difference is estimated
- Check the Effect Size and the Assumption Checks – Cohen’s h labels the effect as very small, small, medium or large, and the checks tell you whether the method was appropriate for your data
Understanding P-Values and Significance Levels
The p-value is the probability of getting a result at least as extreme as yours, assuming the null hypothesis is true. It is not the probability that Hโ is true, and it is not the probability that your result happened by chance.
The significance level (ฮฑ) is the line you draw in advance. If the p-value is at or below ฮฑ, you reject Hโ. Common choices:
| ฮฑ | Confidence Level | Typical Use |
|---|---|---|
| 0.10 | 90% | Exploratory work |
| 0.05 | 95% | The standard default |
| 0.01 | 99% | When a false positive is costly |
| 0.001 | 99.9% | Very strict evidence requirements |
One-Tailed Vs Two-Tailed Tests. A two-tailed test asks “is it different?” and splits ฮฑ between both tails. A one-tailed test asks “is it greater?” or “is it less?” and puts all of ฮฑ in one tail. Choose one-tailed only when you have a directional hypothesis before collecting data and a result in the opposite direction would be meaningless to you. Choosing the tail after seeing the data inflates your false-positive rate.
Critical Value Approach Vs p-Value Approach. They always agree. If |z| is beyond the critical value, the p-value is below ฮฑ, and the other way around.
Statistical Significance Is Not the Same As Practical Importance. The next section explains the difference with a worked example.
Statistical Significance Vs Practical Significance
Statistical significance tells you whether a difference is unlikely to be due to chance alone. Practical significance tells you whether the difference is large enough to matter. The two are not the same, and a large sample can separate them dramatically.
Here is the same 10.0% versus 10.2% conversion rate at two different sample sizes (tested with the two-proportion calculator above):
| Small Test | Large Test | |
|---|---|---|
| Group 1 | 510 of 5,000 (10.2%) | 20,400 of 200,000 (10.2%) |
| Group 2 | 500 of 5,000 (10.0%) | 20,000 of 200,000 (10.0%) |
| Difference | +0.20 percentage points | +0.20 percentage points |
| Z-statistic | 0.33 | 2.10 |
| P-value | 0.7400 | 0.0358 |
| 95% confidence interval | โ0.98 to +1.38 points | +0.01 to +0.39 points |
| Cohen’s h | 0.0066 (very small) | 0.0066 (very small) |
| Statistically significant at ฮฑ = 0.05? | No | Yes |
The difference is identical in both tests. Only the sample size changed. With 200,000 visitors per group, an extra 0.2 percentage points becomes statistically significant, yet the effect size is still very small. Whether it is worth acting on depends on cost, implementation effort and business impact.
The reverse also happens. With 7 of 10 versus 2 of 10, the gap is a huge 50 percentage points and Cohen’s h is large (1.06), but Fisher’s exact test gives p = 0.0698, so the result is not significant at 0.05. The sample is simply too small to be sure, and the confidence interval (about 6.65 to 73.98 points) shows how uncertain the estimate is.
What to Look at Beyond the p-Value
- The difference in percentage points, and the relative change if it matters to you
- The confidence interval, which shows the range of plausible differences
- The effect size (Cohen’s h)
- The real-world cost and benefit of acting on the result
This is why the proportion test calculator shows all of these, and not just a significant or not significant verdict.
Assumptions and Conditions for a Proportion Test
Check these before trusting any result:
- Random Sample or Random Assignment. Without it, the p-value doesn’t mean much
- Independence. Each observation should not influence another. When sampling without replacement, the sample should be less than about 10% of the population
- Binary Outcome. Every observation is a success or a failure
- Large Enough Sample for the Normal Approximation.
- One proportion: nยทpโ โฅ 10 and nยท(1 โ pโ) โฅ 10
- Two proportions: all four expected counts in the 2ร2 table at least 5 (some textbooks prefer 10)
- Independent Groups (two-proportion test). If the same people are measured twice, such as before and after, you need McNemar’s test instead
When condition 4 fails, use an exact test. The proportion test calculator flags this in the “Method & assumption checks” section of the results.
For further background on hypothesis testing and its assumptions, see the NIST/SEMATECH e-Handbook of Statistical Methods.
Z-Test Vs Exact Binomial Test
The z-test is a shortcut. It approximates the binomial distribution with a normal curve, which works well when the sample is large and the proportion isn’t near 0 or 1.
The exact binomial test skips the approximation and adds up real binomial probabilities. It is valid for any sample size, and it is the safer choice when:
- nยทpโ or nยท(1 โ pโ) is below 10
- the claimed proportion is very close to 0 or 1
- you want a result you can defend with a small sample
The cost is that exact tests are a little more conservative, the p-values tend to be slightly larger.
For two groups, the exact counterpart is Fisher’s exact test, which uses the hypergeometric distribution given the row and column totals. For example, 7 successes out of 10 versus 2 out of 10 gives a Fisher p-value of 0.0698.
If your sample is large, the z-test and the exact test give nearly the same answer, so it makes little practical difference which one you choose.
Both exact tests are implemented in standard statistical libraries. See the SciPy documentation for binomtest and fisher_exact.
Proportion Z-Test Vs Chi-Square Test
People often meet both methods when comparing categorical data, so here is how they relate.
For a 2ร2 table, a two-sided two-proportion z-test and Pearson’s chi-square test (without continuity correction) are mathematically equivalent:
ฯยฒ = zยฒ and the p-values are identicalIn Example 2 above, z = โ1.963, so ฯยฒ = 3.853, and both tests give p = 0.0496.
The differences are practical:
- The z-test supports one-tailed alternatives and shows the direction of the difference. The chi-square test is always two-sided
- The chi-square test extends to tables bigger than 2ร2 (more groups or more categories). The two-proportion z-test does not
- Software defaults differ. R’s
prop.testapplies a continuity correction by default, which is why its answer may not match a textbook z-test unless you setcorrect = FALSE
When Should You Use a Proportion Test?
Use a proportion test when your outcome is a simple yes/no (success or failure) and you want to know whether a proportion differs from a benchmark or from another group.
- One Sample Against a Benchmark – Does this batch have a defect rate different from the advertised 2%? Did 62% of surveyed customers say they were satisfied, against a target of 55%?
- Two Independent Groups – Does version B convert differently from version A? Does the treatment group recover at a different rate from the control group?
- Checking a Claim – Is this coin fair? Does a candidate really have 50% support?
Before you rely on the result, make sure you have:
- A binary outcome for every observation
- Counts (successes and sample size), not just percentages
- A random sample or random assignment, with independent observations
- A sample size large enough for the z-test, or an exact test for small samples. The calculator checks this for you
When Should You Not Use a Proportion Test?
The phrase “proportion test” attracts people whose data don’t actually meet the test’s assumptions. If your situation is in the left column, use the method in the right column instead.
| Situation | More Appropriate Method |
|---|---|
| Same participants measured before and after | McNemar’s test |
| More than two independent groups | Chi-square test or logistic regression, depending on the question |
| More than two categories | Chi-square test of independence |
| Numerical outcome such as height or test scores | t-test or another suitable method for means |
| Small one-sample binary data | Exact binomial test |
| Small independent 2 ร 2 table | Fisher’s exact test |
| Clustered or repeated observations, such as several visits from the same user | Methods that account for clustering |
The proportion test calculator can switch between z-tests and exact tests for you, but it cannot tell whether your observations are paired, clustered or non-random. That judgment is yours, so check the design of your data before trusting any result.
Proportion Test in A/B Testing
An A/B test is a two-proportion test in disguise. You show two versions to two independent groups of visitors and compare the share who convert.
What You Need
- Group A: Visitors and conversions
- Group B: Visitors and conversions
- Null Hypothesis: The conversion rates are equal
- Alternative Hypothesis: The conversion rates differ (or, if decided in advance, that B is higher)
- Significance Level: Usually 0.05
How to Run It in the Calculator
- Open the Two proportions tab
- Enter your new variant as Group 1 and the control as Group 2. Then an improvement shows as a positive difference
- Choose two-tailed unless you decided on a one-tailed direction before the test
- Read the decision, the p-value, the difference in percentage points and the confidence interval
Example: Version A converts 120 of 1,000 visitors (12%) and version B converts 150 of 1,000 (15%). With B entered as Group 1:
| Measure | Result |
|---|---|
| Absolute difference | +3.00 percentage points |
| Relative lift | +25.00% |
| Z-statistic | 1.96 |
| P-value (two-tailed) | 0.0496 |
| 95% confidence interval for the difference | 0.00 to 6.00 percentage points |
| Conclusion | Reject Hโ at ฮฑ = 0.05, but only just |
The three-point gain is the number to explain to stakeholders. The relative lift (25%) sounds bigger, so always report it together with the absolute difference and the confidence interval. A confidence interval that only just clears zero tells you the real improvement could be tiny.
A Caution About Stopping Early. Do not check the results repeatedly and stop the test the moment the p-value drops below 0.05. Every extra look gives chance another opportunity to produce a “significant” result, which inflates your false-positive rate. Decide the sample size and the stopping rule before the test starts, or use a design that is built for sequential testing. This proportion test calculator assumes a single analysis of a completed, fixed-size test.
Other Things to Keep in Mind
- Visitors should be randomly assigned and each person counted once
- Testing many variants or many metrics raises the chance of a false positive
- A statistically significant lift is not automatically worth shipping. Weigh it against cost and effort
How to Run a Proportion Test in Excel, R, Python and TI-84
Useful if you want to double-check the proportion test calculator or reproduce a result in your own workflow.
Excel (One-Proportion Z-Test)
z =(p_hat - p0) / SQRT(p0*(1-p0)/n)
p-value =2*(1-NORM.S.DIST(ABS(z), TRUE))R
# One proportion (chi-square form, equals zยฒ)
prop.test(58, 100, p = 0.5, correct = FALSE)
# Two proportions
prop.test(c(120, 150), c(1000, 1000), correct = FALSE)
# Exact tests
binom.test(3, 12, p = 0.5)
fisher.test(matrix(c(7, 3, 2, 8), nrow = 2, byrow = TRUE))Python
from statsmodels.stats.proportion import proportions_ztest
from scipy.stats import binomtest, fisher_exact
# One proportion (prop_var=p0 uses the null variance)
proportions_ztest(58, 100, value=0.5, prop_var=0.5)
# Two proportions
proportions_ztest([120, 150], [1000, 1000])
# Exact tests
binomtest(3, 12, 0.5)
fisher_exact([[7, 3], [2, 8]])TI-84 Calculator: Press STAT, then TESTS, then choose 5: 1-PropZTest or 6: 2-PropZTest and enter your values.
Reference documentation: R’s prop.test, binom.test and fisher.test, and SciPy’s binomtest.
Common Mistakes to Avoid
- Entering Percentages Instead of Counts – The proportion test calculator needs the number of successes and the sample size
- Using Sample Data to Set pโ – The hypothesized proportion must come from a claim, a standard or prior knowledge, not from the same data you are testing
- Switching to a One-Tailed Test After Seeing the Result – Decide the direction first
- Using the Z-Test on Tiny Samples – Check the expected counts or let Auto mode decide
- Reading “Fail to Reject” as “Proved Equal” – It only means the evidence wasn’t strong enough
- Ignoring the Effect Size – A tiny but significant difference may not matter. Check the confidence interval and Cohen’s h
- Running Many Tests and Reporting Only the Significant One – The more tests you run, the more likely one passes by luck alone
- Comparing Paired Data with a Two-Proportion Test – Before-and-after measurements on the same people are not independent
- Stopping an A/B Test as Soon as It Looks Significant – Repeated peeking inflates false positives. Fix your sample size or use a sequential design
- Reporting Only the Relative Lift – “+25%” can hide a tiny absolute change. Report the difference in percentage points and the confidence interval too
- Reporting the Wald Interval for Small Samples – Prefer the Wilson (one proportion) or Newcombe-Wilson (two proportions) interval, which the calculator marks as recommended
Frequently Asked Questions
What is a proportion test?
A proportion test is a hypothesis test that checks whether a sample proportion differs from a claimed value (one-proportion test) or whether two groups have different proportions (two-proportion test). It works with yes/no outcomes and usually relies on a z-statistic.
What is a pooled proportion and why is it used?
It is the combined success rate of both groups. Because the null hypothesis says both groups share one true proportion, pooling gives the best estimate of that shared value for the standard error.
When should I use a one-tailed test instead of a two-tailed test?
Only when you have a specific directional hypothesis before collecting data, such as “the new version converts better”, and a difference in the other direction would not change your decision. If you just want to know whether two things differ, use two-tailed.
Can I use this proportion test calculator for A/B testing?
Yes. Use the two-proportion tab, enter your new variant as Group 1 and the control as Group 2, and read the p-value, the difference in percentage points and the confidence interval. Fix your sample size before the test starts and don’t stop early just because the result looks significant.
How accurate is this proportion test calculator?
The results use standard formulas and exact distributions, and the calculation logic was tested against SciPy across about 950 input combinations, including edge cases such as zero successes and extreme proportions. The example inputs, expected outputs and reference software are published in How We Tested This Calculator so you can reproduce them yourself.
What is the difference between a proportion test and a proportion z-test?
A proportion test is the broad term for any hypothesis test about one or two proportions. A proportion z-test is one specific method, using the normal approximation. Exact methods, such as the exact binomial test and Fisher’s exact test, are also proportion tests but are not z-tests.
How We Tested This Test of Proportions Calculator (Accuracy and Reproducibility)
This calculator uses standard statistical methods for one- and two-proportion hypothesis testing. Its numerical routines were tested against established statistical software, SciPy 1.18.1, in November 2026. The methodology and assumptions are documented on this page so you can see how each result is calculated and check it yourself.
What Was Tested
- About 950 combinations of inputs, including edge cases; zero successes, all successes, tiny and very large samples, and extreme hypothesized proportions
- All three alternative hypotheses (two-tailed, left-tailed, right-tailed), each with and without continuity correction
- P-values, z-statistics and confidence intervals (Wilson, Clopper-Pearson, Newcombe-Wilson), which agreed with the reference calculations to at least six significant digits
Reproduce These Results Yourself
Enter the inputs below in the proportion test calculator and compare with the expected output and the reference.
| Test | Inputs | Expected Output | Reference (SciPy) |
|---|---|---|---|
| One-proportion z-test | x = 58, n = 100, pโ = 0.5, two-tailed | z = 1.6000, p = 0.1096; Wilson 95% CI [0.4821, 0.6720] | scipy.stats.norm; binomtest(...).proportion_ci(method='wilson') |
| One-proportion z-test (right-tailed) | x = 312, n = 500, pโ = 55%, ฮฑ = 0.05 | z = 3.3261, p = 0.0004 | scipy.stats.norm |
| Exact binomial test | x = 3, n = 12, pโ = 0.5, two-tailed | p = 0.1460; Clopper-Pearson 95% CI [0.0549, 0.5719] | scipy.stats.binomtest |
| Two-proportion z-test | 120/1,000 vs 150/1,000, two-tailed | z = โ1.9630, p = 0.0496, ฯยฒ = 3.8536 | chi2_contingency(correction=False) |
| Two-proportion z-test with continuity correction | same data, correction on | z = โ1.8976, p = 0.0577, ฯยฒ = 3.6009 | chi2_contingency(correction=True) |
| Fisher’s exact test | 7/10 vs 2/10, two-tailed | p = 0.0698; odds ratio 9.3333 | scipy.stats.fisher_exact |
| Exact binomial test (large) | x = 5,100, n = 10,000, pโ = 0.5, two-tailed | p = 0.0466 | scipy.stats.binomtest |
Conventions that Can Cause Small Differences
- Continuity Correction – some software, including R’s
prop.test, applies it by default, so its p-value can differ from an uncorrected z-test. Switch it on or off in the calculator’s Advanced options to match - Two-Sided Exact Tests – The exact binomial test and Fisher’s exact test use the “small p-values” convention, adding the probabilities of all outcomes no more likely than the observed one. This is the same convention used by SciPy and by R’s
binom.testandfisher.test - Confidence Intervals – Different interval methods give slightly different ranges. That is expected, not an error
Validated November 2026 against SciPy 1.18.1. The calculator is for educational and general analytical use. For clinical, legal or other high-stakes decisions, have a qualified statistician review your design and results.
Methods and References
The proportion test calculator follows widely used statistical methods:
- Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association
- Clopper, C. J., & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika
- Fisher, R. A. (1935). The logic of inductive inference. Journal of the Royal Statistical Society
- Newcombe, R. G. (1998). Interval estimation for the difference between independent proportions: comparison of eleven methods. Statistics in Medicine
- Brown, L. D., Cai, T. T., & DasGupta, A. (2001). Interval estimation for a binomial proportion. Statistical Science
- Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.)
Further Reading
- NIST/SEMATECH e-Handbook of Statistical Methods: A free, authoritative reference on statistical methods
- SciPy statistical functions: The reference software used to test this calculator
- R documentation for
prop.test: How R implements one- and two-proportion tests - Penn State: Two independent proportions: A university lesson on the two-proportion test
About the Author
Jhanzayb is a Qualified Chartered Accountant (ACA) and Associate Member of the Institute of Chartered Accountants of Pakistan (ICAP), with more than seven years of experience across accounting, audit, finance, management, law and tax. He creates guides and calculators on Entrepreneurial Hub for students and business owners. Connect on LinkedIn.
A Note on Scope: His professional qualification is in accountancy, not statistics. That is why the statistical methods on this page are documented in full, tested against SciPy and linked to published references, so you can verify every result for yourself.
Popular Calculators:
Direct Materials Price Variance Calculator
Accumulated Depreciation Calculator
Basic Earnings Per Share Calculator

(Qualified) Chartered Accountant – ICAP
Master of Commerce – HEC, Pakistan
Bachelor of Accounting (Honours) – AeU, Malaysia