Business, Marketing & E-commerce Conversion Rate, Funnels & A/B Testing Two-proportion z-test (pooled variance)

A/B Test Statistical Significance Calculator

Enter the visitors and conversions for your control and your variant, and this calculator runs the two-proportion z-test that every experimentation platform uses under the hood. You get the z-score, the exact p-value, the confidence level, the observed relative lift, and — the number that actually matters — the confidence interval on the difference. The interval is what tells you whether you have measured a win or merely failed to rule out a loss.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Control visitorsUnique visitors assigned to the control, counted the same way as your conversions.8000
Control conversionsVisitors in the control who completed the goal. Must not exceed the visitor count.240
Variant visitorsUnique visitors assigned to the challenger, over exactly the same date range.8000
Variant conversionsVisitors in the challenger who completed the same goal.288
Significance thresholdThe bar the p-value has to clear. Choose it before you look at the data, not after.0.05 — 95% confidence
Test directionTwo-sided is the honest default for a ship decision, because a loss matters as much as a win.Two-sided (better or worse)

It returns

  • p-value — The chance of seeing a gap this large if the two pages were identical.
  • Confidence level
  • z-score
  • Control conversion rate
  • Variant conversion rate
  • Observed relative lift
  • Difference — lower bound
  • Difference — upper bound

The formula

z=p2p1p¯(1p¯)(1n1+1n2)
(p2p1)±z*p1(1p1)n1+p2(1p2)n2

In plain text: z = (p₂ − p₁) / √[p̄(1−p̄)(1/n₁ + 1/n₂)], p̄ = (x₁ + x₂)/(n₁ + n₂)

  • zTest statistic — how many standard errors apart the two rates are (—)
  • p₁, p₂Observed conversion rates of control and variant (decimal)
  • x₁, x₂Conversions in control and variant (count)
  • n₁, n₂Visitors in control and variant (count)
  • Pooled conversion rate across both arms, used because the null hypothesis says they are equal (decimal)

The p-value comes from the standard normal distribution: two-sided p = 2[1 − Φ(|z|)]. The confidence interval on the difference uses the unpooled standard error instead, because outside the null hypothesis the two arms have genuinely different variances.

Updated Category Conversion Rate, Funnels & A/B Testing Verified against published test cases Reading time 14 min

What statistical significance does and does not tell you

Significance answers one narrow question: if the two pages converted at exactly the same rate, how often would random assignment alone produce a gap at least this large? That probability is the p-value. A p-value of 0.03 means a gap this big would turn up 3% of the time by pure luck.

Notice what is missing from that sentence. The p-value is not the probability that the variant is better. It is not the probability that you are right. It says nothing about how big the improvement is, and nothing about whether the improvement is worth the engineering cost. A p-value of 0.001 on a 0.2% lift is a rock-solid measurement of something too small to matter.

This is why the confidence interval on the difference is the more useful output. A test that returns "p = 0.04, lift 25%, interval 1.3 to 8.7 percentage points" is telling you the variant is probably better and probably better by somewhere between a little and a lot. A test that returns "p = 0.31, lift 12%, interval −4 to +9 percentage points" is telling you that you have learned almost nothing: a meaningful loss is still on the table.

One more distinction worth burning in. A non-significant result is inconclusive, not a tie. Failing to reject the null hypothesis is not the same as showing the two pages are equivalent. To claim equivalence you need the whole interval to sit inside a band you consider negligible, which usually takes more traffic than proving a difference.

How the two-proportion z-test works

The test measures a distance and divides it by the noise in that distance. The distance is the observed gap between rates, p2p1. The noise is the standard error of that gap. The ratio, z, is the number of standard errors the gap covers, and a normal table turns that into a probability.

The pooled rate is the interesting part. The null hypothesis states the two rates are equal, so under the null there is only one true rate — and the best estimate of it uses every observation from both arms: = (x1 + x2) ÷ (n1 + n2). That is why the denominator uses rather than each arm's own rate. It is a deliberate choice: you compute the noise as if the null were true, then ask how unlikely your observation is.

The variance of a proportion is p(1−p). There is no separate spread parameter to estimate the way there is with a t-test — the rate determines its own variance. This is also why extreme rates are quieter than middling ones: at 50% the variance is 0.25, at 3% it is only 0.029.

Dividing by 1/n₁ + 1/n₂ makes the smaller arm dominate. If one arm has 100,000 visitors and the other 1,000, the standard error is set almost entirely by the small arm. Piling extra traffic into the control does very little; you have to grow both.

