A/B Test Sample Size Calculator

Plan your test before you start. Enter your conversion rate and the smallest change worth detecting to see how many visitors you need and how long to run it.

Updated
%
%
Relative change: 20% takes a 5% rate to 6%.
Result
—

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the A/B Test Sample Size Calculator

  1. Enter your current conversion rate.
  2. Choose the smallest relative change that would matter to you.
  3. Keep 95% confidence and 80% power unless you have a reason to change them.
  4. Add daily visitors to see how long the test will take.

The two numbers that matter

Minimum detectable effect is the smallest lift you care about. Smaller effects need far more visitors: halving it needs roughly four times the traffic. Power is the chance of spotting a real effect of that size, and 80% is the common standard.

How it’s calculated

This tool uses the standard formula for comparing two proportions with a two-sided test. Results are per version, so multiply by the number of versions for the total.

When the test ends, check the result with the A/B Test Significance Calculator.

Also searched as: ab test sample size calculator, sample size calculator, ab test duration calculator, how long to run ab test, minimum detectable effect, split test sample size.

Tools that pair well with the A/B Test Sample Size Calculator

  • CTR Calculator — Enter clicks and impressions to get your click-through rate, for ads, email or Search Console.
  • Percentage Calculator — Seven everyday percentage calculations on one page.
  • UTM Builder — Add utm_source, utm_medium, utm_campaign and friends to any link, see which GA4 channel the visit will land in, and tag a whole list of URLs at once.
  • GA4 Event Code Generator — Pick a recommended GA4 event — generate_lead, sign_up, purchase, add_to_cart and more — or name your own, fill in the parameters and items, and copy the code as gtag(), a Tag Manager dataLayer.push() or a server-side Measurement Protocol request.

Frequently asked questions

Is anything I enter saved or sent?
No. The calculation runs in your browser. Your last inputs are remembered on this device only, so the page opens where you left off.
How long should an A/B test run?
Until it reaches the planned sample size, and for at least two full weeks so every weekday is covered.
What if I don’t have enough traffic?
Test bigger changes, which need fewer visitors, or test a step with more traffic.
Is the change relative or absolute?
Relative. A 20% change on a 5% rate means detecting 6%.
Can I install A/B Test Sample Size Calculator as a web app and use it offline?
Yes. A/B Test Sample Size Calculator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

Related tools