“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.
A yes/no outcome for each user (e.g., converted or not).A numeric value measured for each user (e.g., revenue, session duration).A metric calculated as the ratio of two quantities (e.g., revenue per user, clicks per impression).
When to use it
Use this calculator when your outcome is binary — for example, converted or not, signed up or not, or active on day 7 — and you are comparing two independent groups.
Whether you call it an A/B test sample size calculator, a split test sample size calculator, or a conversion rate sample size calculator, this is the right tool for planning your next experiment.
Common use cases include testing a new checkout flow, a pricing page, a signup form, or any change where the outcome you care about is a simple yes or no. If you already have results and need to check for statistical significance, use our A/B test analysis calculator instead.
Assumptions
The calculation assumes:
Random assignment: observations are independently assigned to the two groups.
Independent observations: each randomized unit contributes one observation, and observations from different units are assumed to be independent.
A sufficiently large sample: the sample-size calculation uses a normal approximation to the binomial. For very small expected counts, use an exact method such as Fisher's test for analysis.
How the calculation works
This A/B test sample size calculator estimates the sample size needed to detect a specified difference between two proportions (conversion rates) at a chosen significance level, power, and allocation ratio. You can choose whether the calculation uses a relative or an absolute effect:
Absolute effect
absolute effect = p2 − p1
The difference between the two proportions.
Relative effect
relative effect = (p2 − p1)p1
The difference relative to the baseline proportion.
The general two-proportion formula, for any allocation ratio r = n₂/n₁ and either a one- or two-sided test. r = 1 gives an even split, where p̄ reduces to the simple average of p₁ and p₂ — away from it, p̄ is the weighted average shown above, not the simple one. The critical value in the first term is z₁₋α for a one-sided test and z₁₋α/2 for a two-sided one; both use the pooled proportion under the null in that first term and each group's own variance under the alternative in the second.
Interpreting the output
This A/B test sample size calculator shows the number of visitors or users you need per variation and in total to reach your chosen statistical power for the selected minimum detectable effect (MDE).
If you run your test with this sample size and the true effect is at least as large as the MDE, your test has a probability of at least the selected power (for example, 80%) to detect a statistically significant result. Smaller effects can still reach statistical significance, but the chance of detecting them is lower than the specified power.
Tip: Stopping your A/B test before it reaches the required sample size lowers its power and makes it more likely to miss a real effect. If you also check results repeatedly and stop as soon as they look significant, you increase the risk of false positives. For reliable results, decide on the sample size before launching and run the test until you reach it.
Worked example
Suppose your baseline conversion rate is 4.0% and you want to detect an increase to 4.5%.
Baseline conversion rate
4.0%
Minimum detectable effect
+0.5 percentage points (0.005), or a 12.5% relative lift
Significance level (α)
0.05
Power (1 − β)
0.80
Allocation ratio
1 (equal allocation)
Number of users per day
6,000
The calculator requires approximately 25,551 users per group, or 51,102 in total. At 6,000 eligible users per day, this is approximately 9 days of traffic.
This sample size gives you an 80% probability of detecting a 0.5-percentage-point effect if that effect truly exists. Smaller effects may still be detected, but with lower probability.
When to use it
Use this calculator when your outcome is continuous — for example, revenue per user, session duration, or time on page — and you are comparing two independent groups.
Whether you call it a two-sample t-test sample size calculator, an A/B test sample size calculator for continuous metrics, or a mean comparison sample size calculator, this is the right tool for planning your next experiment.
Assumptions
The calculation assumes:
Random assignment: observations are independently assigned to the two groups.
Independent observations: each randomized unit contributes one observation, and observations from different units are assumed to be independent.
Approximately normal distribution: the calculation relies on the sampling distribution of the mean being approximately normal. This holds well for reasonably large samples even if the underlying metric is skewed (e.g., revenue), due to the Central Limit Theorem.
Known or estimable standard deviation: the calculation requires a reasonable estimate of the metric's variability in the control group, typically from historical data.
Unequal variances by default: since two groups in an experiment (especially a treatment vs. control) often have different variances, the calculator defaults to the more conservative Welch's t-test approach unless equal variances are explicitly assumed.
How the calculation works
The calculator estimates the sample size needed to detect a specified difference between two group means at a chosen significance level, power, and allocation ratio, using the t-distribution to account for sample-based variance estimation. You can choose whether the calculation uses relative vs. absolute effect:
Absolute effect
absolute effect = μ2 − μ1
The difference between the two group means, in the same units as the metric.
Relative effect
relative effect = (μ2 − μ1)μ1
The difference relative to the baseline mean.
The standardised effect
d = (μ2 − μ1)σ
Everything the design depends on is in this one number. A difference of 5 on a standard deviation of 120 and a difference of 2 minutes on one of 48 minutes are the same experiment and need the same sample. If you know the effect only in your own units, this is where the standard deviation enters.
The calculator uses the noncentral t-distribution to compute the sample size. It finds the smallest sample size for which the power reaches the target value. The noncentrality parameter (λ) is how far the expected effect sits from the null, given the effect size and the two sample sizes — a larger λ means the effect is easier to detect, so power increases. Two-sided power is the probability of detecting an effect in either direction, with the significance level split between both tails. One-sided power places the whole significance level in one tail, which is why a one-sided test reaches the same power with a smaller sample.
Fₜ(·; df, λ) is the cumulative distribution function of the noncentral t-distribution.
t_{p, df} is the p-th quantile of the central t-distribution.
σ is the standard deviation.
n₁ and n₂ are the sample sizes of the control and test groups.
The form collects one standard deviation, so both groups are planned at the same variance either way and only the degrees of freedom change. At n₁ = n₂ the Welch expression is exactly n₁ + n₂ − 2, so the two agree to the last digit on an even split; away from it Welch's df is smaller and the design is a little more conservative. Ticking the box uses the pooled figure.
Interpreting the output
This A/B test sample size calculator shows the number of visitors or users you need per variation and in total to reach your chosen statistical power for the selected minimum detectable effect (MDE).
If you run your test with this sample size and the true effect is at least as large as the MDE, your test has a probability of at least the selected power (for example, 80%) to detect a statistically significant result. Smaller effects can still reach statistical significance, but the chance of detecting them is lower than the specified power.
Tip: Stopping your A/B test before it reaches the required sample size lowers its power and makes it more likely to miss a real effect. If you also check results repeatedly and stop as soon as they look significant, you increase the risk of false positives. For reliable results, decide on the sample size before launching and run the test until you reach it.
Worked example
Suppose your baseline average revenue per user is 50, with a standard deviation of 120, and you want to detect an increase to 55 — at 2,000 eligible users a day.
Baseline mean
50
Standard deviation
120
Minimum detectable effect
5 absolute, a 10% lift
Significance level (α)
0.05
Power (1 − β)
0.80
Allocation ratio
1
Number of users per day
2,000
9,043 users per group, or 18,086 in total. At 2,000 eligible users per day, this is approximately 10 days of traffic. The standardised effect is d = 0.042, which is small — and that is what a standard deviation more than twice the mean does to an experiment.
This sample size gives you an 80% probability of detecting a 5-unit effect if that effect truly exists. Smaller effects may still be detected, but with lower probability.
When to use it
Use this calculator when your outcome is a ratio metric — a value calculated as one quantity divided by another, measured per randomization unit — for example, revenue per user, clicks per impression, or items purchased per session.
Assumptions
The calculation assumes:
Random assignment: observations are independently assigned to the two groups.
Independent observations: each randomization unit contributes its own numerator/denominator pair, and different units are assumed to be independent of each other.
Approximately normal distribution: the calculation relies on the delta-method approximation for the ratio's variance, which is well-behaved for reasonably large samples.
How the calculation works
The calculator estimates the sample size needed to detect a specified difference between two group ratios at a chosen significance level, power, and allocation ratio, based on the baseline ratio and its standard deviation. If you don't already know these two values, the built-in helper calculator can derive them for you — either from uploaded raw data or from summary statistics (numerator mean, denominator mean, numerator variance, denominator variance, and covariance) using the delta method. You can choose whether the calculation uses relative vs. absolute effect:
Absolute effect
absolute effect = R2 − R1
The difference between the two group ratios, in the same units as the metric.
Relative effect
relative effect = (R2 − R1)R1
The difference relative to the baseline ratio.
The delta-method variance, per randomisation unit
V = [ σ²Y − 2R·ρ·σY·σX + R²·σ²X ]μ²X
R = μYμX
This is what the helper calculator runs — R is the ratio, and the bracket is its per-unit variance. The first term is what you get pretending the denominator is constant; the third is what the denominator's variation costs; the middle one subtracts, and it is a refund: a user with more sessions who also has more revenue has a ratio that moves less than either quantity does.
Sample size per group
n1 = (z1−α/tails + z1−β)²·sd²·(1 + 1/k)Δ²
The ordinary two-sample normal formula, with the ratio's own standard deviation in place of σ. Δ is the change in the ratio itself — a 2% lift in revenue per session, not a 2% lift in revenue.
Interpreting the output
This A/B test sample size calculator shows the number of visitors or users you need per variation and in total to reach your chosen statistical power for the selected minimum detectable effect (MDE).
If you run your test with this sample size and the true effect is at least as large as the MDE, your test has a probability of at least the selected power (for example, 80%) to detect a statistically significant result. Smaller effects can still reach statistical significance, but the chance of detecting them is lower than the specified power.
Tip: Stopping your A/B test before it reaches the required sample size lowers its power and makes it more likely to miss a real effect. If you also check results repeatedly and stop as soon as they look significant, you increase the risk of false positives. For reliable results, decide on the sample size before launching and run the test until you reach it.
Worked example
Suppose your baseline revenue-per-session ratio is $25, with a standard deviation of 3, and you want to detect an increase to $27.50.
Baseline ratio
$25
Standard deviation
3
Minimum detectable effect
+$2.50, or a 10% relative lift
Significance level (α)
0.05
Power (1 − β)
0.80
Allocation ratio
1 (equal allocation)
Number of users per day
10
The calculator requires approximately 23 users per group, or 46 in total. At 10 eligible users per day, this is approximately 5 days of traffic.
This sample size gives you an 80% probability of detecting a $2.50 effect if that effect truly exists. Smaller effects may still be detected, but with lower probability.
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.