For the confidence interval the calculator switches to the unpooled standard error, √[p1q1/n1 + p2q2/n2]. Once you are estimating an effect rather than testing a null, you no longer assume the rates are equal, so each arm contributes its own variance. The two standard errors are close in practice, which is why a p-value just under 0.05 sometimes pairs with an interval whose bound sits a hair the wrong side of zero.

Worked example: 200 conversions from 1,000 versus 250 from 1,000

Your control page turned 1,000 visitors into 200 signups. The variant turned 1,000 visitors into 250. Work it through by hand at a 0.05 threshold, two-sided.

  1. Rates. p1 = 200 ÷ 1,000 = 0.2000. p2 = 250 ÷ 1,000 = 0.2500. The gap is 0.0500, or 5 percentage points.
  2. Pooled rate. = (200 + 250) ÷ (1,000 + 1,000) = 450 ÷ 2,000 = 0.2250.
  3. Pooled variance factor. (1 − ) = 0.2250 × 0.7750 = 0.174375.
  4. Sample-size factor. 1/1,000 + 1/1,000 = 0.002.
  5. Standard error. √(0.174375 × 0.002) = √0.00034875 = 0.0186748.
  6. z-score. 0.0500 ÷ 0.0186748 = 2.6774.
  7. p-value. The upper tail beyond z = 2.6774 is 0.0037099. Two-sided, double it: p = 0.00742. Confidence = 1 − 0.00742 = 99.26%.
  8. Relative lift. 0.0500 ÷ 0.2000 = 25.0%.
  9. Interval. Unpooled SE = √(0.20×0.80/1,000 + 0.25×0.75/1,000) = √(0.00016 + 0.0001875) = √0.0003475 = 0.0186414. Half-width = 1.959964 × 0.0186414 = 0.036536. So the 95% interval on the difference is 0.0500 ± 0.0365 = 1.35 to 8.65 percentage points.

Read that last line carefully, because it is the honest summary of the experiment. In relative terms the interval runs from a 6.7% lift to a 43.3% lift. You are confident the variant wins; you have almost no idea by how much. Anyone who reports "we found a 25% lift" and plans revenue on it is over-reading a 2,000-visitor test.

How to read the result and decide what to ship

Work down these four checks in order. Skipping straight to the p-value is how bad decisions get made.

1. Is the data trustworthy? Check the split first. If you intended 50/50 and got 52/48 on a large test, that is sample ratio mismatch and it means visitors were assigned or logged incorrectly. Fix the instrumentation and rerun; a p-value computed on broken assignment is meaningless. This calculator flags a split that departs significantly from even.

2. Are the counts large enough for the math? The z-test approximates a binomial with a normal curve, and that approximation needs a reasonable number of successes and failures in every cell. Below about 30 conversions in an arm, treat the p-value as indicative and prefer an exact test. Below five expected outcomes in any cell, the z-test simply does not apply.

3. Does the interval clear your indifference threshold? Decide before the test how much lift would justify shipping — engineering time, maintenance, risk. If your threshold is 3 percentage points and the interval runs from 1.3 to 8.7, the test has not established that the change clears the bar even though it is significant. Significance is about zero; your decision is about your threshold.

4. Was the sample fixed in advance? If you have been watching daily and are reading this because the number finally went green, your real false-positive rate is far above the nominal 5%. Plan the sample with the A/B test sample size calculator and analyse once.

When the answer is significant and the interval clears your threshold, convert it to money before you celebrate: multiply the lower bound of the interval by your traffic and value per conversion. The revenue per visitor calculator does that arithmetic, and planning on the lower bound rather than the point estimate is what keeps forecasts honest.

z-score, p-value and confidence level reference

Standard normal critical values. The two-sided p-value is the total probability in both tails; the one-sided value is half of it.
z-scoreTwo-sided pOne-sided pConfidence (two-sided)
1.2820.2000.10080.0%
1.6450.1000.05090.0%
1.9600.0500.02595.0%
2.1700.0300.01597.0%
2.3260.0200.01098.0%
2.5760.0100.00599.0%
3.0900.0020.00199.8%
3.2910.0010.000599.9%

A z of 1.96 is the familiar 95% bar. Note how quickly the tail thins: adding 0.6 to the z-score takes you from p = 0.05 to p = 0.01.

A significant p-value from a peeked-at test is not evidence

