Skip to content

A/B Test Calculator

Check if your A/B test result is significant: conversion rates, lift, p-value, confidence interval, sample-ratio mismatch, sample size and a Bayesian option.

Calculator Details

Significant at 95%:p = 0.0278See results ↓

Users or sessions that saw version A

How many of them converted (bought, signed up, clicked)

Users or sessions that saw version B

How many of them converted

Frequentist z-test and p-value, or the Bayesian probability that B beats A

95% means a 5% chance of a false positive when there is no real difference (α = 0.05)

Two-sided: B is different from A. One-sided: B is better than A (decide before the test starts)

Your Results

Significant at 95%: p = 0.0278

Significant at 95%

p = 0.0278

Relative lift +14%

Conversion rate A

5%

Conversion rate B

5.7%

Absolute lift

+0.7 pp

95% CI 0.076 to 1.324 pp

Chance B beats A (Bayesian)

98.6%

Sample size needed per variant

31,234

80% power to detect 5.5% vs the baseline

Visitor split looks fine: sample-ratio check p = 1 (flagged below 0.001).
For the effect you set in the planner, each variant needs 31,234 visitors, about 21,234 more than the smaller variant has. Stopping early when the p-value first dips under 0.05 inflates false positives.

B converted at 5.7% against 5% for A, a lift of 14%. That is statistically significant at 95% confidence (p = 0.0278).

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Where each conversion rate probably lies

Where each conversion rate probably lies

Detailed Breakdown

Two-proportion z-test, step by step
StepValue
Conversion ratesA 500/10000 = 5%, B 570/10000 = 5.7%
Pooled rate p̄ = (cA + cB) ÷ (nA + nB)5.35%
Standard error √(p̄(1 − p̄)(1/nA + 1/nB))0.318238 percentage points
z = (pB − pA) ÷ SE2.19961
p-value = 2 × P(Z > |z|)0.02783
95% CI of pB − pA (unpooled SE 0.3182 pp × 1.96)0.07634 to 1.3237 pp

How This Calculator Works

How it is calculated

z = (pB − pA) ÷ √(p̄(1 − p̄)(1/nA + 1/nB)), p̄ = (cA + cB) ÷ (nA + nB)

CI = (pB − pA) ± z* × √(pA(1 − pA)/nA + pB(1 − pB)/nB)

n per variant = (z₁₋α/₂√(2p̄q̄) + z₁₋β√(p₁q₁ + p₂q₂))² ÷ (p₂ − p₁)²

Bayesian: Beta(1 + conversions, 1 + non-conversions) for each rate; P(B > A) in closed form

Your numbers: pA = 500 ÷ 10,000 = 5%, pB = 570 ÷ 10,000 = 5.7%. The pooled rate is 5.35% and the standard error 0.3182 percentage points, so z = 0.7 ÷ 0.3182 = 2.2 and the two-sided p-value is 0.0278, below α = 0.05. With Beta(1, 1) priors the probability that B's true rate is higher is 98.61%.

Frequently Asked Questions

How do I know if my A/B test is statistically significant?

Compare the p-value with your significance level α (0.05 for 95% confidence). If p is below α, a difference this large would be unlikely if A and B really converted at the same rate. With 500 conversions from 10,000 visitors in A and 570 from 10,000 in B, z = 2.20 and p = 0.028, which is significant at 95% but not at 99%.

What does the p-value mean in an A/B test?

It is the probability of seeing a difference at least as large as yours if there were no real difference. It is not the probability that B is better, and a p-value of 0.03 does not mean a 97% chance that B wins. For that kind of statement, switch to the Bayesian method.

What is the difference between absolute and relative lift?

Absolute lift is the difference in conversion rates in percentage points: 5.7% − 5.0% = 0.7 points. Relative lift divides that by the control rate: 0.7 ÷ 5.0 = 14%. Reports usually quote relative lift; the confidence interval here is for the absolute difference.

Should I use a one-sided or two-sided test?

Two-sided unless you decided before the test that you only care whether B is better and would treat "B is worse" the same as "no difference". A one-sided test halves the p-value, so choosing it after seeing the data overstates the evidence.

How many visitors do I need for an A/B test?

