Shopify A/B Test Sample Size (With a Free Template)

Last updated
Expert reviewed
5 min read
Simeon Mantel
Simeon Mantel
CEO at Fudge.

Key takeaways

  • Your Shopify A/B test sample size is the number of visitors each variant needs before the result means anything. Call the winner too early and you are reading noise.
  • Four inputs drive it: your baseline conversion rate, the minimum detectable effect you want to catch, the significance level (usually 95%), and the statistical power (usually 80%).
  • A lower baseline conversion rate and a smaller detectable effect both push the required sample up fast. Small changes on low-traffic stores can need tens of thousands of visitors per variant.
  • Use a free calculator like Evan Miller’s to get the number, then plan the test in full weeks of traffic so day-of-week patterns don’t skew it.
  • Fudge ships your test variant as native theme code in minutes, so the slow part is the traffic, not the build.

Your Shopify A/B test sample size is the single number that decides whether a test can tell you anything. It is how many visitors each version of the page needs to see before the difference between them is real rather than random.

Get it wrong and the whole exercise is theatre. This guide covers why sample size matters, the four inputs that set it, the formula and a worked example, a spreadsheet template you can copy, and the low-traffic reality most Shopify stores run into.

Why you can trust us

We have worked in the Shopify space for over four years and helped hundreds of brands improve their storefronts. We build Fudge, an AI storefront editor with a 5.0 rating on the Shopify App Store, so we sit on the theme layer where these tests actually run and see how often they get called before the data supports it.


Why sample size matters

An A/B test compares two versions of a page and measures which converts better. The catch is that conversion is noisy. Flip a fair coin 20 times and you rarely get exactly ten heads. Small samples swing around the true rate.

Sample size is the guard against that noise. Below the threshold, a variant can look like a 15% winner purely by chance.

Two failure modes come from ignoring it.

Underpowered tests. If you stop with too few visitors, a real improvement can hide inside the noise and read as “no difference.” You conclude the change didn’t work, ship nothing, and leave the uplift on the table.

Peeking and early stopping. The more tempting mistake is checking the dashboard daily and stopping the moment significance flashes green. Every extra peek is another chance for random variation to cross the line, so repeated checking inflates the real false-positive rate far above the 5% you think you are running.1 The fix is to fix the sample size in advance and wait for it.

This is the difference between running tests and running a testing programme. For the wider picture, see our guide to Shopify conversion testing.


The four inputs to a sample-size calculation

Every calculator asks for the same four things. Understand these and the number stops being a black box.

InputWhat it meansTypical value
Baseline conversion rateThe current conversion rate of the page you are testingWhatever your store actually does
Minimum detectable effect (MDE)The smallest uplift you want the test to be able to catch10% to 30% relative
Statistical significanceConfidence the result is not chance, set by alpha95% (alpha 0.05)
Statistical powerChance of catching a real effect if one exists, set by beta80%

Baseline conversion rate

This is your starting point, pulled from your own analytics for the exact page and audience you plan to test. A product page tested on mobile traffic has a different baseline than the same page on desktop, so scope it to the test.

Minimum detectable effect

The minimum detectable effect is the smallest lift worth detecting, usually written as a relative percentage. An MDE of 20% on a 3% baseline means you want to reliably spot a move to 3.6%.

This is the input people misjudge most. A smaller MDE means a more sensitive test, and sensitivity is expensive. Halving the effect you want to catch roughly quadruples the visitors you need.

Significance and power

Significance (95%) sets how sure you want to be that a detected win is not random. Power (80%) sets how likely you are to catch a win that genuinely exists. Both are conventions, not laws, but they are the standard defaults and a reasonable starting point for most stores.


The sample-size formula and a worked example

For a test comparing two conversion rates, the standard approximation for visitors needed per variant is:

n = (z_alpha + z_beta)^2 x [ p1(1-p1) + p2(1-p2) ] / (p2 - p1)^2

where:
  p1        = baseline conversion rate
  p2        = baseline x (1 + MDE)
  z_alpha   = 1.96   (two-sided, 95% significance)
  z_beta    = 0.84   (80% power)

Work a concrete case. Baseline conversion rate of 3%, you want to catch a 20% relative lift, at 95% significance and 80% power.

Putting those together gives 7.84 x 0.0638 / 0.000036, which is about 13,900 visitors per variant, or roughly 27,800 in total.

That is the number the calculator returns. The value of doing it by hand once is seeing exactly what moves it.


How baseline and MDE change the number

The two drivers are your baseline conversion rate and the effect you want to catch. Both can blow the sample size up quickly. The table below runs the same formula at 95% significance and 80% power across a few scenarios.

Baseline CVRRelative MDEVisitors per variantWeeks at 4,000 test visitors/week
3%30%~6,400~4 weeks
3%20%~13,900~7 weeks
3%10%~53,100~27 weeks
1%20%~42,600~21 weeks
5%20%~8,100~4 weeks

Two patterns fall out of the math.

Smaller effects cost far more. Dropping the MDE from 20% to 10% on a 3% baseline takes the requirement from about 13,900 to 53,100 per variant. Chasing a tiny lift is the fastest way to design a test you can never finish.

A lower baseline is punishing. At a 1% baseline, even a 20% lift needs about 42,600 per variant, three times the 3% case, because rare events carry more relative noise.

