Sample Size Calculator for Smarter Testing

Sample Size Calculator for Smarter Testing
Sample Size Calculator for Smarter Testing

01-06-2025 (Last modified: 01-06-2025)

Becky Halls

Running an A/B test without a sample size calculator is like trying to bake a cake without knowing the recipe. You might get lucky, but chances are, things won’t rise the way you hoped.

Whether you’re tweaking your landing page CTA or testing out headline variations, knowing how many users you need for a reliable result is critical. And that’s exactly where a sample size calculator comes in.

In this guide, we’ll break down:

  • What a sample size calculator does

  • Why it matters for A/B testing

  • How to use one effectively

  • Tools you can use for free

  • Common pitfalls (and how to avoid them)

Let’s dig in.

What Is a Sample Size Calculator?

A sample size calculator is a tool that tells you how many users or sessions you need in each variant of your A/B test to detect a statistically significant result.

Translation: it helps you avoid false positives and bad decisions based on too little data.

In A/B testing, jumping to conclusions too early (or too late) can lead to wasted time, flawed optimizations, and lost conversions. A sample size calculator keeps you on track.

Three professionals using a sample size calculator and looking at graphs and data on a laptop and tablet

Why Do You Need a Sample Size Calculator?

Here’s the truth: most A/B tests fail – not because of the ideas, but because of the maths.

Too few users? You won’t know if a result is real or just random. Too many? You’re wasting valuable time and traffic on a test that should’ve been wrapped up last week.

A sample size calculator helps you:

When you know your sample size, you’re no longer guessing. You’re testing with purpose.

What Do You Need to Calculate Sample Size?

Most sample size calculators ask for three key inputs:

  1. Baseline conversion rate – Your current conversion rate (from Google Analytics, Shopify, etc.)

  2. Minimum detectable effect (MDE) – The smallest uplift you want to detect (e.g. 5%)

  3. Statistical significance level – Usually 95%, meaning you’re confident the result isn’t due to chance

Some calculators will also ask for statistical power (often set at 80%), which refers to the probability of detecting a real effect.

The actual formula (for the curious):

Here’s the simplified version of the two-sample proportion test formula commonly used by A/B testing calculators:

n = 2 × (Zα/2 + Zβ)² × p̄ × (1 - p̄) / (p1 - p2)²

Where:

  • n = sample size per variation

  • Zα/2 = Z-score for the desired confidence level (e.g. 1.96 for 95%)

  • = Z-score for statistical power (e.g. 0.84 for 80%)

  • p1 = baseline conversion rate (e.g. 0.04)

  • p2 = expected conversion rate (e.g. 0.044 if targeting a 10% uplift)

  • = average of p1 and p2

Example:

If your baseline conversion rate is 4%, and you want to detect a 10% uplift, then:

  • p1 = 0.04

  • p2 = 0.044

  • p̄ = (0.04 + 0.044) / 2 = 0.042

  • Zα/2 = 1.96 (for 95% confidence)

  • Zβ = 0.84 (for 80% power)

Plug those into the formula and you’ll get a sample size of around 13,000 users per variation.

Thankfully, you don’t need to do the math by hand! (phew!!) Just plug the numbers into a calculator and let it do the heavy lifting!

A calculator with numbers being inputted

Recommended Free Sample Size Calculators

Here are some reliable, easy-to-use tools to calculate your test size:

  1. Evan Miller’s Sample Size Calculator

    • Super simple and fast. Great for one-off tests.

  2. Optimizely Sample Size Calculator

    • Intuitive interface with extra detail. Includes test duration estimation.

  3. AB Test Guide’s Calculator

    • Includes confidence intervals and visual graphs.

  4. CXL’s Sample Size Calculator

    • Great for more advanced users or multiple-variant tests.

Using any of these tools can help set realistic expectations around how long your test should run, and how much traffic you’ll need.

Quick Example: How It Works

Say your current conversion rate is 4%, and you want to detect a 10% improvement (to 4.4%) with 95% confidence.