It depends on the baseline rate, the smallest lift worth detecting, the confidence level and the power. To detect a 10% relative lift on a 5% baseline (5% to 5.5%) at 95% confidence and 80% power you need about 31,234 visitors per variant. Halving the lift you want to detect roughly quadruples the sample.

What is a sample-ratio mismatch?

When the traffic split differs from the plan by more than chance allows, for example 50,000 and 49,000 visitors in a 50/50 test. A χ² test checks it; the calculator flags p-values below 0.001. A mismatch usually means a bug (redirects, bot filtering, tracking that fails in one variant), and the test result can't be trusted until it is explained.

What does the Bayesian probability that B beats A mean?

Starting from a flat prior (every conversion rate equally likely), it is the probability, given your data, that B’s true conversion rate is higher than A’s. For the default numbers it is about 98.6%. It answers the question most people actually ask, but it doesn’t say how much better B is or whether the lift is worth the change.

Can I stop the test as soon as it becomes significant?

Not with a fixed-sample test like this one. Checking the p-value every day and stopping at the first dip below 0.05 raises the false-positive rate far above 5%. Decide the sample size in advance with the planner and read the result once, or use a sequential method designed for repeated looks.

Significance uses the pooled two-proportion z-test and the confidence interval the unpooled (Wald) standard error, as in the NIST/SEMATECH e-Handbook §7.3.3; the results match R's prop.test without continuity correction. The interval is two-sided at the chosen level, also for a one-sided test. Sample size follows Fleiss, Levin & Paik (normal approximation, no continuity correction, rounded up). The sample-ratio mismatch check is a χ² test of the visitor counts against the planned split, flagged below p = 0.001 (Kohavi, Tang & Xu 2020). The Bayesian option uses flat Beta(1, 1) priors and the exact probability that B beats A (a normal approximation above 200,000 conversions). Not included: more than two variants (no multiple-comparison correction), revenue or other continuous metrics (use the t-test calculator), sequential testing or early stopping, CUPED variance reduction, and the relative lift's own confidence interval.

A/B Test Calculator: Significance, Lift, Sample Size and Bayesian Odds

By FindMySum · Last reviewed

This A/B test calculator tells you whether the difference between two versions of a page, email or ad is likely to be real or just noise. Enter the visitors and conversions for the control (A) and the variant (B) to get both conversion rates, the absolute and relative lift, the z-score and p-value of a two-proportion test, a confidence interval for the difference and a check that traffic was split as planned. Switch to the Bayesian method for the probability that B is better, and open the planner to work out how many visitors a test needs before you start.

Worked example: 500 against 570 conversions

The calculator opens with 10,000 visitors in each group: 500 conversions in A and 570 in B.

  1. Conversion rates. A: 500 ÷ 10,000 = 5.0%. B: 570 ÷ 10,000 = 5.7%.
  2. Lift. B is 0.7 percentage points higher, a relative lift of 0.7 ÷ 5.0 = 14%.
  3. Pooled rate. If A and B were the same, the best estimate of the common rate is (500 + 570) ÷ 20,000 = 5.35%.
  4. Standard error. √(0.0535 × 0.9465 × (1/10,000 + 1/10,000)) = 0.318 percentage points.
  5. z-score. 0.7 ÷ 0.318 = 2.20.
  6. p-value. The chance of a z at least that far from zero in either direction is 0.028.
  7. Decision. 0.028 is below 0.05, so the lift is significant at 95% confidence. It is not significant at 99% (α = 0.01).

The 95% confidence interval for the difference, using each group's own variance, runs from 0.08 to 1.32 percentage points: the data support a real improvement, but it could be anywhere from tiny to about a 26% relative lift. The Bayesian method puts the probability that B's true rate is higher at about 98.6%.

The two-proportion z-test

