ShopAnalytics

MDE Calculator & Sample Size Calculator for A/B Tests

Find the smallest lift your A/B test can detect with the traffic you have, or how many visitors you need before you launch it

Not sure where to start? Load a realistic e-commerce example to see how the calculator works.

🔄 MDE Calculator: What Lift Can I Detect?

Already know your traffic? Enter your baseline conversion rate and the visitors each variant will get. You’ll see the smallest relative lift your test can reliably detect.

Detectable MDE
—

Assumes 95% confidence, 80% power, a two-tailed test and one variant against the control. Need other settings? Use the sample size calculator below and change the MDE until the sample matches your traffic.

Sample Size Calculator: How Many Visitors Do I Need?

Test Parameters

Your current conversion rate. Check your analytics.
Smallest relative lift worth detecting. Smaller = more traffic needed.
To estimate test duration. Leave blank to skip.

Results

Sample Size Per Variant
—
Enter your parameters
Total Visitors Required
—
Across all variants (incl. control)
Expected Variant Rate
—
Absolute Difference
—

Not sure what to type in? The first thing I ask a store owner is their conversion rate for the goal they’re testing, last 30 days. If that takes more than a minute to find, your analytics is working against you. In a simple dashboard that puts conversion rate next to each goal, like Statable, it’s one look, and daily visitors sit on the same screen.

How to Calculate MDE (Minimum Detectable Effect)

MDE is the smallest change your test can reliably detect with the traffic you have. Here’s the quick way to estimate it by hand.

Minimum Detectable Effect (absolute) MDE ≈ ( Z1−α/2 + Z1−β ) × √( 2 × p(1−p) / n )

Here p is your baseline conversion rate and n is the sample per variant. At 95% confidence and 80% power, the two Z values are 1.96 and 0.84.

To get the relative MDE, divide by the baseline: relative MDE = absolute MDE ÷ p.

Worked example: a 3.2% baseline with 15,000 visitors per variant.

  • √(2 × 0.032 × 0.968 ÷ 15,000) = 0.00203.
  • Multiply by 1.96 + 0.84 = 2.80 and you get 0.0057, or 0.57 percentage points.
  • Relative to a 3.2% baseline, that’s about 18%.

The MDE calculator above solves the full formula, which uses the variance of both groups. That’s why it shows ±18.6% for the same inputs.

How to Read the MDE Result

  • ±18.6% rel is the smallest relative change your test can reliably catch. On a 3.2% baseline, the variant needs to reach about 3.80%.
  • If the lift you expect is smaller than the MDE, the test will most likely end without a clear winner.
  • To lower the MDE, give each variant more visitors, run the test longer, or test a metric with a higher baseline, like add-to-cart rate or another micro-conversion that comes before the purchase.
  • Relative and absolute MDE are different units. A 10% relative MDE on a 3% baseline equals 0.3 percentage points.

What Is Sample Size in A/B Testing?

Sample size is the number of visitors each variant of your test needs to see before you can trust the results. Run a test too short, and you might celebrate a “winner” that was just random noise. Run it too long, and you burn time and traffic that could have been optimized.

For e-commerce, getting this right is especially important. Most online stores have conversion rates between 1% and 5%, which means you need more data to detect meaningful lifts than, say, an email signup form converting at 30%.

α

Significance Level (α)

The probability of declaring a winner when there isn’t one. At 95% confidence, α = 5%. In other words, a 1-in-20 chance of a false positive.

β

Statistical Power (1 − β)

The probability of detecting a real effect when it exists. 80% power means a 20% chance of missing a genuine winner. For high-stakes tests, use 90%.

Δ

Minimum Detectable Effect

The smallest relative change worth finding. A 10% MDE on a 3% baseline means you’re looking for a jump from 3.0% to 3.3%. Smaller MDE = bigger sample needed.

📊

Baseline Conversion Rate

Your current metric (CR, ARPU, add-to-cart rate). Lower baselines require proportionally larger samples because the signal-to-noise ratio is weaker.

The Formula Behind the Calculator

This calculator uses the standard two-proportion z-test formula for sample size determination:

Sample Size Per Variant n = ( Zα ⋅ √(2p̄(1−p̄)) + Zβ ⋅ √(p1(1−p1) + p2(1−p2)) )2 / (p2 − p1)2

Where p1 is the baseline rate, p2 is the expected variant rate, p̄ is the pooled rate, and Z values come from the standard normal distribution.

E-Commerce Benchmarks

Metric Typical Range Realistic MDE Why It Matters
Purchase CR 1% to 5% 5% to 15% relative Primary revenue metric. Low base = large samples.
Add-to-Cart Rate 5% to 15% 3% to 10% relative Higher base rate, easier to detect changes.
Checkout Start Rate 30% to 60% 2% to 5% relative High-volume funnel step, so tests run faster.
Revenue per Visitor $1 to $10 5% to 20% relative High variance. Needs bigger samples than CR tests.
Email Signup CR 2% to 8% 10% to 20% relative Micro-conversion. Good for faster iteration.

Best Practices

✓ DO
  • Decide sample size before the test starts
  • Use your actual conversion rate from the last 30 days
  • Account for weekly cycles: run in full-week increments
  • Set a realistic MDE (5-15% relative for e-commerce)
  • Use 95% confidence and 80% power as defaults
  • Apply Bonferroni correction for 3+ variants
✕ DON’T
  • Stop the test early because results “look significant”
  • Use site-wide CR if testing on a specific segment
  • Expect to detect 1-2% relative lifts on purchase CR
  • Ignore seasonality (Black Friday traffic ≠ February traffic)
  • Run tests shorter than 7 days regardless of sample size
  • Change the test design (traffic split, goals) mid-flight

Frequently Asked Questions

MDE, or minimum detectable effect, is the smallest difference between control and variant that your test can reliably detect. You set it before the test starts. Smaller MDEs need more visitors, so pick the smallest lift that would still change your decision.

For purchase conversion rate, 10-15% relative is realistic. That means if your CR is 3%, you’re aiming to detect a jump to ~3.3%-3.45%. Smaller effects (5%) are real but require massive sample sizes. If you have limited traffic, consider testing higher-funnel metrics like add-to-cart rate where you’ll have more volume.

A/B tests typically randomize at the visitor (cookie/user ID) level, not the session level. One visitor may create multiple sessions during the test, but they should always see the same variant. Use unique visitors per day for the most accurate duration estimate.

Two-tailed is the industry standard and the safer choice. It detects both positive and negative effects. One-tailed gives you more power (smaller sample) but only looks for improvement. You’d miss it if your variant actually hurts conversion. Use one-tailed only when a negative result would lead to the same decision as no result.

This means the true effect is likely smaller than your MDE, or there’s no effect at all. That’s a valid result. Don’t extend the test hoping for significance (that inflates false positives). Instead, log the result, archive the variant, and move on to a higher-impact test hypothesis.

More variants means more comparisons and a higher risk of false positives. The calculator applies Bonferroni correction, dividing your significance level by the number of comparisons. With 3 variants (A/B/C), the per-comparison alpha goes from 5% to ~1.67%, which increases the required sample per variant by roughly 30-40%.

This calculator is designed for proportion-based metrics (conversion rates). Revenue metrics such as average order value have continuous distributions with higher variance, so they typically need 2-5x larger samples. For ARPU tests, use a dedicated continuous-metric calculator or add a 2-3x multiplier to the result here as a rough estimate.