A/B test calculator
- p-value
- —
- Chance B beats A
- —
- z score
- —
Difference
Sample size
Test health
The working, step by step
In plain words
—
Report it
—
—
—
An A/B test calculator checks whether the difference in conversion rate between a control (A) and a variant (B) is real or just random noise. You enter the visitors and conversions for each version, and the calculator returns the uplift, the p-value, a confidence interval (CI) and a verdict.
Every A/B test result is a sample. Two identical pages never convert at exactly the same rate over a few thousand visits, so a gap of 0.3 percentage points can be pure chance. The calculator measures that chance with a two-proportion z-test, the standard test behind most A/B testing tools, and it is part of the Z Test Calculator suite.
This calculator answers 4 questions at once:
To use the calculator, enter 4 numbers and read the results as they update:
The verdict, the uplift, both charts and the 4 detail cards redraw on every keystroke. All calculations run in your browser, and no data leaves your device.
Read an A/B test result in 3 steps: the verdict, the size of the uplift, and the confidence interval around it.
The p-value is the probability of a gap at least as large as the observed one if A and B truly convert at the same rate. A p-value at or below α (0.05 at 95% confidence) gives the verdict "B wins" or "A wins". A larger p-value gives "No clear winner yet", which means the data cannot separate the two versions so far.
The relative uplift is (p̂B − p̂A) / p̂A, the change in conversion rate as a share of the control rate. A move from 4.0% to 4.7% is a +17.5% uplift and a +0.70 percentage point (pp) absolute difference. The confidence interval shows the range of uplifts the data supports: an interval of +3.1% to +33.9% says B is better, but the true gain is uncertain.
The chance that B beats A is the probability that B's true conversion rate is higher than A's, given the data. The calculator computes it from Beta distributions with a uniform prior, the same model used by Bayesian A/B testing tools. A value of 99.2% means B is very likely better; 50% means the data gives no edge to either version.
The left chart shows a curve for each version: the peak is the observed rate and the width is the uncertainty. Curves that overlap heavily mean the test cannot yet tell A and B apart. The right chart shows the difference B − A: the green area right of zero is the chance B is better, the red area left of zero is the chance A is better, and the bracket marks the confidence interval.
The A/B test z statistic is z = (p̂B − p̂A) / √(p̂(1 − p̂)(1/nA + 1/nB)), where p̂ is the pooled conversion rate.
| Symbol | Meaning |
|---|---|
| p̂A, p̂B | Conversion rates: conversions ÷ visitors |
| nA, nB | Visitors in each version |
| p̂ | Pooled rate: (xA + xB) / (nA + nB) |
The confidence interval for the difference uses the unpooled standard error, √(p̂A(1 − p̂A)/nA + p̂B(1 − p̂B)/nB). The interval for the relative uplift uses the log of the rate ratio, which keeps it accurate when the uplift is large. The same test, with the textbook layout, is on the two-proportion z-test page.
There are 2 worked examples below. Load either one with the example buttons above the results.
Checkout redesign: A converts 400 of 10,000 visitors, B converts 470 of 10,000.
Pricing page: A converts 150 of 5,000 visitors, B converts 120 of 5,000.
An A/B test needs about 13,329 visitors per version to detect a lift from 4.0% to 4.7% with an 80% chance of detection at 95% confidence. The Sample size card shows this number for your own rates and how much of it the test has reached. It shows the smallest lift your current sample can detect too.
Sample size grows fast as the lift shrinks: halving the detectable lift roughly quadruples the visitors needed. A page converting at 4% needs about 3,600 visitors per version to detect a 35% lift, but about 48,500 to detect a 9% lift. Plan the test length before launch with the sample size calculator.
The Test health card runs 2 checks that catch broken tests before you trust the result.
A sample ratio mismatch is a traffic split that differs from the planned split by more than chance allows. A 50/50 test that ends with 10,500 visitors in A and 9,500 in B has an SRM p-value below 0.0001, a sign of a bug in assignment, tracking or bot filtering. The calculator flags any split with SRM p < 0.001. Fix the cause before reading the result, since the two groups are no longer comparable.
The z-test needs at least 10 conversions and 10 non-conversions in each version. With fewer, the normal approximation is weak and the p-value is unreliable. Use Fisher's exact test for small tests, such as 4 conversions out of 120 visitors.
There are 6 common A/B testing mistakes:
A classic A/B test gives a p-value and a yes/no decision at a fixed confidence level, while a Bayesian A/B test gives the probability that B beats A. This calculator shows both. The two usually agree: in the checkout example, p = 0.0152 and the chance B beats A is 99.24%. The p-value answers "how surprising is this gap if nothing changed?", and the chance to beat answers "how likely is B to be better?". Report the p-value and confidence interval in formal reports, and use the chance to beat for business discussions.
There is no fixed good uplift: a good uplift is one whose confidence interval stays above zero and whose gain is worth the cost of the change. Small lifts of a few percent are common for mature pages, and lifts above 30% are rare, so check a very large lift for tracking errors before acting on it.
Yes, 90% confidence is enough for low-risk changes such as button text or images, but 95% is the standard for decisions that cost money to reverse. At 90% confidence, 1 in 10 tests between identical versions still shows a "winner".
An A/B test shows no clear winner when the gap between A and B is small compared with the noise in the data. Either the true difference is small, or the test has too few visitors. The Sample size card shows how many visitors per version the observed lift needs.
Yes, the chance B beats A can reach 90% to 95% while the two-sided test at 95% confidence is not significant. The two measures use different cut-offs: a 95% two-sided test needs roughly a 97.5% chance to beat before it calls B the winner.
A negative uplift means B converts worse than A. If the result is significant, keep the control. If not, the test has not shown a difference, and B can still be equal to A.
Report an A/B test with both conversion rates, both sample sizes, the z statistic, the p-value and the confidence interval. Example: "Variant B converted 4.7% of visitors (n = 10,000) and control A converted 4.0% (n = 10,000), z = 2.43, p = .015, 95% CI [0.13, 1.27] percentage points." Build a CI for one rate with the confidence interval calculator.