The 5% false-positive rate of this test holds for exactly one analysis at a pre-committed sample size. If you evaluate every morning and stop the first time the bar goes green, you have run many tests and reported the luckiest one. Repeated-looks simulations show the real false-positive rate climbing to several times the nominal level.

Two legitimate fixes exist. Fix the sample size in advance and analyse once. Or adopt a method designed for continuous monitoring — a group-sequential design with alpha-spending boundaries, or an always-valid sequential test. What does not work is applying a fixed-horizon p-value to a test you have been watching.

Ways this calculation gets misread

  • Treating the p-value as the probability the variant wins. It is the probability of your data under the assumption that the variant does not win. Those are different quantities, and only a Bayesian analysis gives you the first one.
  • Calling a non-significant test a tie. An inconclusive result usually has an interval wide enough to contain a real loss. If you need to prove two pages are equivalent, set an equivalence margin and check the whole interval fits inside it.
  • Reporting the point estimate as the expected lift. The observed 25% in the example above could easily be a true 8%. Forecast from the lower bound of the interval, not the middle.
  • Mixing units between arms. Sessions in one arm and users in the other, or different date ranges, breaks the comparison entirely. Both counts must come from the same definition and the same window.
  • Running the test on visitors who never saw the change. Diluting both arms with unexposed traffic shrinks the measurable effect and can turn a real win into a null result.
  • Checking twenty metrics and reporting the one that moved. At α = 0.05, twenty independent metrics give you a 64% chance of at least one false positive. Nominate the primary metric before launch.
  • Ignoring novelty effects. A visibly new design can lift or depress conversion for its first week purely because it is unfamiliar. Look at the daily trend, not just the total.

Assumptions and limits of this test

The z-test assumes each visitor is an independent observation with a fixed conversion probability, that a visitor belongs to exactly one arm for the whole test, that the two arms were assigned at random, and that the conversion rate is stable across the window. It also assumes the counts are large enough for the normal approximation to a binomial.

Independence is the assumption most often violated on real sites. A visitor who returns on a second device is counted twice, often in different arms. Sessions instead of users correlate within a person. Both cases understate the true variance, which makes the p-value look better than it should. If your tool reports both a user-level and a session-level number, the user-level one is the valid comparison.

The test is also silent about mechanism and durability. It cannot tell you whether a lift comes from a genuinely better page, from a novelty effect that fades, or from an outage in the control during the test window. Segmenting the daily series is the standard check: a real effect is roughly stable day to day, a novelty effect decays, and an instrumentation problem starts abruptly.

For continuous outcomes — revenue per visitor, order value, time on task — this calculation does not apply at all. Those need a two-sample t-test or a bootstrap, and they need far more traffic because a handful of large orders can dominate the variance. If you want the general statistical form of this test outside a marketing funnel, the two-proportion z-test calculator covers it, and the proportion confidence interval calculator handles a single rate.

Where this sits among the alternatives

The pooled two-proportion z-test is the default because it is simple, well understood, and matches what commercial platforms report. Several alternatives are better in specific situations.

Fisher's exact test computes the exact hypergeometric probability instead of approximating, and is the right choice when a cell count is small. It is conservative and slower but never wrong for small samples.

The chi-square test of independence on the 2×2 table gives a statistic equal to z², so for two groups it is the identical test in different clothing. It generalises to more than two variations, at the cost of telling you only that something differs.

Bayesian A/B analysis reports the probability that the variant is better and the expected loss from choosing wrongly. Many teams find those quantities easier to act on than a p-value, and they do not break under monitoring the way a fixed-horizon p-value does — though they still need enough data to be decisive.

Sequential tests keep the error rate valid while you watch. If your organisation cannot leave a dashboard alone, this is the honest answer rather than a discipline problem to be solved by exhortation.

Whatever method you use, the funnel context matters as much as the statistics. Before choosing what to test, find the step that is actually leaking with the sales funnel drop-off calculator, quantify checkout losses with the cart abandonment rate calculator, and measure your starting point cleanly with the conversion rate calculator.

Key terms

p-value
The probability of observing a difference at least as extreme as yours, assuming the two variations convert at the same rate. Small means surprising under the null, nothing more.
Confidence level
One minus the p-value, expressed as a percentage. "96% confidence" is simply p = 0.04 restated, and carries no extra information.
Pooled proportion
The combined conversion rate across both arms, used to build the standard error under the null hypothesis that the two rates are equal.
Confidence interval on the difference
The range of true differences consistent with your data at the chosen level. If it excludes zero, the test is significant; its width tells you how precisely you have measured the effect.
Sample ratio mismatch
A statistically significant departure of the observed traffic split from the intended split. Almost always a bug, and a reason to discard the result.
Equivalence testing
The procedure for showing two variations are effectively the same: define a margin of indifference and require the whole confidence interval to fall inside it.

