Product

[Website Personalization](/content/personalization/index.html) [A/B & Multivariate Testing](/content/ab-testing/index.html) [AI Copilot](/content/ai-copilot/index.html) [AI Wingman](/content/ai-wingman/index.html) [AI Conversion Optimizer](/content/ai-conversion-optimizer/index.html) [No-Code Visual Editor](/content/visual-editor/index.html) [Product Recommendations](/content/product-recommendations/index.html) [Feature Flags](/content/feature-flags/index.html) [View all features →](/content/features/index.html)

Use Cases

[Price A/B Testing](/content/use-cases/price-ab-testing/index.html) [Theme A/B Testing](/content/use-cases/theme-ab-testing/index.html) [Template A/B Testing](/content/template-ab-testing/index.html) [Discount A/B Testing](/content/discount-ab-testing/index.html) [Shipping A/B Testing](/content/shipping-ab-testing/index.html) [Content A/B Testing](/content/content-ab-testing/index.html) [Checkout A/B Testing](/content/checkout-ab-testing/index.html) [Geo-Based Personalization](/content/use-cases/geo-personalization/index.html) [Buyer-Intent Nudges](/content/use-cases/buyer-intent-nudges/index.html) [Split-URL / Redirection](/content/use-cases/split-url-testing/index.html)

Solutions & Guides

[Conversion Rate Optimization](/content/conversion-rate-optimization/index.html) [A/B Testing Software](/content/ab-testing-software/index.html) [Cart Abandonment Recovery](/content/cart-abandonment-recovery/index.html) [Landing Page Optimization](/content/landing-page-optimization/index.html) [Shopify A/B Testing](/content/shopify-ab-testing/index.html) [Shopify Personalization](/content/shopify-personalization/index.html)

Explore

[Widgets](/content/widgets/index.html) [Integrations](/content/integrations/index.html) [Customers](/content/case-studies/index.html) [Pricing](/content/pricing/index.html)

Resources

[Blog](/content/blog/index.html) [Playbooks](/content/playbooks/index.html) [Videos](/content/videos/index.html) [Webinars](/content/webinars/index.html) [Interviews](/content/interviews/index.html) [E-Books](/content/ebooks/index.html) [Conversion Glossary](/content/conversion-glossary/index.html)

Platforms

[Shopify](/content/integrations/shopify/index.html) [Shopline](/content/integrations/shopline/index.html) [Shoplazza](/content/integrations/shoplazza/index.html) [Chrome Extension](/content/chrome-extension/index.html) [All integrations](/content/integrations/index.html)

[Start free trial](/content/signup/index.html) [Book a demo](/content/demo/index.html)

Definition

# What Is Sample Size? Definition & Guide

Learn how calculating required sample size before starting A/B tests ensures statistical validity and prevents stopping experiments prematurely online.

Sample size is the minimum number of visitors (sessions or unique users) that each variant in your A/B test needs to receive before you can draw statistically reliable conclusions. Running a test with too few visitors produces results that are largely noise — you might see a 20% lift on 300 sessions that disappears entirely when 3,000 sessions are observed. Getting sample size right is a prerequisite for trustworthy experimentation.

## Formula / How to Calculate Sample Size

The required sample size per variant depends on three inputs:

**n = (z² × p(1 − p)) / e²**

Where:

- z = z-score for your confidence level (1.96 for 95% confidence)
- p = baseline conversion rate (your current control rate)
- e = minimum detectable effect (MDE) — the smallest lift you care about detecting

**Example**: If your current conversion rate is 3% and you want to detect a 15% relative improvement (from 3% to 3.45%), with 95% confidence, you need approximately 15,000 sessions per variant. Most A/B testing tools include a sample size calculator — input your baseline rate and MDE and it does the math.

## Why Sample Size Matters for Ecommerce

An underpowered test is worse than no test at all because it gives you false confidence in noisy data. D2C brands with lower-traffic stores — say, 20,000 monthly sessions — face a real constraint: to reach the sample sizes needed for reliable A/B test results, tests may need to run for 3–6 weeks. That's often longer than the festive season itself. Understanding sample size requirements helps you prioritize which tests to run (high-traffic pages first), set realistic test durations, and avoid the "peeking problem" of calling tests early. It also helps you size up realistically: if you need 50,000 sessions per variant to detect a 10% lift and you only get 5,000 sessions a week, that test will take months.

## Real-World Example

