A/B test calculator: is the result significant?

In short

An A/B test shows two versions of a page to two randomly split groups of visitors and measures which one brings more conversions. Whether the difference is chance is answered by the two-proportion z-test. Enter visitors and conversions for both groups in the calculator. The page shows the p-value and the 95% confidence interval of the difference right away.

A/B test significance calculator

A/B test calculator
A (current version)
B (new version)

Significant The p-value is below 0.05. It seems unlikely that version B’s higher rate is just chance.

Rate A
5.00%
Rate B
6.00%
Relative difference
+20.0%
p-value
0.0283

95% confidence interval (B minus A): +0.11 to +1.89 percentage points

z = 2.193, pooled rate 5.50%

The bar shows the confidence interval of the difference. If it crosses the zero line, the difference could also be zero.

Because JavaScript is off, the page shows only the result for these sample values. The formulas are below in the section “How it’s calculated”.

Threshold: α = 0.05, two-sided test. The tool collects and sends no data; it calculates in your browser.

Enter visitors and conversions for both groups; the result updates as you type. You can write numbers as 5000 or 5,000.

What is an A/B test?

In an A/B test, visitors are split randomly into two groups. Group A sees the current version, group B the changed one. Then you compare the conversion rate of the two groups.

You decide what counts as a conversion, such as a sign-up or a purchase. In a checkout it is usually a completed order.

Two rates are almost never the same. The real question is whether the difference is real or chance. The calculator answers it with the two-proportion z-test.

How it's calculated

The calculator uses the formulas from the Wikipedia article on the two-proportion z-test. Say group A has nA visitors and xA conversions, and group B has nB and xB.

  1. Conversion rates: pA = xA/nA and pB = xB/nB.
  2. Pooled rate: p̄ = (xA+xB)/(nA+nB). The test assumes there is no difference between the versions, so it combines both groups into one rate.
  3. Standard error: SE = √(p̄(1−p̄)(1/nA+1/nB)).
  4. Test statistic: z = (pB−pA)/SE.
  5. Two-sided p-value: 2 × (1 − Φ(|z|)). Φ is the cumulative distribution function of the standard normal distribution.

To calculate Φ in the browser I use one of Abramowitz and Stegun's approximations. It computes the error function (erf) with an error of at most 1.5 × 10−7. You get to the normal distribution through Φ(z) = ½(1 + erf(z/√2)).

The confidence interval doesn't use the pooled rate, but the variance of each group separately.

(pB−pA) ± 1.96 × √(pA(1−pA)/nA + pB(1−pB)/nB).

For the relative difference, (pB−pA)/pA is calculated and shown as a percentage.

Because the two calculations use different standard errors, their results can differ slightly. The Wikipedia example is a borderline case: 1,000 visitors per group, 120 conversions in one and 150 in the other. The p-value is about 0.0497, just under 0.05, and the confidence interval only just excludes zero.

I don't read a result like that as “definitely won”. Enter the same numbers in the calculator and see for yourself.

How many visitors do you need?

Work out before you start how many visitors you need per group. Two numbers are enough: your current conversion rate and the smallest difference you want to detect.

Sample size
Rate
5.00% → 6.00%
Per group
8,155
In total
16,310

Fixed values: α = 0.05 (two-sided), 80% power, both groups the same size.

Because JavaScript is off, the page shows only the result for these sample values.

Enter the current rate and the smallest difference you want to detect. By default the difference is in percentage points: from 5% to 6% is 1 point, or 20% relative.

The formula comes from the same Wikipedia article. Let p1 be the baseline rate and p2 the target rate. With two groups of the same size, the number of visitors per group is:

n = (zα/2+zβ)² × (p1(1−p1)+p2(1−p2)) / (p1−p2)².

For α = 0.05, zα/2 is about 1.96. For 80% power, zβ is taken as about 0.84. Example: with a baseline of 12% and a target of 15%, you need 2,033 visitors per group.

For a quick check, Evan Miller gives the rule n = 16σ²/δ². For a conversion rate, σ² = p(1−p), and δ is the smallest difference you're looking for.

Wikipedia calls the same rule Lehr's rule. It gives the number needed per group for a two-sided test with α = 0.05 and 80% power. For 12% and 3 points that is about 1,878, close to the formula's 2,033.

Small differences need a lot of traffic. To detect a rise of 1 point at a rate of 5%, you need 8,155 visitors per group.

When to read the result: peeking too early

The most common mistake is looking at the result every day and stopping the test on the first day it is significant. That's called peeking. Evan Miller shows in his 2010 piece that it inflates the false positive rate.

According to Miller's table, if you check the test 10 times and really want to keep the false positive rate at 5%, you have to lower the threshold to 1%. With 5 checks the threshold drops to 1.4%, with 2 checks to 2.2%.

In the piece's extreme example, a new logo with no effect at all is tested. After every observation someone looks, and the test stops at 5% significance or after 150 observations. The chance of finding a false significant result rises to 26.1%.

Miller's solution is simple: fix the sample size in advance and wait until the test is done. The sample size calculator above gives you that number. Don't decide by the badge on this page before you reach it.

My note

With teams that come to me I often see the same thing: the colour of a button gets tested, and the form that is the real problem stays as it is. A test is only as good as the idea behind it.

That's why I first look for where users get stuck. A usability test tells you what to change. The A/B test measures whether the change works.

With little traffic it can take weeks to reach the number of visitors you need. Then don't chase small differences; fix the big problems. If you don't know which flow to review first, I review up to 10 flows in UX Audit Pro.

Questions

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

It is the probability of seeing a difference at least as large as the one observed if there is in fact no difference between the versions. Below 0.05 the difference is usually considered significant.

How many visitors does an A/B test need?

It depends on your current rate and the difference you're looking for. To detect a 3-point difference at a rate of 12% with 80% power, you need 2,033 visitors per group. Enter your own numbers in the sample size calculator.

Can I stop the test as soon as it's significant?

No. If you stop before the sample size you worked out in advance, the risk of false positives goes up. Evan Miller's 2010 piece shows this with numbers.

Does the calculator store my numbers?

No. It calculates in your browser; no number is sent to a server or stored.

Sources (4)
  1. Wikipedia, Two-proportion Z-test (formulas for the pooled rate, confidence interval and sample size). accessed 2026-11-04
  2. Wikipedia, Error function (Abramowitz and Stegun approximations, relation to the normal distribution). accessed 2026-11-04
  3. Wikipedia, Power (statistics) (Lehr's rule and 0.84 for 80% power). accessed 2026-11-04
  4. Evan Miller, How Not To Run an A/B Test. April 18, 2010; peeking table and the 16σ²/δ² rule