Frequently asked questions

What p-value means my A/B test is significant?

Whatever threshold you set before launching — conventionally 0.05, which corresponds to 95% confidence and a z-score of about 1.96. A p-value below your threshold means the observed gap would be unlikely if the two pages were identical. It does not mean the variant is 95% likely to be better, and it says nothing about the size of the win. Always read the confidence interval alongside the p-value.

My test says 92% confidence. Can I ship it?

That is p = 0.08, which does not clear a 0.05 threshold, so statistically the test is inconclusive. Whether to ship anyway is a business call, not a statistical one: look at the confidence interval. If the interval runs from −0.5 to +4 percentage points and the change is cheap and reversible, shipping is defensible. If the change carries real cost or risk, collect more data. What you should not do is describe an 8% p-value as a proven win.

Why is the confidence interval so wide when my p-value is significant?

Because significance and precision are different things. The p-value only asks whether zero is plausible; the interval asks how big the effect is. A test can rule out zero while leaving a more than sixfold range of possible effect sizes — the worked example above is significant at p = 0.007 yet consistent with anything from a 6.7% to a 43.3% relative lift. Narrowing the interval requires more data, roughly four times as much to halve the width.

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

Two-sided, in nearly every commercial case. A one-sided test halves the p-value by refusing to look for a loss, which is only legitimate if a loss and a tie would lead to the identical decision. For a change you are deciding whether to ship, a loss obviously changes the decision, so the two-sided test is the honest one. Choosing one-sided after seeing the direction of the result is not a statistical method.

How many conversions do I need before the p-value is trustworthy?

The normal approximation needs at least five expected successes and five expected failures per cell as a hard floor, and about 30 conversions per arm before the p-value stops being jumpy. Below that, use Fisher's exact test. In practice, a test with fewer than 100 conversions per arm will produce a very wide interval even when it is significant, so the p-value is rarely the binding constraint — precision is.

Why does my testing platform report a different p-value than this?

Usually one of four reasons. Some platforms use the unpooled standard error for the test as well as the interval, which shifts z slightly. Some run a sequential or always-valid test, whose p-value is deliberately more conservative than a fixed-horizon one. Some report a Bayesian probability-to-beat-control, which is a different quantity entirely and typically looks more favourable. And some count sessions where you counted users. Check which quantity is on the screen before assuming a discrepancy.

The variant's split is 51/49 instead of 50/50. Does that matter?

On a small test, no — random assignment produces small imbalances. On a large test, yes: with 200,000 visitors a 51/49 split is a huge departure from even and points to a bug in assignment, redirect handling, bot filtering or logging. The calculator runs that check and flags a significant mismatch. The correct response is to fix the instrumentation and rerun, not to analyse the data anyway.

Can I compare three variations with this calculator?

Run each challenger against the control one pair at a time, then tighten your threshold. With three challengers at α = 0.05 each, the chance of at least one false winner is about 14%. Dividing the threshold by the number of comparisons — 0.05 ÷ 3 ≈ 0.017 — keeps the overall rate near 5%. Do not compare the challengers against each other as well unless you planned to, because every extra comparison adds another chance of a fluke.

Is a 5% lift with 95% confidence better than a 20% lift with 85% confidence?

Usually yes, because confidence tracks the reliability of the measurement while the lift is only an estimate. The 20%-at-85% result typically comes from a smaller sample, and underpowered tests systematically overstate the effects they detect — the winner's curse. Compare the lower bounds of the two confidence intervals instead of the point estimates; that is the figure you can plan revenue against.

References

  • Statistical Methods for Rates and Proportions, 3rd ed. — Wiley (Fleiss, Levin & Paik)
  • Categorical Data Analysis, 3rd ed. — Wiley (Alan Agresti)
  • The ASA Statement on p-Values: Context, Process, and Purpose, The American Statistician 70(2):129–133 — American Statistical Association (Wasserstein & Lazar, 2016)
  • Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing — Cambridge University Press (Kohavi, Tang & Xu)
  • NIST/SEMATECH e-Handbook of Statistical MethodsNational Institute of Standards and Technology