A/B Test Sample Size Calculator
Calculate the minimum number of visitors needed per variant before starting your A/B test. Input your baseline rate, target improvement, and statistical parameters to get sample size and estimated duration.
Test Parameters
Your current conversion rate (e.g., 5 for 5%)
Relative improvement to detect (e.g., 20 = detect 5% → 6%)
Duration Estimate
% of traffic included in the test
Results
MDE Sensitivity
Sample size per variant at different MDEs (same baseline/alpha/power):
Frequently Asked Questions
Why do I need to calculate sample size before running an A/B test?▼
Without a pre-determined sample size, you risk stopping the test too early (when results look significant by chance) or too late (wasting traffic). Pre-calculating sample size ensures your test has enough statistical power to reliably detect your target improvement and control your false-positive rate.
What is statistical power?▼
Statistical power (1-β) is the probability of detecting a real effect when one truly exists. An 80% power means you have an 80% chance of seeing a significant result if your variant really is better by the minimum detectable effect (MDE). Higher power requires larger samples. Most A/B tests use 80% or 90% power.
What is the Minimum Detectable Effect (MDE)?▼
MDE is the smallest relative improvement you care about detecting. If your baseline conversion rate is 5% and you want to detect a 20% relative improvement (to 6%), that's a 20% MDE. Smaller MDEs require much larger sample sizes — a 5% MDE might need 10x more traffic than a 20% MDE.
What significance level (alpha) should I use?▼
The standard is α = 0.05 (95% confidence), meaning a 5% false-positive rate. For high-stakes decisions (pricing, checkout flow), use α = 0.01. For exploratory tests where you'll validate winners anyway, α = 0.10 is acceptable. Never use α > 0.10 for production decisions.
What if I don't have enough traffic to reach the required sample?▼
Consider increasing MDE (accept only larger improvements), reducing variants (stick to A/B not A/B/C), or running the test longer. If your monthly traffic can't reach the sample within a reasonable timeframe (under 4-8 weeks), the test may not be feasible. Focus on higher-traffic pages or use Bayesian testing methods.
How do I estimate the test duration?▼
Test duration = required sample size per variant / (daily traffic × allocation percentage). If you need 5,000 visitors per variant with 1,000 daily visitors split 50/50, it takes 5,000 / 500 = 10 days. Add 10-20% buffer for weekday/weekend traffic variation.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
IP CIDR Calculator
Calculate IPv4 and IPv6 subnet details from CIDR notation. Get network address, broadcast, host range, subnet mask, wildcard mask, and binary representation.
Open free tool →
IPv4 Subnet Calculator
Calculate IPv4 subnet details from CIDR notation. Get network address, subnet mask, broadcast address, first/last host, and total usable hosts instantly. Free online tool.
Open free tool →
Age Calculator
Calculate exact age in years, months, and days from a birthdate. Shows total days/weeks lived, next birthday countdown, day of week born, Chinese zodiac, and Western zodiac sign.
Open free tool →
More Free Tools
Related Articles
A/B Testing Complete Guide for Developers 2026: Statistics, Tools & Best Practices
Master A/B testing from scratch. Understand statistical significance, p-values, sample size calculation, and the best split testing tools with a developer implementation guide.
UTM Parameters Complete Guide for Developers 2025
Master UTM parameters for accurate campaign tracking. Learn all 5 UTM params with real examples, naming conventions, GA4 setup, and best practices for developers.
API Testing Best Practices 2026: Postman vs Insomnia vs Bruno
Complete guide to API testing in 2026. Compare Postman, Insomnia, and Bruno, learn best practices for REST and GraphQL testing, and build automation pipelines that catch regressions before production.
DevOps Automation Tools in 2026: Orchestrating the Software Delivery Pipeline
Master DevOps automation with this guide to the tools that orchestrate modern software delivery. Covers CI/CD pipelines, infrastructure provisioning, configuration management, testing automation, and the emerging AI-assisted automation patterns that define 2026.
End-to-End Testing in 2026: Writing Tests That Don't Lie
E2E testing guide 2026: choose Playwright or Cypress, eliminate flakiness, structure test suites for CI/CD, and understand real application quality limits.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →