Bell Statistics

A/B test analysis calculator

Your test has finished. Enter the conversions and the observations in each group, and get the effect, its confidence interval and a p-value — with the interval first, because it is the one that says which effects your data is actually consistent with. Planning a test rather than reading one? The sample size calculator is the other half of this page.

Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

Calculator

Test data
Test parameters

Unpooled by default. Pooled is the classic z-test.

Enter your numbers on the left and the result appears here.

When to use it

Use this when an experiment has finished, the outcome is binary — converted or not, signed up or not, still active on day 7 — and two independent groups were formed by random assignment. Four numbers describe the whole result: how many people entered each group, and how many of them converted.

Before you read any of it, check the split. If assignment was meant to be even and the two group sizes differ by more than chance explains, the metric is not worth interpreting yet — a sample ratio mismatch means something upstream is broken, and no amount of statistics downstream repairs it. The chi-square goodness-of-fit test is how you check it.

Neighbouring situations want a different page. Counts small enough that a cell holds single digits belong in Fisher's exact test, where the p-value is computed rather than approximated. One group against a fixed target is a one-proportion z-test. The same people measured twice is paired data and wants McNemar's test. And if the question is "are these two the same?" rather than "do they differ?", no significance test answers it — an equivalence test does.

Assumptions

The analysis inherits its assumptions from the design. Three of them can still be checked after the fact, and one cannot be repaired at all.

  • Random assignment, with one observation per randomised unit. This is the one that cannot be repaired: if assignment leaked — a user seeing both variants, a bot filling one group — the comparison is not an experiment any more and the p-value below describes a study you did not run.
  • The unit of analysis matches the unit of randomisation. Bucket by user but count sessions and the same user contributes several correlated rows, so the standard error is understated and every interval on this page is too narrow.
  • The sample size was fixed in advance. Checking daily and stopping at the first p below 0.05 pushes the real false-positive rate to somewhere between 20% and 40%. If you stopped early because the result looked good, the number below is not the number you think it is — see sequential testing for the designs that make early stopping legitimate.
  • The normal approximation is adequate, which it comfortably is once each of the four cells expects ten or more. Below that its p-values are untrustworthy at the third decimal and the exact test is the safer analysis — this page warns you when you are near that line rather than leaving you to notice.
  • One primary metric, nominated in advance. Five metrics at 5% each gives roughly a one-in-four chance of a false positive somewhere; multiple comparison corrections are how you spend that budget honestly.

How the calculation works

The p-value is a pooled z-test and the interval is not, which is deliberate rather than an inconsistency: the test is evaluated under the null that both groups share one rate, and the interval is not conditioned on that null being true. Reporting a pooled interval alongside a pooled test would be internally tidy and would give an interval that does not match the estimate above it.

Test statistic (pooled)
z = (p̂₂ − p̂₁) / √( p̄(1−p̄)(1/n₁ + 1/n₂) ), p̄ = (x₁ + x₂)/(n₁ + n₂)

Pooling is right here: the statistic is evaluated under the null that both groups convert at one rate, so that rate is estimated from everything. Squaring this z gives exactly the Pearson chi-square statistic for the same 2×2 table, which is why the two never disagree.

Interval on the difference (Newcombe)
(p̂₂ − p̂₁) − √((p̂₂ − l₂)² + (u₁ − p̂₁)²) to (p̂₂ − p̂₁) + √((u₂ − p̂₂)² + (p̂₁ − l₁)²)

Built from each group's Wilson limits (lᵢ, uᵢ) rather than one Wald standard error. It stays inside [−1, 1], holds close to nominal coverage at low conversion rates, and does not collapse to zero width when a group records no events — all three of which Wald gets wrong exactly where conversion tests live.

Interval on the relative effect (Katz)
exp( ln(p̂₂/p̂₁) ± z·√( (1−p̂₁)/x₁ + (1−p̂₂)/x₂ ) ) − 1

A separate interval, not a rescaling of the one above. Dividing the difference interval by the observed control rate — what most dashboards do — treats an estimate as a known constant and comes out too narrow, badly so when the control group is small. Undefined when either group converted nobody, and reported as such rather than filled in.

Continuity correction
z′ = ( |p̂₂ − p̂₁| − ½(1/n₁ + 1/n₂) ) / √( p̄(1−p̄)(1/n₁ + 1/n₂) )

Yates' correction for a 2 × 2 table: shrink the observed difference by half a discrete step before dividing, which makes the p-value larger. Say whether you applied it, because on a borderline result it moves p across the threshold. The correction never flips the sign — a correction larger than the difference means no evidence, not evidence the other way.

One-sided p, in the direction you named
p = 1 − Φ(z) for “variant higher”, p = Φ(z) for “variant lower”

The tail is taken on the side chosen before the data, never on whichever side the result happened to fall. Picking the direction afterwards halves every p-value and is the most common way a one-sided A/B test gets misused, so naming the wrong direction here returns a p near 1 rather than quietly reporting the other tail.

Worked example

A checkout test ran for two weeks. The control saw 12,500 users and 500 of them converted; the variant saw 12,480 users and 575 converted. You want the two-sided answer at the conventional 5% level.

Conversions, control
500
Observations, control
12,500
Conversions, variant
575
Observations, variant
12,480
Significance level (α)
0.05
Tails
Two-sided

