Two Proportion Z Test Calculator

Compare conversion, defect, and response rates easily. Review pooled estimates, confidence intervals, and significance decisions. Export results, inspect charts, and explain findings with confidence.

Calculator Input

Example Data Table

These sample cases show how the calculator can compare proportions in experiments, quality checks, and response studies.

Scenario Sample 1 Successes Sample 1 Size Sample 2 Successes Sample 2 Size Observed Difference
A/B landing page conversions 120 500 150 520 -0.0485
Manufacturing defect comparison 18 400 11 410 0.0182
Email response campaign test 96 300 78 290 0.0510
Clinical adherence screening 67 140 54 150 0.1186

Formula Used

The two proportion z test compares whether two population proportions differ by more than a chosen null value.

p1 = x1 / n1
p2 = x2 / n2
Pooled proportion p̂ = (x1 + x2) / (n1 + n2)
SEpooled = √[ p̂(1 - p̂)(1/n1 + 1/n2) ]
z = [ (p1 - p2) - d0 ] / SEpooled
For a two-sided test, p value = 2 × [1 - Φ(|z|)]
SEunpooled = √[ p1(1-p1)/n1 + p2(1-p2)/n2 ]
Confidence interval = (p1 - p2) ± z* × SEunpooled

Here, x1 and x2 are successes, n1 and n2 are sample sizes, d0 is the null difference, and Φ is the standard normal cumulative distribution.

How to Use This Calculator

  1. Enter labels for both groups if you want custom names.
  2. Provide successes and total observations for each sample.
  3. Choose an alpha level such as 0.05 or 0.01.
  4. Keep the null difference at 0 for most comparisons.
  5. Select the alternative hypothesis that matches your question.
  6. Click Run Z Test to generate the full output.
  7. Review the z statistic, p value, confidence interval, and chart.
  8. Use the CSV or PDF buttons to export results.

Frequently Asked Questions

1) What does a two proportion z test measure?

It tests whether the difference between two population proportions is statistically meaningful. Common uses include conversion rates, defect rates, approval rates, and treatment response proportions.

2) When should I use this calculator?

Use it when each outcome is binary, such as success or failure, and you want to compare two independent groups. It works best when expected counts are large enough for the normal approximation.

3) Why does the test use a pooled proportion?

Under the null hypothesis, both populations share the same proportion. Pooling provides the common estimate needed for the standard error used in the hypothesis test statistic.

4) What does the p value tell me?

The p value estimates how surprising your observed difference would be if the null hypothesis were true. Smaller values provide stronger evidence against the null hypothesis.

5) Why is there also a confidence interval?

The confidence interval shows a plausible range for the true difference between the two proportions. It gives more context than a simple significant or not significant decision.

6) What if expected counts are below 5?

The z approximation may be weak. In that situation, consider an exact method such as Fisher's exact test, especially for small samples or very rare outcomes.

7) Can I enter percentages instead of counts?

No. Enter raw successes and raw sample sizes. The calculator converts those counts into sample proportions and then performs the hypothesis test correctly.

8) What does Cohen's h mean here?

Cohen's h is an effect size for differences between proportions. It helps describe practical magnitude, even when sample size makes the p value appear very small.

Related Calculators

binomial test calculatorab test sample sizeeffect size calculatorbayesian ab testab test calculatorab test significancepooled variance testab test p valueab test powerrisk ratio significance

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.