The final column translates the count into calendar time. It assumes 4,000 test-eligible visitors per week, split across both variants, rounded up to full weeks. That column is where most Shopify test plans meet reality.

Ship the variant in minutes so the only wait is traffic.
Try Fudge for Free

Build your own sample-size template

You don’t need a fancy tool to plan this. A spreadsheet with the formula above works and lets you sanity-check any calculator’s output.

Set up these cells:

Then add a weekly traffic input and a duration cell that divides 2 * n by your weekly test-eligible visitors. Now you can change the MDE and watch the runtime move before you commit to a test.

Keep a second sheet listing every test: hypothesis, the page, start and end dates, planned sample size, and the result. That log stops you re-running settled questions and makes your programme auditable. It pairs naturally with a broader Shopify CRO plan.


Free A/B test calculators worth using

If you would rather not maintain a spreadsheet, two well-known free tools do the same job.

Evan Miller’s sample size calculator takes your baseline rate and the MDE and returns the sample per variant, using the same significance and power inputs.2 It is a long-standing reference in the testing community and a good cross-check against your own sheet.

Optimizely’s sample size calculator is another free, browser-based option that asks for the same inputs and returns a per-variant number. Either tool will land close to the figures in the table above when fed the same assumptions.

Whichever you use, feed it your real baseline and a realistic MDE. A calculator fed optimistic inputs returns an optimistic, and usually unreachable, number.


The Shopify low-traffic reality

Here is the hard truth for smaller stores. The scenario table shows that detecting a modest lift on a typical conversion rate can need tens of thousands of visitors per variant. Plenty of Shopify stores don’t see that in a reasonable window.

That does not mean testing is pointless. It means you have to test smart.

For tools that support this on a Shopify budget, see our roundup of the best Shopify apps for CRO.


Where Fudge fits

Sample size sets how long a test must run. The other half of the equation is how long it takes to build the variant in the first place, and that is where most tests stall before they start.

Fudge is an AI storefront editor that writes native theme code. You describe the variant you want to test, a new product-page layout, a different hero, a restructured offer, and it writes the Liquid, CSS, and JavaScript straight into your theme. No developer queue, no widget.

Because the output is real theme code, the variant behaves like the rest of your store during the test, with no third-party script slowing the page and skewing the result. You can spin up the challenger, point your testing tool at it, and spend your effort on the part that actually takes time: waiting for the sample to fill. The same holds for anything else you build with the Shopify store editor.


FAQ

How do I calculate A/B test sample size for a Shopify store?

Take your baseline conversion rate, the minimum detectable effect you want to catch, and the standard 95% significance and 80% power. Feed those into a calculator like Evan Miller's, or use the formula n = (1.96 + 0.84)^2 x [p1(1-p1) + p2(1-p2)] / (p2-p1)^2. It returns the visitors needed per variant.

What is a minimum detectable effect (MDE)?

The MDE is the smallest uplift you want the test to be able to catch, usually written as a relative percentage. A 20% MDE on a 3% baseline means detecting a move to 3.6%. A smaller MDE makes the test more sensitive but needs far more visitors, since halving the effect roughly quadruples the sample size.

How long should I run a Shopify A/B test?

Run it until you hit your pre-calculated sample size, and always in whole-week blocks so weekend and weekday behaviour balance out. Divide the total visitors needed by your weekly test-eligible traffic to estimate duration. Two to four weeks is common; don't stop early just because significance flashes green.

Why does a low conversion rate need a bigger sample size?

Rare events carry more relative noise, so it takes more observations to separate a real effect from chance. At a 1% baseline, even a 20% lift can need around 42,600 visitors per variant, roughly three times what a 3% baseline needs for the same relative effect.

Can a low-traffic Shopify store run valid A/B tests?

Yes, but you have to test bigger changes, focus on your highest-traffic pages, and accept longer test windows. Detecting a small lift may need tens of thousands of visitors per variant, which is out of reach for many stores, so reserve fine-grained tests for high-traffic pages and use qualitative research elsewhere.

What significance and power should I use?

The conventional defaults are 95% statistical significance (alpha of 0.05) and 80% statistical power. Significance controls how sure you are that a detected win is not chance, and power controls how likely you are to catch a win that genuinely exists. Both are starting points rather than fixed rules.

Simeon's signature
Ship test variants without the dev queue.

Footnotes

  1. Evan Miller, “How Not To Run An A/B Test” - repeatedly checking a test and stopping as soon as it reaches significance inflates the false-positive rate well above the nominal level, which is why the sample size should be fixed in advance. https://www.evanmiller.org/how-not-to-run-an-ab-test.html

  2. Evan Miller, “Sample Size Calculator” - a free tool that returns the required sample per variant from a baseline conversion rate and a minimum detectable effect at chosen significance and power levels. https://www.evanmiller.org/ab-testing/sample-size.html

You might also be interested in

Klaviyo + Shopify: A Practical Setup Guide
Setting up Klaviyo on Shopify - install, flows that matter, segmentation, and what to skip. Practical guide for stores under $5M and beyond.
AI Product Descriptions for Shopify: Workflow & Tools
How to write Shopify product descriptions with AI - the prompt structure that produces on-brand copy, tools compared, and what to never let AI generate.
Launch a Shopify Store in France (With Templates)
Launch a Shopify store in France: TVA and mentions légales, EPR/Triman, payments, shipping, and the template changes French buyers expect.