Statistical significance calculator. Is your A/B test result real?

Statistical significance tells you whether the gap between two versions in an A/B test is bigger than chance alone would produce. Enter the visitors and conversions for A and B to get the p-value and a plain verdict at the confidence level you choose.

By Brady Heinrich · Updated

Usually 90, 95 or 99. Decide it before the test starts.

Result at 95% confidenceSignificant

B converts better than A, and the gap is unlikely to be chance: if the two versions really performed the same, a difference this large would show up 2.78% of the time.

P-value
0.0278
Conversion rate A
5%
Conversion rate B
5.7%
Relative change, A to B
+14%
Z-score
2.2
The formula

z = (rate B - rate A) / sqrt(p x (1 - p) x (1 / visitors A + 1 / visitors B)), where p = total conversions / total visitors

A worked example

Version A gets 500 conversions from 10,000 visitors (5%) and version B gets 570 from 10,000 (5.7%). The pooled rate is 1,070 / 20,000 = 5.35%, the standard error is 0.00318, and z = 0.007 / 0.00318 = 2.2. The two-sided p-value is 0.0278, which is below 0.05, so the result is significant at 95% confidence.

How to calculate statistical significance for an A/B test

Compare the two conversion rates with a two-proportion z-test. The calculator does it in five steps:

  1. Work out each conversion rate: conversions divided by visitors, for A and for B.
  2. Pool the two groups: p = total conversions / total visitors. This is the best estimate of the rate if the versions were really the same.
  3. Work out the standard error: the square root of p x (1 - p) x (1 / visitors A + 1 / visitors B).
  4. Divide the difference in rates by the standard error. That is the z-score.
  5. Convert the z-score to a two-sided p-value using the normal distribution.

The result is significant when the p-value is below 1 minus your confidence level: below 0.05 for 95% confidence, below 0.01 for 99%.

What the p-value means

The p-value is the chance of seeing a gap at least this large if the two versions truly performed the same. A p-value of 0.0278 means a difference this big would turn up about 2.78% of the time from random variation alone.

It is not the chance that B is better, and it is not the chance that the result is wrong. It only says how surprising the data would be if nothing had changed. A low p-value makes "nothing changed" hard to believe. A high one means the test cannot tell the versions apart yet.

Why sample size decides the verdict

The same uplift can be significant or not depending on how many visitors saw each version. Each row below has a 5% rate for A and a 5.7% rate for B, a 14% relative uplift.

Visitors per versionConversions AConversions BZ-scoreP-valueSignificant at 95%?
1,00050570.70.4867No
5,0002502851.560.1199No
10,0005005702.20.0278Yes
20,0001,0001,1403.110.0019Yes

A test that is not significant has not proved the versions are equal. It has only failed to gather enough evidence. Small differences on low traffic pages can take a long time to confirm, which is a reason to test bigger changes there.

How to read the result

Read the verdict together with the size of the change. Significant means the gap is probably real, not that it is large enough to matter. A 0.1 point lift can be significant on a huge sample and still not be worth shipping. Check the relative change against what the change costs to build and maintain.

Use the conversion rate calculator to check the rates themselves, and see the glossary entry on A/B testing for how to set a test up.

Common mistakes

  1. Stopping when the result first turns significant. P-values swing early in a test. Checking daily and stopping at the first value below 0.05 produces false winners far more often than the confidence level suggests. Set the sample size in advance and read the result once.
  2. Choosing the confidence level afterwards. Dropping from 95% to 90% because the result just missed is deciding the answer first.
  3. Testing many variants or metrics at once. Each extra comparison is another chance for a false positive. With several variants, use a stricter level.
  4. Ignoring unequal conditions. Both versions have to run over the same dates with visitors split at random. A week of A followed by a week of B is not an A/B test.
  5. Counting visits instead of visitors. The test assumes each observation is independent. One person counted five times is not five people.

How people search for a statistical significance calculator

  • statistical significance14,800 a month
  • statistical significance calculator2,900 a month
  • significance calculator2,900 a month
  • how to calculate statistical significance590 a month
  • ab test calculator390 a month
  • ab test significance calculator50 a month

US monthly searches, Google Ads keyword data.

Questions

What is a good p-value for an A/B test?

Below 0.05 is the common convention, which matches 95% confidence. Use 0.01 when a wrong call would be expensive to reverse, and decide the threshold before the test starts.

Is this a one-sided or two-sided test?

Two-sided. It asks whether B is different from A in either direction, which is the safer default because a variant can also make things worse.

What does 95% confidence mean?

It means you accept a 5% chance of calling a difference real when the two versions actually perform the same. It does not mean there is a 95% chance that B is better.

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

It depends on the baseline rate and the smallest lift you want to detect. Lower baseline rates and smaller lifts need far more visitors. In the table above, a 14% relative lift on a 5% baseline was significant at 10,000 visitors per version and not at 5,000.

Why does the calculator say there is nothing to test?

The test needs at least one conversion and one non-conversion across the two groups, and no more conversions than visitors. With zero conversions overall there is no variation to measure.

Keep reading

Building something ambitious? Let's talk.

We reply within one business day.