Ab Testing Sample Size Calculator






Professional A/B Testing Sample Size Calculator


A/B Testing Sample Size Calculator

Ensure your experiments are statistically significant by calculating the required sample size. Our ab testing sample size calculator helps you plan with confidence.



The conversion rate of your control (original) version.

Please enter a valid percentage (0-100).



The smallest improvement you want to be able to detect (e.g., a 1% absolute lift from 5% to 6%).

Please enter a positive value.



The probability of detecting an effect if it truly exists (1 – β).


The probability of a false positive (detecting an effect that isn’t real).

Sample Size Per Variation


Total Sample Size

Control Conversions

Variant Conversions

This calculator estimates sample size using a two-proportion Z-test formula.

Sample Size vs. Minimum Detectable Effect

This chart shows how the required sample size increases as the desired Minimum Detectable Effect (MDE) gets smaller.

What is an A/B Testing Sample Size Calculator?

An ab testing sample size calculator is a crucial tool for marketers, developers, and data scientists who want to run valid experiments. In simple terms, it determines the number of users or visitors you need to include in your test (per variation) to reliably detect a specific change in performance. Without calculating the proper sample size, you risk two major problems: running a test with too few users, which can lead to false or inconclusive results, or running a test for too long with too many users, which wastes time and resources. This makes an ab testing sample size calculator an essential first step in any optimization process.

This tool is for anyone making data-driven decisions. Whether you are a CRO (Conversion Rate Optimization) specialist testing a new button color, a product manager evaluating a new feature, or a marketer testing new ad copy, using an ab testing sample size calculator ensures your findings are statistically sound. A common misconception is that you can just run a test until it “feels” right or until one version is ahead. This approach is prone to error and can lead you to implement changes that have no real positive effect, or even a negative one.

A/B Testing Sample Size Formula and Mathematical Explanation

The core of an ab testing sample size calculator is a statistical formula for a two-proportion hypothesis test. The goal is to determine if the difference in conversion rates between two groups (A and B) is statistically significant or just due to random chance. The most common formula for the required sample size per variation (n) is:

n = ( Zα/2 + Zβ )2 * ( p1(1 – p1) + p2(1 – p2) ) / ( p2 – p1 )2

The calculation might seem complex, but it’s built on a few key statistical concepts. The ab testing sample size calculator automates this process. The formula takes into account the variability of the conversion rates and the desired confidence levels to provide a robust sample size estimate.

Table 1: Variables in the Sample Size Formula
Variable Meaning Typical Value
n Sample size required for each variation (e.g., for control and for the test group). The calculated result.
p1 The expected conversion rate of the control group (your baseline). Varies (e.g., 0.05 for 5%).
p2 The expected conversion rate of the variant group (baseline + MDE). Varies (e.g., 0.06 for 6%).
Zα/2 The Z-score corresponding to the chosen significance level (α). For α=5%, this is 1.96. 1.96 for 95% confidence.
Zβ The Z-score corresponding to the chosen statistical power (1-β). For power=80%, this is 0.84. 0.84 for 80% power.
( p2 – p1 ) The Minimum Detectable Effect (MDE) in absolute terms. Varies (e.g., 0.01 for 1%).

Practical Examples (Real-World Use Cases)

Example 1: E-commerce Checkout Button Test

An online store wants to test if changing their checkout button from blue to green increases the purchase conversion rate. Their current purchase conversion rate is 3% (p1). They want to be able to detect an absolute improvement of at least 0.5% (MDE). This means they hope the new green button will have a conversion rate of at least 3.5% (p2). Using a standard ab testing sample size calculator with 95% significance (α=0.05) and 80% power, they would need approximately 23,234 users per variation. This means they need a total of 46,468 users to run a valid test. Learn more about {related_keywords}.

Example 2: SaaS Sign-up Form Redesign

A software-as-a-service (SaaS) company redesigns its sign-up page. The current page has a 10% sign-up rate (p1). The product team will only consider the redesign a success if it increases the sign-up rate by an absolute 2% to 12% (p2). They need an ab testing sample size calculator to plan their experiment. For this test, with standard 95% significance and 80% power, they would require about 3,842 visitors per variation. This smaller sample size, compared to the e-commerce example, is due to the higher baseline conversion rate and larger MDE, which makes a difference easier to detect.

How to Use This A/B Testing Sample Size Calculator

Our ab testing sample size calculator is designed to be straightforward and user-friendly. Follow these steps to get your required sample size:

  1. Enter Baseline Conversion Rate: Input the current conversion rate of your control page or element. If you’re unsure, use historical data or a conservative estimate.
  2. Set Minimum Detectable Effect (MDE): Define the smallest improvement you care about detecting. This is a business decision: a tiny 0.1% lift might not be worth the development effort, while a 2% lift is significant. A smaller MDE requires a larger sample size.
  3. Choose Statistical Power: 80% power is the industry standard. This means you have an 80% chance of detecting a real effect if one exists. Increasing power requires more users.
  4. Select Significance Level (α): 5% is standard, meaning you accept a 5% chance of a false positive. A lower alpha (like 1%) makes the test stricter and requires a larger sample from the ab testing sample size calculator.
  5. Review Your Results: The calculator will instantly show the sample size needed per variation. You will also see the total sample size and the expected number of conversions for both groups based on your inputs. Check our guide on {related_keywords} for more details.

Key Factors That Affect A/B Testing Sample Size Results

Several factors directly influence the output of an ab testing sample size calculator. Understanding them helps you plan better experiments.

  • Baseline Conversion Rate: A very low or very high baseline rate (close to 0% or 100%) requires a larger sample size because the variance is lower, making changes harder to detect. Rates closer to 50% have the highest variance and often require smaller samples.
  • Minimum Detectable Effect (MDE): This has the largest impact. Detecting a very small effect (e.g., 0.1% lift) requires a massive sample size. Detecting a larger effect (e.g., 5% lift) is much easier and requires fewer users. This is a critical input for any ab testing sample size calculator.
  • Statistical Power (1-β): Higher power (e.g., 90% or 95%) gives you more confidence that you won’t miss a real effect (a false negative), but it comes at the cost of a larger required sample size. For more on this, see our article on {related_keywords}.
  • Significance Level (α): A lower significance level (e.g., 1% instead of 5%) reduces the risk of a false positive, but it requires a larger sample to achieve that higher certainty.
  • Number of Variations: If you are testing more than one variant against the control (A/B/n testing), you will need to multiply the sample size per variation by the total number of variations. This calculator assumes a standard A/B test.
  • Test Duration and Traffic: The output of the ab testing sample size calculator tells you “how many” users, not “how long.” You need to use your website’s traffic data to estimate the time required to gather the necessary sample. Explore our {related_keywords} to help with this.

Frequently Asked Questions (FAQ)

1. What if I don’t know my baseline conversion rate?

If you don’t have historical data, you can run a pre-test analysis to measure it or use an educated guess based on industry benchmarks. However, an accurate baseline is key for an accurate result from an ab testing sample size calculator.

2. What is the difference between absolute and relative MDE?

Absolute MDE is a fixed percentage point increase (e.g., from 5% to 6% is a 1% absolute MDE). Relative MDE is a percentage of the baseline (e.g., a 20% relative MDE on a 5% baseline is 5% * 1.20 = 6%, a 1% absolute lift). Our calculator uses absolute MDE for clarity.

3. Why is 80% power the standard?

80% power is considered a good trade-off between the risk of missing a real effect (20% chance of a Type II error) and the cost of acquiring a larger sample size. Increasing power to 90% or 95% significantly increases the required sample size.

4. Can I stop a test early if it reaches statistical significance?

This is generally not recommended and is known as “peeking.” It increases the rate of false positives. You should let the test run until the pre-determined sample size, calculated by the ab testing sample size calculator, is reached. Read about the dangers in our {related_keywords} post.

5. What happens if my sample size is too small?

If your sample size is too small, your test is “underpowered.” This means you have a low chance of detecting a real effect, and any results you see are more likely to be due to random chance rather than a true difference between variations.

6. Does this ab testing sample size calculator work for more than two variations?

This calculator is designed for a standard A/B test (one control, one variant). For A/B/n tests, you would calculate the sample size for one pair and then ensure each variation receives that amount of traffic.

7. Why does a smaller MDE need a larger sample size?

Detecting a small, subtle signal requires a much larger dataset to distinguish it from random noise. A large, obvious effect can be confidently identified with fewer data points. This is a fundamental principle of statistics used in every ab testing sample size calculator.

8. How do I factor in test duration?

Once you have the total required sample size from the ab testing sample size calculator, divide it by your average daily or weekly website traffic to the page being tested. This will give you an estimate of how long the test needs to run.

Related Tools and Internal Resources

Expand your testing knowledge and toolkit with these resources:

© 2026 Your Company Name. All Rights Reserved. Use our professional ab testing sample size calculator for reliable experiment planning.


Leave a Comment