A/B Testing: The Complete Guide for Online Stores

A/B testing shows two versions of a page to comparable visitors at the same time and measures which one converts better. Done right, it replaces opinion with evidence: plan the sample size first, run in full weeks, and judge the result on its confidence interval, not on a single day's numbers.
A/B testing
A/B testing randomly splits visitors between the current version of a page (A, the control) and a changed version (B), then compares how each group converts to see whether the change caused a real difference.
Because both groups see the store at the same time, everything else that moves conversion rate (campaigns, seasonality, stock levels, a competitor's sale) hits them equally. The only systematic difference left is the change you made. That is what makes an A/B test the most reliable way to learn whether a new product page, offer or checkout step actually earns more money, rather than just looking better in a meeting.
Most online stores already change things all the time: a new hero banner, a different shipping message, a rewritten product description. Without a test, nobody knows which of those changes helped, which hurt and which did nothing. Revenue moves for a hundred reasons every week, so a before-and-after comparison usually measures the weather, not your idea.
This guide covers the whole practice of A/B testing for e-commerce: the process from hypothesis to decision, the statistics you need (and the ones you can ignore), how to plan the sample size and test duration, the mistakes that produce false winners, the tools, and how to turn single tests into a roadmap. Each section links to deeper articles, and the free calculators do the maths for you.
The A/B testing process, step by step
Every good test follows the same five steps. First, find a problem worth solving in your data: a step in the funnel where visitors drop off more than they should, or a page with high traffic and low conversion. Second, write a hypothesis that names the change, the metric and the reason: 'Showing delivery dates on the product page will raise add-to-cart rate, because uncertainty about delivery is the most common question in support tickets.' Third, plan the sample size and duration before you launch. Fourth, run the test untouched until the plan says stop. Fifth, read the result, decide, and write down what you learned.
The step teams skip most often is the third one. Launching first and deciding later how long to run is how tests end up being stopped the moment they look good, which is the single biggest source of fake wins.
Sample size and test duration
The number of visitors a test needs depends on three things: your current conversion rate, the smallest lift that would be worth shipping (the minimum detectable effect, or MDE) and how certain you want to be. Small lifts on low conversion rates need a lot of traffic. A store converting at 3% that wants to detect a 10% relative lift (3.0% to 3.3%) at 95% confidence and 80% power needs about 53,200 visitors per variant, so roughly 106,000 in total. Halve the lift you want to detect and you need about four times as many visitors.
Turn the sample into a duration by dividing by the weekly traffic that reaches the tested page, then round up to whole weeks so every weekday is represented equally. Weekend shoppers behave differently from weekday ones. If the answer is more than eight to twelve weeks, the test is too small for your traffic: test a bolder change, a higher-traffic page, or a step earlier in the funnel. The sample size calculator and the A/B test calculator work this out for you, including how long to run a test at your traffic.
Statistical significance, in plain words
A test result is statistically significant when a gap as large as the one you saw would be unlikely if the two versions actually performed the same. At 95% confidence, that means a p-value below 0.05. It does not mean there is a 95% chance the variant is better, and it says nothing about how big the lift is. For that, read the confidence interval: a lift of +12% with an interval from +1% to +23% is a real but uncertain win; an interval from -4% to +28% means you can't rule out that the change does nothing at all.
Bayesian testing answers the question most people actually ask, 'how likely is it that B is better?', and is a useful companion to the classic p-value. Whichever you use, decide the rules before the test starts. If you need to check results every day, use sequential testing, which is designed for continuous monitoring; ordinary significance tests are not.
The two checks to run on every result
Before you read the lift, check the traffic split: if you planned 50/50 and got a visibly uneven split on a large sample, a redirect, bot filter or tracking bug is skewing the test (a sample ratio mismatch) and the result can't be trusted. Then check that you reached the planned sample. A result that looks significant halfway through is not a result yet.
Choosing an A/B testing framework
A framework is the set of rules your team agrees on before any test runs: which metric decides a test (conversion rate, revenue per visitor or average order value), what confidence level you use, how long a test runs at minimum, which guardrail metrics must not get worse, and who makes the call. Writing these down once saves an argument on every single test.
For most online stores, revenue per visitor is the better primary metric than conversion rate, because a change can raise conversion while lowering basket size, or the other way around. Keep conversion rate and average order value as secondary metrics, and use guardrails such as return rate or refund requests for changes that touch price or promises. Fix the confidence level at 95% as a default and lower it only for cheap, easily reversed changes.
A/B testing examples worth copying
The best test ideas come from your own data and customers, but some patterns repeat across stores. Product pages: delivery dates and return terms near the add-to-cart button, clearer variant selection, more useful photography. Cart and checkout: fewer form fields, visible payment options, removing surprise costs. Offers: free-shipping thresholds set just above the typical basket, bundles that raise basket size without discounting. Category pages: better sorting and filters, and the right number of products per row.
Treat any example, including the ones below, as a hypothesis for your store, not a guaranteed win. A change that lifted one store's conversion can do nothing for yours because your customers, prices and traffic mix are different. That is the whole point of testing it.
A/B testing mistakes that produce false winners
Most bad decisions from A/B tests come from a short list of mistakes. Stopping a test the first time it looks significant inflates the false-positive rate far above 5%. Running for less than a full week measures a different audience than your real traffic. Testing four variants at once without correcting for multiple comparisons almost guarantees one of them looks like a winner by chance. Changing the test while it runs, or launching it during a sale, makes the result describe a situation that won't happen again.
The quieter mistakes are just as costly: picking a metric that the change can't move, testing changes too small to detect with your traffic, and declaring 'no difference' a failure. A well-run test that shows no effect is valuable: it stops you shipping a change that costs development time and adds nothing.
A/B testing tools: what you actually need
An A/B testing setup needs four things: a way to split visitors consistently (the same visitor should always see the same version), a way to make the change without breaking the page or causing flicker, reliable tracking of the metrics that decide the test, and a correct statistical readout. Client-side testing tools change the page in the browser and are quick to set up; server-side testing changes the page before it is sent, which avoids flicker and suits pricing and checkout tests.
Whatever tool you use, check two things before trusting it: that the variant loads without a visible flash of the old version, and that purchases are attributed only to visitors who saw the test before they bought. For planning and double-checking results by hand, the free A/B test calculator covers sample size, duration, significance and a traffic-split check.
Build an A/B testing roadmap
A roadmap turns a backlog of ideas into a sequence of tests your traffic can actually support. Start from where revenue is lost in the funnel, score each idea on expected impact, confidence and effort, and check the required sample size before committing: an idea that needs six months of traffic belongs at the bottom, however good it sounds. Plan tests per page or funnel step so two tests don't compete for the same visitors.
Prioritization frameworks such as ICE and PIE make the scoring consistent, but the most useful habit is simpler: after every test, write down what it taught you about your customers and use it to decide the next one. A roadmap that learns beats a long list that doesn't.
A/B testing program management
Once a store runs more than a test or two a month, the bottleneck stops being ideas and becomes coordination. Program management covers who owns each test, how tests are reviewed before launch, where results are recorded, and how wins actually get built into the store. A surprising share of winning tests never ship, or ship months later, which means the revenue they proved is never collected.
Keep a single log of every test with its hypothesis, plan, result and decision, including the losers and the flat ones. Review it quarterly: the patterns across tests (what keeps working on product pages, what never moves checkout) are worth more than any single result.
Testing email: subject lines, open rate and p-hacking
Email is where many stores run their first tests, because the email platform splits the list for you. The same rules apply. Decide the metric first: open rate is easy to move but rarely the goal, so judge subject lines on clicks or revenue per recipient where you can. Test one idea at a time, and don't run ten subject lines against each other and crown whichever happened to win; with that many comparisons, one will look significant by chance. That is p-hacking, and it fills an email calendar with lessons that aren't true.
Worked examples from real stores
These articles walk through specific tests end to end: what was tested, how the sample size and guardrails were set, and how to read the outcome. They are a good way to see the process above applied to price changes, flows and page details.
From single tests to an experimentation program
A/B testing is one method inside the broader practice of experimentation: strategy, prioritization, feature experimentation with feature flags, and the analysis that turns results into the next round of ideas. When you are ready to run tests continuously rather than one at a time, the experimentation guide covers how to build that program. Reading results well is its own skill too: experiment analysis, segment analysis and experiment reporting explain how to find out who a change worked for, and how to share it.
A/B testing: frequently asked questions
A/B testing randomly splits visitors between the current version of a page and a changed version, at the same time, and compares how each group converts. Because both groups face the same conditions, a difference that is large enough to be statistically significant can be attributed to the change itself.
Until it reaches the sample size you planned before starting, and always in whole weeks so every weekday is represented. Divide the visitors you need by the weekly traffic to the tested page. Never stop a test early because it looks good; that is the most common way to get a false winner.
It depends on your conversion rate and the lift you want to detect. At a 3% conversion rate, detecting a 10% relative lift needs about 53,200 visitors per variant at 95% confidence and 80% power. Lower-traffic stores can still test, but should test bolder changes that produce bigger lifts.
An A/B test compares whole versions of a page. A multivariate test changes several elements at once and measures every combination, which needs far more traffic because the visitors are split across many combinations. For most online stores, focused A/B tests are the better use of traffic.
Usually revenue per visitor, because it captures both whether people buy and how much they spend. Keep conversion rate and average order value as secondary metrics, and add guardrails such as refunds or returns for changes that affect price or promises.
Treat it as a result, not a failure: the change didn't move the metric enough for your traffic to detect. Record it, keep the simpler version, and use what you learned to design a bolder test. Extending a finished test until it turns significant is p-hacking.
Test ideas before you ship them
Run unlimited A/B tests, attach hypotheses to outcomes, and build a searchable archive of what works — and what doesn't.