Zahid Awais Get a free audit

Free A/B test sample size calculator

Enter your current conversion rate and the smallest lift worth detecting to see how many visitors each variant needs before you start the test.

By Zahid Awais · Calculators · Free, private, no sign-up

Relative 20% on a 5% baseline means you want to detect 5% rising to 6%. Everything runs in your browser.

Result
-Per variant
-Total visitors
-Target rate
Input or stepValue
    A/B Test Sample Size Calculator: what it does and an example result

    The free A/B test sample size calculator tells you how many visitors each version of a page needs before you can trust the result. Enter your baseline conversion rate, the smallest lift you care about, the significance level and the power, and it shows the per variant sample size with the formula worked out.

    Quick answer

    An A/B test sample size calculator gives the visitors each variant needs to detect a chosen lift. It uses n = (z1-α/2 + z1-β)² × 2p̄(1 - p̄) / (p2 - p1)². For a 5% baseline, a 20% relative lift, 95% confidence and 80% power, you need 8,159 visitors per variant.

    What is an A/B test sample size calculator?

    An A/B test sample size calculator is a tool that works out, before a test starts, how many visitors each version must see so that a real difference of a chosen size is likely to show up as statistically significant. It needs four inputs: the conversion rate you have now, the minimum detectable effect, the significance level and the power. Deciding the sample size first, then waiting until you reach it, is what stops you from calling a winner on noise.

    The calculator uses the normal approximation sample size formula for comparing two proportions with equal group sizes, the same formula Penn State's STAT 509 course notes give for a binary outcome. With more than two variants it can split the significance level across the comparisons, and it shows a warning when so few conversions are expected that the approximation is weak. To check the result once the test has finished, use the A/B test significance calculator.

    How do you use the A/B Test Sample Size Calculator?

    How to use the A/B Test Sample Size Calculator: enter details, see the result and copy it
    Real screenshot of the A/B Test Sample Size Calculator with the example input from this page.
    1. Enter your baseline conversion rate from analytics, for example 5 for 5% of visitors who buy or enquire.
    2. Choose whether your minimum detectable effect is relative (20% of 5% is 1 point) or absolute (1 percentage point), then enter it.
    3. Pick the significance level and power. 5% significance (95% confidence) and 80% power are common defaults.
    4. Enter the number of variants including the control. Keep the Bonferroni box ticked if you will compare each variant with the control.
    5. Read the visitors per variant and the total, check the formula with your numbers, and copy the results for your test plan.

    How do you calculate sample size for an A/B test?

    Use n = (z1-α/2 + z1-β)² × 2p̄(1 - p̄) / (p2 - p1)², where p1 is the baseline rate, p2 the rate you want to detect, p̄ their average, z1-α/2 the normal critical value for the two-sided significance level and z1-β the one for power. NIST's Engineering Statistics Handbook uses the same (z1-α/2 + z1-β)² structure for a two-sided test and calls these "critical values from the normal distribution".

    With p1 = 5% and p2 = 6%, p̄ is 5.5%, z1-α/2 is 1.9600 at 95% confidence and z1-β is 0.8416 at 80% power. That gives 7.8489 × 0.10395 / 0.0001 = 8,158.91, rounded up to 8,159 per variant. Always round up, never down.

    What is a minimum detectable effect?

    The minimum detectable effect (MDE) is the smallest change in conversion rate your test is designed to catch reliably. A relative MDE is a share of the baseline: 20% of 5% is 1 percentage point, so 5% to 6%. An absolute MDE is the gap in percentage points. Halving the MDE roughly quadruples the sample size, because the difference is squared in the formula, so choose the smallest lift that would really change a business decision.

    What do significance and power mean?

    Significance (α) is the risk of declaring a winner when there is no real difference. NIST defines α as "the probability of rejecting the null hypothesis when it is true". Power (1 - β) is the chance of detecting a real effect of your chosen size, so 80% power means a 20% risk of missing it. Higher confidence or higher power both need more visitors.

    Quick reference: visitors per variant at 95% confidence and 80% power

    Baseline rateRelative MDETarget rateVisitors per variant
    2%20%2.40%21,110
    5%10%5.50%31,235
    5%20%6.00%8,159
    10%20%12.00%3,843
    25% (absolute +25 points, 90% power)100%50.00%79 (Penn State example)

    Worked example

    Example

    Example: an online shop converts 5% of product page visitors and wants to test a new checkout button. A lift to 6% (20% relative) would justify the change, so the MDE is 20% relative. At 95% confidence and 80% power, the calculator gives 8,159 visitors per variant and 16,318 in total for a control and one variant. As a cross-check, entering Penn State's worked example, 25% against 50% at 90% power, returns 79 per group, the same answer as the course notes.

    Learn more

    Frequently asked questions

    Why does a low conversion rate need so many visitors?

    Rare events are noisy. With a 2% baseline, a 20% relative lift is only 0.4 percentage points, and spotting such a small gap reliably takes about 21,110 visitors per variant at 95% confidence and 80% power.

    Should I use relative or absolute MDE?

    Use whichever you think in, but be clear. Many testing tools report relative lift, so a 20% relative MDE on 5% means 6%. A 20 point absolute MDE would mean 25%, which is a very different test.

    Why does the calculator change alpha for 3 or more variants?

    Each extra variant compared with the control is another chance of a false winner. The Bonferroni option divides the significance level by the number of comparisons, which keeps the overall risk near your chosen level but needs more visitors.

    Can I stop the test early if it looks significant?

    Not with this method. The calculation assumes you look once, at the planned sample size. Checking repeatedly and stopping at the first significant result raises the false positive rate, unless you use a sequential testing method designed for it.

    Why might another calculator give a slightly different number?

    Some calculators use separate variances for the two groups, a continuity correction or a one-sided test. Those choices shift the answer a little. This tool uses the pooled two-sided formula shown on the page, so you can check every step.

    Is my data sent anywhere?

    No. The calculator runs entirely in your browser with JavaScript. Your conversion rates and test plans are never uploaded or stored, so you can use real business numbers safely.

    Sources

    Checked 23 Oct 2026. Facts checked against these official pages. Read how I check facts in my editorial policy.

    Related free tools

    All free tools

    Conversion Rate Calculator

    A conversion rate calculator is a tool that shows what percentage of visitors complete a goal such as a sale,…

    Want a full audit instead?

    Send your website and I will check it for you, free.

    Get my free audit
    Chat on WhatsApp
    Free updates

    Get new tools, guides and coupons first

    One short email when something new goes live: articles, free SEO tools, package updates, discounts and price alerts. No spam, unsubscribe in one click.