Z Test Calculator

A/B test calculator

AControl—
BVariant—
Confidence
Hypothesis
Examples
—
Relative uplift (B vs A)——
p-value
—
Chance B beats A
—
z score
—
Conversion rateEach curve shows where the true rate is likely to sit. Shaded band: 95% confidence interval.
Conversion rate distributions for A and B
Difference (B − A)Area right of zero: B converts better. Bracket: confidence interval for the difference.
Distribution of the difference in conversion rates

Conversion rates

Difference

Sample size

Test health

The working, step by step

    In plain words

    —

    Report it

    —

    What Is an A/B Test Calculator?

    An A/B test calculator checks whether the difference in conversion rate between a control (A) and a variant (B) is real or just random noise. You enter the visitors and conversions for each version, and the calculator returns the uplift, the p-value, a confidence interval (CI) and a verdict.

    Every A/B test result is a sample. Two identical pages never convert at exactly the same rate over a few thousand visits, so a gap of 0.3 percentage points can be pure chance. The calculator measures that chance with a two-proportion z-test, the standard test behind most A/B testing tools, and it is part of the Z Test Calculator suite.

    This calculator answers 4 questions at once:

    1. Is B different from A? The p-value and the verdict.
    2. How big is the change? The relative uplift and the absolute difference, each with a confidence interval.
    3. How likely is B to be better? The chance that B beats A.
    4. Can I trust the test? Sample size progress and a sample ratio mismatch (SRM) check.

    How to Use the A/B Test Calculator

    To use the calculator, enter 4 numbers and read the results as they update:

    1. Enter the visitors and conversions for A, the control or current version.
    2. Enter the visitors and conversions for B, the new version. Drag the slider under each card to try different conversion counts.
    3. Pick the confidence level: 95% is the usual choice, 90% for low-risk changes and 99% for costly ones.
    4. Pick the hypothesis: B ≠ A (two-sided) checks for a change in either direction, and B > A (one-sided) checks only for an improvement. Choose it before the test starts.

    The verdict, the uplift, both charts and the 4 detail cards redraw on every keystroke. All calculations run in your browser, and no data leaves your device.

    How to Read the Results

    Read an A/B test result in 3 steps: the verdict, the size of the uplift, and the confidence interval around it.

    Verdict and P-Value

    The p-value is the probability of a gap at least as large as the observed one if A and B truly convert at the same rate. A p-value at or below α (0.05 at 95% confidence) gives the verdict "B wins" or "A wins". A larger p-value gives "No clear winner yet", which means the data cannot separate the two versions so far.

    Uplift and Its Confidence Interval

    The relative uplift is (p̂B − p̂A) / p̂A, the change in conversion rate as a share of the control rate. A move from 4.0% to 4.7% is a +17.5% uplift and a +0.70 percentage point (pp) absolute difference. The confidence interval shows the range of uplifts the data supports: an interval of +3.1% to +33.9% says B is better, but the true gain is uncertain.

    Chance B Beats A

    The chance that B beats A is the probability that B's true conversion rate is higher than A's, given the data. The calculator computes it from Beta distributions with a uniform prior, the same model used by Bayesian A/B testing tools. A value of 99.2% means B is very likely better; 50% means the data gives no edge to either version.

    The Two Charts

    The left chart shows a curve for each version: the peak is the observed rate and the width is the uncertainty. Curves that overlap heavily mean the test cannot yet tell A and B apart. The right chart shows the difference B − A: the green area right of zero is the chance B is better, the red area left of zero is the chance A is better, and the bracket marks the confidence interval.

    A/B Test Formula

    The A/B test z statistic is z = (p̂B − p̂A) / √(p̂(1 − p̂)(1/nA + 1/nB)), where p̂ is the pooled conversion rate.

    z = (p̂_B − p̂_A) / √(p̂(1 − p̂)(1/n_A + 1/n_B))
    SymbolMeaning
    p̂A, p̂BConversion rates: conversions ÷ visitors
    nA, nBVisitors in each version
    p̂Pooled rate: (xA + xB) / (nA + nB)

    The confidence interval for the difference uses the unpooled standard error, √(p̂A(1 − p̂A)/nA + p̂B(1 − p̂B)/nB). The interval for the relative uplift uses the log of the rate ratio, which keeps it accurate when the uplift is large. The same test, with the textbook layout, is on the two-proportion z-test page.

    A/B Test Examples

    There are 2 worked examples below. Load either one with the example buttons above the results.

    Checkout redesign: A converts 400 of 10,000 visitors, B converts 470 of 10,000.

    1. Conversion rates
      p̂A = 4.00%, p̂B = 4.70%
    2. Pooled rate
      p̂ = 870 / 20,000 = 0.0435
    3. Standard error
      SE = √(0.0435 × 0.9565 × (1/10,000 + 1/10,000)) = 0.00288
    4. Z statistic
      z = 0.0070 / 0.00288 = 2.427
    5. P-value
      p = 0.0152 (two-sided)
    6. Uplift
      +17.5%, 95% CI +3.1% to +33.9%
    7. Chance B beats A
      99.24%
    8. Decision
      B wins: the redesign converts better.

    Pricing page: A converts 150 of 5,000 visitors, B converts 120 of 5,000.

    1. Conversion rates
      p̂A = 3.00%, p̂B = 2.40%
    2. Pooled rate
      p̂ = 270 / 10,000 = 0.027
    3. Z statistic
      z = −0.0060 / 0.00324 = −1.851
    4. P-value
      p = 0.0642 (two-sided)
    5. Uplift
      −20.0%
    6. Chance B beats A
      3.2%
    7. Decision
      No clear winner yet: B looks worse, but the evidence does not reach 95% confidence.

    How Many Visitors Does an A/B Test Need?

    An A/B test needs about 13,329 visitors per version to detect a lift from 4.0% to 4.7% with an 80% chance of detection at 95% confidence. The Sample size card shows this number for your own rates and how much of it the test has reached. It shows the smallest lift your current sample can detect too.

    Sample size grows fast as the lift shrinks: halving the detectable lift roughly quadruples the visitors needed. A page converting at 4% needs about 3,600 visitors per version to detect a 35% lift, but about 48,500 to detect a 9% lift. Plan the test length before launch with the sample size calculator.

    Test Health Checks

    The Test health card runs 2 checks that catch broken tests before you trust the result.

    Sample Ratio Mismatch (SRM)

    A sample ratio mismatch is a traffic split that differs from the planned split by more than chance allows. A 50/50 test that ends with 10,500 visitors in A and 9,500 in B has an SRM p-value below 0.0001, a sign of a bug in assignment, tracking or bot filtering. The calculator flags any split with SRM p < 0.001. Fix the cause before reading the result, since the two groups are no longer comparable.

    Small Counts

    The z-test needs at least 10 conversions and 10 non-conversions in each version. With fewer, the normal approximation is weak and the p-value is unreliable. Use Fisher's exact test for small tests, such as 4 conversions out of 120 visitors.

    Common A/B Testing Mistakes

    There are 6 common A/B testing mistakes:

    1. Stopping at the first significant result. Checking every day and stopping at the first p < 0.05 pushes the real false-positive rate above 20%. Fix the sample size in advance.
    2. Running the test for less than one full week. Weekday and weekend visitors behave differently. Run whole weeks.
    3. Choosing B > A after seeing the data. Switching to a one-sided test halves the p-value. Choose the hypothesis before launch.
    4. Testing many variants against one control without correction. Compare 3 or more versions with a chi-square test, then correct pairwise tests with Bonferroni.
    5. Reading the uplift without its interval. A +17.5% uplift with a CI of +3.1% to +33.9% is far less certain than the headline number suggests.
    6. Ignoring practical value. A significant 0.1 pp lift on 1 million visitors is real but often too small to matter. Weigh it with the effect size calculator.

    A/B Testing vs. Bayesian A/B Testing

    A classic A/B test gives a p-value and a yes/no decision at a fixed confidence level, while a Bayesian A/B test gives the probability that B beats A. This calculator shows both. The two usually agree: in the checkout example, p = 0.0152 and the chance B beats A is 99.24%. The p-value answers "how surprising is this gap if nothing changed?", and the chance to beat answers "how likely is B to be better?". Report the p-value and confidence interval in formal reports, and use the chance to beat for business discussions.

    FAQs

    What is a good conversion rate uplift for an A/B test?

    There is no fixed good uplift: a good uplift is one whose confidence interval stays above zero and whose gain is worth the cost of the change. Small lifts of a few percent are common for mature pages, and lifts above 30% are rare, so check a very large lift for tracking errors before acting on it.

    Is 90% confidence enough for an A/B test?

    Yes, 90% confidence is enough for low-risk changes such as button text or images, but 95% is the standard for decisions that cost money to reverse. At 90% confidence, 1 in 10 tests between identical versions still shows a "winner".

    Why does my A/B test show no clear winner?

    An A/B test shows no clear winner when the gap between A and B is small compared with the noise in the data. Either the true difference is small, or the test has too few visitors. The Sample size card shows how many visitors per version the observed lift needs.

    Can the chance B beats A be high while the result is not significant?

    Yes, the chance B beats A can reach 90% to 95% while the two-sided test at 95% confidence is not significant. The two measures use different cut-offs: a 95% two-sided test needs roughly a 97.5% chance to beat before it calls B the winner.

    What does a negative uplift mean?

    A negative uplift means B converts worse than A. If the result is significant, keep the control. If not, the test has not shown a difference, and B can still be equal to A.

    How do I report an A/B test result?

    Report an A/B test with both conversion rates, both sample sizes, the z statistic, the p-value and the confidence interval. Example: "Variant B converted 4.7% of visitors (n = 10,000) and control A converted 4.0% (n = 10,000), z = 2.43, p = .015, 95% CI [0.13, 1.27] percentage points." Build a CI for one rate with the confidence interval calculator.