Bell Statistics

A/B test sample size calculator

“Statistics is the art of never having to say you are wrong…”

We may not be able to avoid being wrong altogether, but as A/B testing analysts we can do our best to control the probability of it happening. This calculator will help you determine the sample size needed to achieve sufficient statistical power. Start by selecting the type of your KPI, enter the relevant parameters, and we will do the rest.

Planning an A/B test? This is the right place to start. Already have data? Check our A/B test analysis calculator.

Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

Calculator

Choose your KPI type

Frequently asked questions

Which KPI type should I choose?
Ask what one user contributes. If it is a yes or no — converted, signed up, retained — that is binary. If it is a single number, like revenue or session length, that is continuous. If your metric divides one total by another and each user contributes several of the denominator — clicks per impression, revenue per session, where you randomised by user — that is a ratio metric, and it needs the delta-method correction the third tab applies. The test for the last one is whether different users contribute different numbers of denominator units; if they all contribute exactly one, the continuous tab is the right page.
How long should I run an A/B test?
Long enough to reach the sample size you calculated, and never fewer than one full business cycle — usually seven or fourteen days. Traffic composition swings hard by day of week, and a test that starts on a Tuesday and stops on a Friday has measured Tuesday-to-Friday users, not your users. If the required sample arrives in three days, keep running to a whole number of weeks anyway. If it will take four months, the test is not worth running as designed: raise the detectable effect, pick a metric closer to the change, or reduce variance rather than quietly lowering the power target.
What minimum detectable effect should I put in?
The smallest effect that would change what you do, not the effect you are hoping for. If a quarter of a point would not survive the engineering cost of shipping the change, do not pay for the traffic to detect it. Work backwards: estimate what a one-point effect is worth annually, compare that against the cost of the build and the opportunity cost of the traffic, and let the break-even number be your MDE. Choosing it from the answer you want is how tests end up sized for effects nobody would act on.
Can I stop the test early if it is already significant?
Not with a fixed-horizon design. Checking daily and stopping at the first p below 0.05 pushes the real false-positive rate to somewhere between 20% and 40%, depending on how often you look. Early crossings are common and mostly noise: the estimate is at its most volatile when the sample is smallest, and it is precisely the runs that overshoot that cross first. If you need the option to stop early, use a sequential or group-sequential design that spends the error budget across the looks, and fix that before launch rather than after the first promising day.
Should I use a one-sided test to save traffic?
It cuts the required sample by around 20%, but only honestly if you would take exactly the same action for a large negative result as for no result at all. In product work that is rarely true — a variant that hurts conversion by two points is information you very much want. The bigger risk is procedural: switching to one-sided after a two-sided test lands at p = 0.07 is not a statistical choice, it is a way of getting the answer you wanted. Decide before launch, write it down, and default to two-sided.
Does a 90/10 split cost me anything?
Yes, and much more than the intuition suggests. A 1:1 split extracts the most information per user. A 9:1 split needs close to three times the total traffic for the same power, because the power is governed by the smaller group. Skewed splits are legitimate when you are limiting blast radius on a risky release or reusing a large existing control, but they should be a deliberate purchase, not a leftover from a cautious ramp that nobody rebalanced.

Related calculators

  • A/B test analysis

    Read a finished experiment for a binary, continuous or ratio KPI — the lift, its confidence interval and a p-value.

  • SRM check

    Check whether your experiment actually split traffic the way you configured it — the first thing to run, before any metric.

  • One-proportion z-test

    Test one observed rate against a fixed target — an SLA, a benchmark, a contractual floor.

  • MDE calculator

    Given a fixed sample size, find the smallest effect your A/B test is powered to detect — for a binary, continuous or ratio KPI.

Terms on this page

  • A/B testing

    A randomised experiment on live traffic — and randomisation is the only part that makes it causal.

  • Alpha spending

    Divide the 5% across your planned looks — strict early, lenient at the end, and the schedule is fixed before you start.

  • Alternative hypothesis

    The claim you are hoping for, and the one thing a significance test can never actually establish.

  • Always-valid inference

    Statistics that stay honest under continuous monitoring — you may stop whenever you like, and it costs about a third more traffic.

  • Bayesian A/B testing

    Friendlier output, the same underlying evidence — and it does not fix peeking, which is why most teams adopt it.

  • Cluster randomization

    Assign the group, not the person — the remedy for interference, paid for in statistical power.

  • Control group

    The counterfactual, made concrete — and the reason a before-and-after comparison is not an experiment.

  • Expected loss

    How much a wrong decision would cost, in the units of the metric — the closest any of these numbers gets to a business answer.

  • Experimentation platform

    Assignment, exposure, analysis and the guardrails — and the last of those is what separates a platform from a flag service.

  • Exposure point

    Assigned is not the same as exposed — and the gap between them is where most of your effect size goes.

  • Feature flag

    The switch experiments run on — and the reason a flag that changes mid-test quietly invalidates the result.

  • Geo unit

    How finely you cut the map: more units means more power, and more spillover between them.

Browse the full statistics glossary

Talk to the people who build these for a living

We size, run and read experiments where the metric, the sample size and the decision rule are agreed before anyone looks at the data. A/B Testing

References

  • Fleiss, J. L., Levin, B., & Paik, M. C. (2003). Statistical Methods for Rates and Proportions (3rd ed.). Wiley.
  • Deng, A., Knoblich, U., & Lu, J. (2018). Applying the Delta Method in Metric Analytics: A Practical Guide with Novel Ideas. KDD '18, 233-242.
  • Kohavi, R., Tang, D., & Xu, Y. (2020). Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing. Cambridge University Press.