CompoundPage

A/B Test Calculator

A p-value under 0.05 is where most A/B tools stop, and where most bad decisions start. This A/B test calculator goes on to show the interval, the power the test actually had, and how many visitors it needed.

Set before the test starts, not after you have seen the p-value.

One-sided is easier to pass and cannot detect that the variant made things worse.

%The smallest lift worth acting on. Leave at 0 to size the test for the lift you observed.

Significant at 95%Yes, p = 0.022

Control conversion rate 480 of 12,000 visitors.
4%
Variant conversion rate 552 of 12,000 visitors.
4.6%
Absolute lift The difference in percentage points. Multiply this, not the relative figure, by your traffic and the value of a conversion to get what the change is worth.
+0.6 points
Relative lift The change as a share of the control rate. It is the figure usually quoted and it makes small effects on low rates sound large: a 0.1-point gain on a 0.5% rate is a 20% lift.
+15%
z-score +0.6 points divided by a pooled standard error of 0.262 points. The test needs |z| above 1.96 for 95% two-sided.
2.291
p-value If the variant truly made no difference, a gap at least this large in either direction would turn up 2.2% of the time by chance. It is not the probability that the variant is better.
0.022
Significant at 95% p = 0.022 is below 0.05. That clears the bar you set; it does not make the measured lift the true lift, and it does not make the lift worth shipping on its own.
Yes
95% confidence interval for the difference Unpooled standard error of 0.262 points. The data are consistent with any true difference in this range. It excludes zero, but its low end is the effect to plan around.
+0.09 to +1.11 points
Power for the observed effect The chance a test this size would reach significance if the true effect were exactly what you measured. Treat it as a description, not evidence: it is a function of the p-value and adds nothing to it. The useful question is the next one. A significant result from a test below 80% power tends to overstate the effect, because only the lucky draws clear the bar.
63%
Visitors needed per variant To detect the observed 4% to 4.6% with 80% power at 95% two-sided. You have 12,000 in the smaller group: 67% of what the test needed, so a real effect this size would be missed about 37% of the time. Fix this number before the test starts and stop when you reach it.
17,943
Visitors per variant for 80% power at 95% two-sided, from a 4% baseline
Relative liftVariant ratePer variantTotal
+2%4.08%950,8871,901,774
+5%4.2%154,304308,608
+10%4.4%39,47578,950
+15%4.6%17,94335,886
+20%4.8%10,31720,634
+30%5.2%4,7839,566
+50%6%1,8633,726
  • Checking the result as it comes in and stopping the first time it reads significant inflates the false-positive rate well beyond the level you chose. Decide the sample size first and read the result once.
  • At 95% confidence, 1 in 20 tests of a change that does nothing will still come out significant. Run twenty variants, or check twenty metrics, and expect one false winner.
  • Statistical significance says an effect is probably not zero. Whether it is large enough to be worth shipping is a separate question, answered by the confidence interval and what a conversion is worth.

How the A/B Test Calculator works

An A/B test compares two conversion rates and asks whether the gap between them is larger than chance would produce. With 480 conversions from 12,000 control visitors (4.0%) and 552 from 12,000 on the variant (4.6%), the variant is 0.6 points ahead, a 15% relative lift. The question is whether a gap that size could plausibly appear between two identical pages.

The standard method is the two-proportion z-test. Under the assumption that the variant makes no difference, both groups share one conversion rate, estimated by pooling them: 1,032 conversions from 24,000 visitors. That gives a standard error for the difference, and the z-score is the observed difference divided by it, here about 2.29. The p-value is the probability of a z at least that extreme if the null were true, read from the normal distribution: about 0.022 two-sided. Below 0.05, so significant at 95%; above 0.01, so not at 99%.

The p-value is widely misread. It is not the probability that the variant is better, and it is not the probability that the result is a fluke. It is the probability of data this extreme on the assumption that there is no effect. And a 95% threshold means exactly what it says: test a change that does nothing and one time in twenty it will come out significant. Test twenty headlines, or check twenty metrics on one test, and one of them is expected to "win" on noise alone.

PEEKING is the most common way tests go wrong. A p-value is valid for one look at a sample size fixed in advance. Check a running test every day and stop the first time it dips below 0.05, and the real false-positive rate is several times the 5% you think you are running at, because a random walk crosses a threshold far more often than it ends below it. Decide the sample size before the test starts and read the result once. Sequential testing methods exist that allow early stopping legitimately, but they use adjusted thresholds; an ordinary p-value checked repeatedly is not one of them.

That is why the sample size is the most useful number on the page. It depends on the baseline rate, the smallest lift you care about, the confidence level and the power (the chance of detecting the lift if it is real, conventionally 80%). Small lifts on low rates need very large samples: halving the lift you want to detect roughly quadruples the visitors required. The table shows how fast it grows. For the defaults, detecting a 15% lift at 80% power needs about 18,000 visitors per variant and the test had 12,000. It reached significance anyway, which happens. But an underpowered test that does reach significance tends to overstate the effect, since only the draws that happened to run high cleared the bar. Expect the lift to shrink after launch.

The power figure for the observed effect is reported because people ask for it, with a warning: it is a direct function of the p-value and tells you nothing the p-value did not. A non-significant test with low observed power is not evidence that the variant has no effect. It is evidence that the test was too small to say.

ONE-SIDED OR TWO-SIDED. A one-sided test only asks whether the variant is better. It reaches significance with a smaller gap, which is why it is tempting, and it is blind to the variant making things worse. Choosing one-sided after seeing which way the result went halves the p-value for free and is a form of peeking. Two-sided is the safer default.

Finally, statistical significance is not practical significance. With enough traffic a 0.02-point difference is significant and worth nothing. The confidence interval is the honest summary: it is the range of true differences consistent with the data, and its low end, multiplied by your traffic and the value of a conversion, is what the change can be counted on to be worth.

The method assumes visitors are independent and randomly assigned, and that the test ran long enough to cover a full business cycle of weekdays and weekends. It does not correct for testing several variants or several metrics at once.

A/B Test Calculator FAQ

How do you calculate A/B test significance?

With a two-proportion z-test. Pool both groups' conversions to estimate a shared rate, compute the standard error of the difference from it, and divide the observed difference by that standard error to get z. The p-value is the normal-distribution probability of a z at least that extreme. If it is below 1 minus your confidence level (0.05 at 95%), the result is significant.

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

It depends on the baseline conversion rate, the smallest lift worth detecting, the confidence level and the power. Small lifts on low conversion rates need large samples: halving the lift you want to detect roughly quadruples the visitors needed. Decide the minimum lift that would change your decision, compute the sample size for it before starting, and run to that number.

Can I stop an A/B test as soon as it is significant?

Not with an ordinary p-value. It assumes one look at a sample size chosen in advance. Checking repeatedly and stopping at the first significant reading inflates the false-positive rate far above the level you chose. Either fix the sample size and look once, or use a sequential testing method designed for early stopping.

What does a p-value of 0.05 mean?

That if the variant made no difference, a gap at least as large as the one observed would appear 5% of the time by chance. It is not a 95% chance that the variant is better. It also means that one in twenty tests of changes that do nothing will look significant at that threshold.

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

Two-sided, unless you decided in advance that a worse variant and a neutral one lead to the same action. One-sided tests reach significance with smaller gaps because they ignore the possibility of harm, and switching to one-sided after seeing the data halves the p-value without any new evidence.

Related calculators

Embed this calculator
<div id="compoundpage-ab-test-calculator"></div>
<script src="https://compoundpage.com/embed/ab-test-calculator.js" async></script>

The same calculation as JSON