# Two-Proportion z-Test Calculator (A/B Test)

URL: https://speedycalculator.com/calculators/statistics/z-test-proportion/
Last updated: 2026-10-25

> The A/B test calculator compares two conversion rates with a two-proportion z-test, giving the relative uplift, z statistic and p-value so you can judge whether a difference is statistically significant.

## Inputs

- Visitors in A
- Conversions in A
- Visitors in B
- Conversions in B

## Results

- Rate A
- Rate B
- Relative uplift (B vs A)
- z statistic
- Two-tailed p-value

## Formula

```
p̂ = (x₁ + x₂) ÷ (n₁ + n₂)
z = (p₁ − p₂) ÷ √(p̂(1 − p̂)(1/n₁ + 1/n₂))
```

## Explanation

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

FieldWhat to enterVisitors in AA numberConversions in AA numberVisitors in BA numberConversions in BA 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 ATwo-tailed p-value2,5008.4631e-83,7500.36125,0000.02916,2504.2898e-67,5004.0627e-1110,0000

## 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**.

## FAQ

**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₂).


## Sources

- [NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/)