Each visitor either converts or doesn't, so a conversion rate is a proportion. When the samples are large, the difference between two sample proportions is close to normally distributed, and the z-test measures how many standard errors the observed difference is from zero. Under the null hypothesis that both versions convert at the same rate, the best estimate of that rate pools the two groups, which is why the standard error uses p̄. This is the test in the NIST/SEMATECH e-Handbook, and its p-value is the same as a chi-square test on the 2 × 2 table without Yates' continuity correction (R's prop.test(correct = FALSE)).

The confidence interval is built differently, around the observed difference rather than around zero, so it uses each group's own rate: √(pA(1 − pA)/nA + pB(1 − pB)/nB). That is the usual Wald interval. Because the two standard errors differ slightly, a result right at the edge of significance can have a p-value just under 0.05 and an interval that just touches zero, or the reverse.

One-sided or two-sided

A two-sided test asks whether B is different from A in either direction. A one-sided test asks only whether B is better, and its p-value is half as large. Use it only when you decided in advance that a worse B would be treated the same as no difference, and never switch after seeing the data. Most experimentation teams use two-sided tests by default.

Checking the traffic split

Before trusting any result, check that the groups are the sizes you planned. If a 50/50 test ends with 50,000 and 49,000 visitors, the gap of 1,000 is more than chance allows: a chi-square test gives p ≈ 0.0015. Ronny Kohavi and colleagues, who ran experimentation at Microsoft, Amazon and Airbnb, call this a sample-ratio mismatch and treat it as a sign of a bug, such as a redirect that loses some visitors, bots filtered in one version only, or tracking that fails on one design. The calculator flags p-values below 0.001, the threshold used in their book's examples; some platforms use 0.0005. A mismatch doesn't tell you which group is wrong, only that the comparison is no longer fair.

Planning the sample size

Running a test until it "looks significant" is the most common way to get false winners. Plan the size first: open the planner and enter the baseline conversion rate, the smallest relative lift that would be worth acting on, the confidence level and the power (the chance of detecting the lift if it is real). The formula is the standard normal approximation in Fleiss, Levin and Paik's textbook, the one R's power.prop.test solves. A 5% baseline and a 10% relative lift need 31,234 visitors per variant at 95% confidence and 80% power, and 41,813 at 90% power. Small effects on low baselines need very large samples: a 5% lift on a 3% baseline at 99% confidence needs more than 309,000 visitors per variant.

The Bayesian view

The Bayesian option starts from a flat prior, treating every conversion rate as equally likely, and updates it with the data. Each rate's belief becomes a beta distribution, Beta(1 + conversions, 1 + non-conversions), and the calculator works out the exact probability that a draw from B's distribution beats one from A's, using a closed-form sum published by Evan Miller. It agrees with a two-million-draw simulation to four decimal places. Above 200,000 conversions the sum would be slow, so a normal approximation is used and labelled.

The probability is easier to explain than a p-value, but it is not a licence to stop whenever it crosses 95%: peeking inflates errors in Bayesian tests too, and a 95% chance that B is better says nothing about how much better.

What the calculator does not do

It compares two groups on a yes-or-no metric with a fixed sample. It doesn't correct for several variants or several metrics, handle revenue or other continuous measures, support sequential designs with planned interim looks, or apply variance-reduction methods such as CUPED. For those, use a dedicated experimentation platform or a statistician.

More questions

Why is 95% confidence the usual standard?

It is a convention from scientific practice: a 5% chance of a false positive when there is no real effect. Nothing makes 95% special. A team running dozens of tests a year will see some false winners at 95%, and for a costly or hard-to-reverse change 99% is safer. For a cheap, easily reversed tweak, 90% can be reasonable.

What does a confidence interval that crosses zero mean?

That the data are consistent with B being slightly worse, no different or better than A. With 100 conversions from 1,000 visitors against 120 from 1,000, the 90% interval for the difference runs from −0.30 to +4.30 percentage points, so the test can't rule out no effect. The interval also shows the plausible size of the effect, which a p-value alone does not.

Can I test more than two variants at once?

Yes, but each extra comparison against the control adds another chance of a false positive. With four variants compared at α = 0.05, the chance that at least one looks significant by luck is about 19%. A Bonferroni correction (divide α by the number of comparisons) is the simplest fix; this calculator compares two groups only.

Does this calculator work for revenue per visitor?

No. The z-test here is for conversion rates, where each visitor either converts or not. Revenue, order value and time on site are continuous and usually very skewed, so they need a t-test on the per-visitor values (or a bootstrap), not a test of proportions.

Why did my significant winner not hold up after launch?

Several reasons are common: the result was a false positive (one in twenty at 95%), the test was stopped early when it first looked good, the novelty of a change wore off, or the test ran in an unusual week. The measured lift of a winning test also tends to overstate the true effect, because the tests that happened to come out high are the ones that get picked.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy