Calculates on this device. File exports run online.
A/B Test Calculator
Enter the visitors and conversions of each variant to see the conversion rates, the uplift, the p-value and whether the difference is significant. The second mode plans how many visitors and days a test needs.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to check a test result
- Choose Is my test result significant?.
- Type the visitors and conversions of the control (A) and of the variant (B). Add rows for more variants.
- Choose the confidence level, usually 95%. Under More options you can make the test one-sided.
- Press Calculate. The result says whether B differs from A, by how much, and the Bayesian chance that B is better.
How to plan a test
- Choose How many visitors does my test need?.
- Type the conversion rate of the control today and the smallest change you want to detect.
- Type the visitors per day to also see how many days the test needs.
The formulas
- z test of two proportions: z = (pB − pA) ÷ √(p̂(1 − p̂)(1/nA + 1/nB)), with the pooled rate p̂. The p-value comes from the normal distribution.
- Interval of the difference: (pB − pA) ± z × √(pA(1 − pA)/nA + pB(1 − pB)/nB).
- Several variants: each is compared with the control at α ÷ (k − 1) (Bonferroni), so the chance of a false winner stays at α.
- Bayesian chance that B beats A: with flat Beta(1, 1) priors, worked out exactly (not by simulation).
- Sample size per variant: n = [z_α √(2 p̄ q̄) + z_β √(p1 q1 + p2 q2)]² ÷ (p2 − p1)² (Fleiss, Levin and Paik).
Worked example
A: 10,000 visitors and 500 conversions (5.0%). B: 10,000 visitors and 570 conversions (5.7%). The uplift is 14%. The pooled rate is 5.35%, z = 2.20 and the two-sided p-value is 0.028, so the difference is significant at 95%. The 95% interval of the difference is 0.08 to 1.32 percentage points.
To detect a change from 10% to 12% (20% relative) with 95% confidence and 80% power, each variant needs 3,841 visitors.
Limits you should know
- The tests assume that visitors are independent and were assigned at random. Check the sample ratio: very uneven visitor counts point to a problem in the set-up.
- Do not stop a test the first time the p-value drops below the level: peeking makes false winners more likely. Decide the sample size first.
- A significant result says the difference is unlikely to be chance alone; it does not say the change is worth making.