4.00% against 4.61%: an absolute difference of 0.61 percentage points, a relative effect of 15.2%, z = 2.33 and p = 0.0198. The 95% interval on the difference runs from 0.10 to 1.12 percentage points, and the interval on the relative effect from 2.3% to 29.4%.

Significant, and much less precise than the headline suggests. The point estimate is a 15% relative improvement; the data is consistent with anything from 2% to 29%. If the business case needs 10% to justify the engineering cost, this test has not established it — the interval contains values well below that. Plan against the low end rather than the point estimate: a result that reached significance is likelier to have been helped by noise than hurt by it, which is most of why measured uplift differs from what shows up after rollout.

Interpreting the output

Start with the confidence interval on the difference, not the p-value. Both settle the yes/no question — the interval excludes zero exactly when p is below α — but only the interval says which effects the data is consistent with. An observed +0.6 points with an interval of [+0.05, +1.15] is significant and almost uninformative; +0.1 points with an interval of [−0.15, +0.35] is not significant and genuinely useful, because it rules out anything you would have acted on. That is the core recommendation in reporting A/B test results properly.

The p-value is the probability of a difference at least this large if both variants truly converted at the same rate. It is not the probability that the variant is better, not the probability the result replicates, and 0.049 and 0.051 are the same evidence.

Be careful with the relative effect, which is what stakeholders remember. Its interval is asymmetric and wider than the point estimate suggests, and the estimate is biased upward among tests that reached significance — a winner is likelier to have been helped by noise than hurt by it.

A non-significant result is not a finding of no effect. It is a finding that this much data could not separate the two, and whether that is useful depends entirely on the interval: if both ends are too small to act on, you have learned something real. If one end is still commercially large, the test was underpowered and the honest write-up says so rather than "no impact" — we design experiments where that is settled before launch rather than discovered after.

Frequently asked questions

My result is significant but the interval is huge. What now?
You have established a direction and not a magnitude. That is a legitimate outcome and it is often enough to ship — if the whole interval sits above the threshold that justifies the change, the decision is clear whatever the true value is. When the interval straddles that threshold, significance has not settled the business question, and running longer to narrow it is a real option rather than an admission of failure. What you should not do is quote the point estimate as the expected result: it is the single least likely value in a wide range to be exactly right.
p is 0.06. Can I call it a trend?
No, and 0.049 is not a discovery either. The threshold is a convention you adopted in advance to control a long-run error rate, not a property of the evidence — 0.049 and 0.051 are the same result and calling one a win and the other a trend is having it both ways. Report the estimate and its interval, say the test did not reach the threshold you set, and let the interval carry the nuance. If the decision genuinely cannot wait, say that it is being made on incomplete evidence and record what the interval was.
Should I use the pooled or the unpooled standard error?
Pooled, for the test. The statistic is computed under the null hypothesis that both groups share one conversion rate, so estimating that single rate from all the data is what the null says to do — and the pooled z is exactly equivalent to the Pearson chi-square test on the same table, which is why those two never disagree. The unpooled version is offered here for comparison with tools that report it, and it is a slightly different test rather than a different way of computing the same one. The interval is a separate matter: it is not conditioned on the null, so it is not pooled.
One group converted nobody. Why is the relative effect blank?
Because dividing by zero does not produce a large number, it produces no number. The relative effect is the difference as a share of the control rate, and a control rate of zero has no share to take. The absolute difference and its interval are unaffected and are the right things to read — Newcombe's interval is built from each group's Wilson limits and behaves correctly at the boundary, which is the specific reason this page uses it. No 0.5 has been added to any cell to make the ratio finite, because that would change the estimate to make the display tidier.
Do I need to check anything before reading this?
Check the split. If assignment was meant to be 50/50 and one group is meaningfully larger, something upstream is dropping or duplicating users, and whatever is doing that is very unlikely to be doing it evenly with respect to the metric. A sample ratio mismatch invalidates the comparison rather than adding noise to it, so it has to be settled before the conversion numbers mean anything. Put the two group sizes into the chi-square goodness-of-fit calculator against your intended ratio — it takes a minute and it is the cheapest bug detector an experiment has.

Related calculators

  • A/B test sample size

    Size an experiment before you launch, for a binary, continuous or ratio KPI — each with its own design and its own assumptions.

  • Fisher's exact test

    The right test for a 2×2 table of small counts — exact p-values, no normal approximation.

  • One-proportion z-test

    Test one observed rate against a fixed target — an SLA, a benchmark, a contractual floor.

  • McNemar's test

    Paired yes/no data — only the pairs that disagree carry any information, and this sizes on them.

Talk to the people who build these for a living

We read experiments where the metric, the decision rule and the threshold were agreed before anyone looked at the data. A/B Testing

References

  • Newcombe, R. G. (1998). Interval estimation for the difference between independent proportions: comparison of eleven methods. Statistics in Medicine, 17(8), 873-890.
  • Katz, D., Baptista, J., Azen, S. P., & Pike, M. C. (1978). Obtaining confidence intervals for the risk ratio in cohort studies. Biometrics, 34(3), 469-474.
  • Kohavi, R., Tang, D., & Xu, Y. (2020). Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing. Cambridge University Press.