Two Proportion Z Test and Confidence Interval Calculator
Enter the successes and the sample size for each of two groups. The calculator returns the confidence interval for the difference between the proportions and the pooled z test of the claim that the proportions are equal, with a conclusion in plain words.
Two proportion calculator
The design effect stays at 1 for a simple random sample. A survey sample from a complex design enters its design effect, and the standard error widens by the square root of that value.
How this calculator works
Each group gives a sample proportion: the count of successes divided by the sample size. The difference between the two proportions is the quantity of interest. A difference near zero points to two groups that behave alike. A difference far from zero points to a real gap, and the interval and the test judge how far is far enough.
The interval and the test use two different standard errors, on purpose. The interval treats each group on its own terms, because an interval should not assume the very equality the visitor wants to check. The test starts from the claim that the proportions are equal, so it pools both groups into one shared proportion and builds the standard error from that shared value. This pooled test is the standard form of the two-proportion z test.
The p-value is the chance of a gap at least as large as the one observed if the two proportions were truly equal. A p-value below the alpha level counts as evidence that the proportions differ. The conclusion line under the results states the decision in those terms. Each group needs a reasonable count of successes and failures for the normal approximation behind the z values to hold up. Groups with counts in single digits call for an exact method instead.
Worked example
Group 1 has 45 successes in 100 trials, a proportion of 0.45. Group 2 has 30 in 100, a proportion of 0.30. The difference is 0.15, with a standard error of 0.0676. The 95 percent interval for the difference runs from 0.0174 to 0.2826. The pooled proportion is 0.375, and the z statistic is 2.1909. The p-value is 0.0285, below 0.05, so the test rejects the claim that the proportions are equal.
Values computed from the standard normal distribution. The method was checked against reference calculations: the entries in the worked example reproduce to four decimal places, and the full pair record sits in the package verification file.