# A/B test significance and sample size calculator

Updated 2026-11-23

Check if an A/B test result is statistically significant, with the p-value and lift, or work out the sample size a test needs before you start it.

The interactive tool runs in the browser at /tools/ab-test-significance-calculator.

An A/B test is significant when the gap between the two [conversion rates](/glossary/conversion-rate) is too large to be likely by chance: here, when the p-value of a two-proportion z-test is below 1 minus your confidence level (0.05 at 95%). The sample size mode answers the question to ask first: how many visitors each variant needs before that test can find the change you care about.

Enter visitors and conversions for each variant to get the p-value, the relative lift and its interval. Switch to sample size before a test starts, and to significance once it has reached the size you planned.

## How do you calculate A/B test significance?

With a two-proportion z-test, the standard test for comparing two conversion rates. It asks how far apart the rates are, measured in standard errors, if both variants really converted at the same rate.

```
rate A        = conversions A ÷ visitors A
rate B        = conversions B ÷ visitors B
pooled rate   = (conversions A + conversions B) ÷ (visitors A + visitors B)
standard error = √(pooled × (1 − pooled) × (1 ÷ visitors A + 1 ÷ visitors B))
z             = (rate B − rate A) ÷ standard error
p-value       = 2 × (1 − Φ(|z|))   two-sided
              = 1 − Φ(z)          one-sided, B better than A
```

Φ is the standard normal cumulative distribution. The result is significant when the p-value is below your alpha: 0.10, 0.05 or 0.01 for 90%, 95% or 99% confidence. The calculator also gives a confidence interval for the difference, using the unpooled standard error.

## A worked example

|  | Variant A | Variant B |
| --- | --- | --- |
| Visitors | 10,000 | 10,000 |
| Conversions | 300 | 360 |
| Conversion rate | 3.00% | 3.60% |

1. **Pooled rate.** 660 ÷ 20,000 = 3.3%.
2. **Standard error.** √(0.033 × 0.967 × (1 ÷ 10,000 + 1 ÷ 10,000)) = 0.00253.
3. **z.** (0.036 − 0.030) ÷ 0.00253 = 2.38.
4. **p-value.** Two-sided, 2 × (1 − Φ(2.38)) = 0.0175.
5. **Verdict.** 0.0175 is below 0.05, so B wins at 95% confidence. It is not below 0.01, so it would not pass at 99%.

B's relative lift is 20%: 0.6 percentage points on a 3% baseline. The 95% interval for the difference runs from about +0.10 to +1.10 points, so the true lift could be much smaller than the 20% you observed.

## How many visitors does an A/B test need?

It depends on three choices: your baseline conversion rate, the smallest change worth detecting (the minimum detectable effect), and how sure you want to be in both directions. The sample size mode uses the normal approximation for two proportions:

```
n per variant = (z₁ × √(2 × p̄ × (1 − p̄)) + z₂ × √(p₁(1 − p₁) + p₂(1 − p₂)))² ÷ (p₂ − p₁)²

p₁ = baseline rate, p₂ = the rate you want to detect, p̄ = (p₁ + p₂) ÷ 2
z₁ = 1.96 at 95% two-sided, z₂ = 0.84 at 80% power
```

| Baseline | Change to detect | Visitors per variant (95%, 80% power) |
| --- | --- | --- |
| 10% | To 12% (20% relative) | 3,841 |
| 3% | To 3.3% (10% relative) | 53,211 |
| 3% | To 3.6% (20% relative) | 13,914 |

Halving the effect you want to detect roughly quadruples the visitors you need: on a 3% baseline, a 5% relative lift takes 207,938 visitors per variant against 53,211 for 10%. That is why tests on small changes to low-converting pages take so long, and why a test of a bold change is often the better use of your traffic.

To turn the sample size into a run time, enter your daily visitors: the calculator divides the total by them. Round up to whole weeks, so weekday and weekend visitors are both in the test.

## How do you read the result?

A p-value of 0.03 means: if A and B truly converted the same, a gap at least this large would appear about 3% of the time. It is not the chance that B is better, and it says nothing about how large the lift is. Read the relative lift and its interval for that.

> **Do not peek.** Checking the result every day and stopping the moment it turns significant raises the false positive rate well above your alpha. Set the sample size before the test starts with the second mode, run to it, and read the result once.

1. **Significant, lift worth having.** Ship B. Expect the real lift to be somewhere in the interval, often lower than observed.
2. **Significant, lift too small to matter.** A large sample makes tiny differences significant. Significance is not importance.
3. **Not significant at the planned size.** You have not shown a difference. Either it is smaller than your minimum detectable effect, or there is none.
4. **Not significant, test cut short.** You have learned little. Run it to the planned size.

## What CrispStats does and does not do here

CrispStats does not run A/B tests: it does not split traffic, assign variants or pick winners. Use your testing tool for that. What it can do is count the outcome: a [goal](/glossary/goal) or a [custom event](/glossary/custom-event) for the conversion, and [funnels](/features/funnels) to see where each step loses people. To get each variant's rate from raw counts, use the [conversion rate calculator](/tools/conversion-rate-calculator); to put a value on a lift, the [revenue per visitor calculator](/tools/revenue-per-visitor-calculator) shows what a higher conversion rate is worth a month.

## Frequently asked questions

### What p-value is statistically significant?

One below your alpha, which is 1 minus your confidence level. At the common 95% level that is a p-value below 0.05. Choose the level before the test starts, not after you see the result.

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

Two-sided, unless you would genuinely do nothing different if B turned out worse. A one-sided test only looks for B beating A, so it reaches significance with fewer visitors but cannot tell you that B hurt conversions.

### What is statistical power?

The chance that the test detects an effect of the size you chose, if that effect is real. At 80% power, about one in five tests of a real lift of exactly that size will come back not significant. Raising power to 90% needs more visitors.

### Does this calculator store my numbers?

No. Every calculation runs in your browser and nothing is sent anywhere, so it works for results you cannot share.