Pop that into your calculator, and it might tell you that you need 13,000 users per variation.

If you only get 500 visitors a week, you’ll know that test needs 4–5 months to run, or you’ll need to broaden your traffic sources.

Tips When Using a Sample Size Calculator

1. Don’t Choose Unrealistically High MDEs

Wanting a 30% lift is fine, but if the calculator spits out a low sample size, don’t assume your test will be quick. Small effects often require large sample sizes.

2. Run Tests Long Enough

Even if you reach the sample size target in a few days, let the test run for full business cycles (e.g. at least 1–2 weeks) to avoid weekday/weekend bias.

3. Use Consistent Metrics

If you’re measuring conversions, make sure that means the same thing across all test variants. (Don’t compare clicks to form fills, for instance.)

4. A/B Testing Tools Can Help

Platforms like PageTest.AI can handle sample size calculation automatically, guiding you through test duration and variant monitoring as you go.

When NOT to Use a Sample Size Calculator

There are a few cases where you may not need a formal sample size:

  • Exploratory tests or smoke tests: When you’re just gauging early signals

  • Low-traffic sites: Consider other optimisation tactics (like heuristic or usability testing)

  • Multivariate tests: These require more advanced calculators or tools

Still, even in these cases, having an estimate of traffic needs can help shape your expectations and avoid wasted time.

Final Thoughts

If you’ve ever asked, “How long should I run this test?” or “How much traffic is enough?”, you need a sample size calculator.

It’s the difference between guessing and knowing. Between wasting time and getting results. And between thinking your variation won… when it really didn’t.

Using a sample size calculator puts you in control. It makes your testing smarter, your wins more meaningful, and your website more effective.

FAQ’s

What is a sample size calculator used for in A/B testing?
A sample size calculator helps you determine how many users or sessions are needed for each variation in an A/B test to get statistically valid results. It ensures your findings are accurate and not based on random chance.

How do I calculate the sample size for a test?
You’ll need your baseline conversion rate, desired minimum detectable effect (MDE), and preferred confidence level (usually 95%). Input these into a sample size calculator to get an exact number for each test group.

Is a sample size calculator necessary for small websites?
Yes, even small websites benefit from using a sample size calculator. It helps manage expectations and determine whether you should run a full test or use qualitative methods instead.

Can I use a sample size calculator for multivariate testing?
Yes, but you’ll need a more advanced tool. Multivariate tests involve more variations and interactions, requiring larger sample sizes and more complex calculations.




🤝

say hello to easy Content Testing

try PageTest.AI tool for free

Start making the most of your websites traffic and optimize your content and CTAs.

Related Posts

The BIG Changes in The May 2025 Google Update

16-06-2025

Becky Halls

The BIG Changes in The May 2025 Google Update

May 2025 Google Update Between 27 – 29 May 2025 many website owners, including us, saw huge drops in the number of pages they have indexed with Google. At first we thought this was a glitch and perhaps (hoping!) Google has a temporary issue that would rectify itself after a couple of days… Sadly this […]

Building PageTest.AI: A Founder’s Journey

12-06-2025

Ian Naylor

Building PageTest.AI: A Founder’s Journey

I’m one of the founders of PageTest.AI – the no-code, AI-powered site testing tool built for scrappy startups. A few months ago I was neck-deep in another project (3way.social, an AI backlink tool) when Google dropped a bombshell: Google Optimize was shutting down. Optimize had been “free, relatively easy to set up, and played nicely […]

Page Ranking Software: Tools That Help You Climb the SERPs

11-06-2025

Becky Halls

Page Ranking Software: Tools That Help You Climb the SERPs

Whether you’re running an ecommerce store, an SEO agency, or a personal blog, one truth holds: if your pages aren’t ranking, your content isn’t working. And while publishing good content is half the battle, knowing where your pages stand in search results (and why) is what gives you the edge. That’s where page ranking software […]