A D2C kitchenware brand on Shopify wanted to test a new checkout page design. Their checkout page received about 2,000 sessions per week with a 58% completion rate. Using a sample size calculator, they found they'd need 12,000 sessions per variant to detect a 5% relative improvement at 95% confidence — a 6-week test at their current traffic. Instead of testing on checkout, they moved the test to their product listing page (12,000 sessions/week) and ran the same test in 2 weeks. The learning: design your test program around your traffic reality, not your ideal.

## How to Improve / Optimize Sample Size

- **Increase traffic to tested pages**: More sessions per week means you reach required sample sizes faster. Paid traffic, email campaigns, or push notifications to tested pages all help.
- **Increase your minimum detectable effect**: If you're willing to detect only large improvements (20%+ lifts), you need far smaller sample sizes. This means prioritizing high-impact hypotheses.
- **Test on higher-conversion pages**: A checkout page with 60% completion rate needs fewer sessions to detect the same relative change as a product page with 2% conversion rate.
- **Reduce the number of variants**: Every additional variant splits traffic further and increases the sample size needed for each. Stick to two variants (A vs. B) when traffic is limited.
- **Use sequential testing methods**: Bayesian testing approaches can sometimes require fewer sessions for equivalent confidence compared to traditional frequentist methods.

## Sample Size in A/B Testing

Sample size planning is the first step of any A/B test — not an afterthought. Before you launch a test, calculate the required sample size, estimate how long it will take at current traffic levels, and decide whether the test is feasible. A test that will take 6 months to reach significance on a page you redesign every quarter is a test you shouldn't run.

## Related Terms

- [Statistical Significance](/content/conversion-glossary/statistical-significance/index.html)
- [Confidence Interval](/content/conversion-glossary/confidence-interval/index.html)
- [P-Value](/content/conversion-glossary/p-value/index.html)
- [A/B Testing](/content/conversion-glossary/a-b-testing/index.html)
- [Control Group](/content/conversion-glossary/control-group/index.html)
- [Conversion Rate](/content/conversion-glossary/conversion-rate/index.html)

* * *

**Run smarter A/B tests with CustomFit.ai — 14-day free trial, no credit card required.**

##### Put this into practice

Run A/B tests and personalize your store without code. 14-day free trial, no credit card.

[Start free trial →](/content/signup/index.html)

### Articles about What Is Sample Size? Definition & Guide

In-depth guides and case studies where this concept is put to work.

- [A/B Testing Mistakes: 15 Common Errors That Kill Your Results\\
\\
The 15 most common A/B testing mistakes: stopping tests early, insufficient sample size, testing without a hypothesis, ignoring mo…](/content/blog/ab-testing/ab-testing-mistakes/index.html)
- [A/B Testing Sample Size Calculator: How Many Visitors Do You Need?\\
\\
Calculate how many visitors you need for a valid A/B test. Inputs: baseline CVR, minimum detectable effect, confidence level. Incl…](/content/blog/ab-testing/ab-testing-sample-size-calculator/index.html)
- [What Is A/B Testing? The Complete Guide for 2026\\
\\
A/B testing is a method of comparing two versions of a webpage to find which performs better. Learn the complete A/B testing proce…](/content/blog/ab-testing/what-is-ab-testing/index.html)
- [How Long Should You Run an A/B Test?\\
\\
Learn exactly how long to run an A/B test to get statistically valid results. Avoid stopping too early with our practical duration…](/content/blog/ab-testing/how-long-run-ab-test/index.html)
- [Statistical Significance in A/B Testing: A Plain-English Guide\\
\\
Statistical significance in A/B testing means there's less than a 5% chance your result is random. Here's what p-values, confidenc…](/content/blog/ab-testing/statistical-significance-ab-testing/index.html)

[← Back to Conversion Glossary](/content/conversion-glossary/index.html)

### Built for every D2C category

🧴

Skincare

💄

Beauty

🌿

Wellness

☕

F&B

👟

Apparel

💍

Jewelry

🛋️

Home

🍼

Baby

Live · Right now

**Mamaearth** — free-shipping band+12.4% AOV**GIVA** — festive collection page+34% revenue**Bellavita** — PDP CTA test+27.4% CVR**Kapiva** — Quiz-driven recs+9.48% CTR**The Sleep Co** — landing personalized2× captures**Plum** — Returning shopper swap+18.2% CVR**Mamaearth** — free-shipping band+12.4% AOV**GIVA** — festive collection page+34% revenue**Bellavita** — PDP CTA test+27.4% CVR**Kapiva** — Quiz-driven recs+9.48% CTR**The Sleep Co** — landing personalized2× captures**Plum** — Returning shopper swap+18.2% CVR
