Marketers and product teams use A/B tests to decide whether a change really improved results or the difference is noise.
How to use the Two-Proportion z-Test Calculator
- Visitors in A
- Conversions in A
- Visitors in B
- Conversions in B
Results update as you type, and every field accepts the units shown in its menu.
How it works
The pooled proportion gives the standard error under the null hypothesis of no difference.
Inputs explained
| Field | What to enter |
|---|---|
| Visitors in A | A number |
| Conversions in A | A number |
| Visitors in B | A number |
| Conversions in B | A number |
What each result means
- Rate A = [Conversions in A]÷[Visitors in A]×100
- Rate B = [Conversions in B]÷[Visitors in B]×100
- Relative uplift (B vs A) = ([Rate B]÷[Rate A] – 1)×100
- z statistic = ([Conversions in B]÷[Visitors in B] – [Conversions in A]÷[Visitors in A])÷sqrt([Pooled]×(1 – [Pooled])×(1÷[Visitors in A] + 1÷[Visitors in B]))
- Two-tailed p-value = 2×(1 – ncdf(abs([z statistic])))
Example values
How the main result changes when Visitors in A changes and everything else stays at the example values above:
| Visitors in A | Two-tailed p-value |
|---|---|
| 2,500 | 8.4631e-8 |
| 3,750 | 0.3612 |
| 5,000 | 0.0291 |
| 6,250 | 4.2898e-6 |
| 7,500 | 4.0627e-11 |
| 10,000 | 0 |
Formula
p̂ = (x₁ + x₂) ÷ (n₁ + n₂)z = (p₁ − p₂) ÷ √(p̂(1 − p̂)(1/n₁ + 1/n₂))Worked example
Inputs — Visitors in A: 5,000; Conversions in A: 200; Visitors in B: 5,000; Conversions in B: 245.
Results — Rate A = 4 %; Rate B = 4.9 %; Relative uplift (B vs A) = 22.5 %; z statistic = 2.1823; Two-tailed p-value = 0.02909.
Frequently asked questions
How long should I run an A/B test?
Decide the sample size in advance and run full weeks to cover weekly patterns.
Can I stop when p < 0.05?
Peeking repeatedly inflates false positives; fix the sample size first.
What formula does the Two-Proportion z-Test Calculator use?
p̂ = (x₁ + x₂) ÷ (n₁ + n₂).