Back to Articles
ab-testingexperimentationfundamentals

The Complete Guide to A/B Testing

Everything you need to know about A/B testing — from the fundamentals of how it works to advanced techniques for scaling your experimentation program.

March 2, 2026·7 min read·Sean Quigley, CEO, Surface AI

A/B testing is the foundation of data-driven optimization. You show two versions of a page to different visitors, measure which one performs better, and ship the winner. The concept is simple. Doing it well is not.

This guide covers the full picture — how A/B testing works, where teams go wrong, and how to build a testing program that compounds results over time.

How A/B Testing Works

An A/B test splits your incoming traffic randomly between two versions of a page:

  • Control (A) — Your current page, unchanged
  • Variant (B) — The modified version with one specific change

Visitors are assigned to a group when they first arrive, and they stay in that group for the duration of the test. The platform tracks a predefined conversion event — sign-ups, purchases, clicks, form submissions — and compares the conversion rate between the two groups.

When enough data has been collected to reach statistical significance, you can confidently declare a winner.

The Anatomy of a Good Test

Every meaningful A/B test has four components:

1. A Clear Hypothesis

"Let's try a different button color" is not a hypothesis. A proper hypothesis states what you're changing, what you expect to happen, and why.

Example: "Changing the CTA from 'Get Started' to 'Start My Free Trial' will increase sign-ups because it reduces uncertainty about what happens after clicking."

2. A Single Primary Metric

Pick one metric before the test starts. This is the metric that determines whether the test wins or loses. Common primary metrics:

  • Sign-up completion rate
  • Purchase conversion rate
  • Click-through rate on CTA
  • Demo booking rate

Choosing your metric after seeing results — known as p-hacking — invalidates the experiment.

3. A Sufficient Sample Size

Running a test without calculating the required sample size upfront is the most common A/B testing mistake. You need enough visitors in each group to distinguish a real effect from random noise.

The three inputs to a sample size calculation:

  • Baseline conversion rate — Your current rate
  • Minimum detectable effect — The smallest improvement worth detecting (typically 10–20% relative)
  • Significance threshold — Usually 95% confidence

A page with a 3% conversion rate testing for a 15% relative lift needs roughly 15,000 visitors per variant.

4. An Adequate Duration

Even if you hit your sample size in three days, run the test for at least one full week — ideally two. This accounts for day-of-week variation and ensures your results aren't skewed by a single unusual day.

What to Test (and in What Order)

Not all tests are equal. Prioritize changes with the highest expected impact:

High impact (test first):

  • Headlines and value propositions
  • Call-to-action copy and placement
  • Page layout and information hierarchy
  • Pricing presentation
  • Social proof type and placement

Medium impact:

  • Form length and field order
  • Hero images and visuals
  • Navigation and page flow
  • Trust signals and risk reversals

Lower impact (test later):

  • Button colors and styling
  • Font sizes and typography
  • Minor copy variations
  • Icon and badge design

Start at the top. A headline change that reframes your entire value proposition will outperform a button color test every time.

Common Mistakes

Stopping Tests Early

This is called the peeking problem. You check results after two days, see that B is winning with "92% confidence," and stop the test. The problem: early results are volatile. A test that looks like a clear winner at day two frequently reverses by day seven.

The rule: Don't stop until you've hit both your pre-calculated sample size and your minimum duration.

Testing Too Many Things at Once

If your variant changes the headline, CTA, hero image, and layout simultaneously, and it wins — what caused the improvement? You don't know. That insight is lost.

Test one variable at a time. If you want to test multiple elements simultaneously, use multivariate testing, which is designed for that purpose.

Running Tests on Low-Traffic Pages

A page with 500 visitors per month cannot power a meaningful A/B test. You'll either wait months for a result or declare a winner based on insufficient data. Focus your first tests on your highest-traffic pages where you'll reach significance in a reasonable timeframe.

Ignoring Negative Results

A test that loses is not a failure — it's a data point. Negative results tell you what your audience doesn't respond to, which is just as valuable as knowing what they do respond to. Document every result, win or lose.

Frequentist vs. Bayesian A/B Testing

There are two statistical frameworks for analyzing A/B tests:

Frequentist (traditional) — Sets a fixed sample size and significance threshold (usually 95%) upfront. You run the test, collect the data, and then evaluate. The result is binary: statistically significant or not. This is the approach used by most classic A/B testing tools.

Bayesian — Instead of a binary yes/no, Bayesian analysis gives you a probability that one variant is better than the other. "There's an 94% probability that B outperforms A" is more intuitive than "p < 0.05." Bayesian methods also handle early stopping more gracefully.

Neither is inherently better. Frequentist is more rigorous for high-stakes decisions. Bayesian is more practical for fast-moving product teams.

A/B Testing vs. Bandit Testing

Traditional A/B testing splits traffic 50/50 for the entire test duration. Bandit testing starts with an even split but dynamically shifts traffic toward the better-performing variant as data comes in.

A/B TestingBandit Testing
Traffic splitFixed 50/50Dynamic, performance-based
During the testHalf your traffic sees the loserTraffic shifts to the winner
Best forHigh-stakes decisions, rigorous proofSpeed, continuous optimization
VariantsUsually 2Multiple simultaneously

Bandit testing is faster and wastes less traffic, but provides less statistical rigor. Most teams benefit from using both: A/B tests for major strategic decisions, bandit tests for ongoing optimization.

Scaling Your Testing Program

The teams that see the biggest cumulative impact from A/B testing are those that test consistently, not those that run occasional big experiments.

Beginner (0–2 tests/month):

  • Focus on one page at a time
  • Test headlines and CTAs first
  • Build the habit of documenting every result

Intermediate (2–4 tests/month):

  • Test across multiple pages simultaneously
  • Develop a prioritized backlog of test ideas
  • Segment results by traffic source and device

Advanced (5+ tests/month):

  • Run parallel tests across your entire funnel
  • Use multivariate testing on high-traffic pages
  • Build a knowledge base of insights that informs future tests
  • Automate experiment management with tools that handle traffic allocation and significance calculations

The Compounding Effect

A/B testing compounds. A 5% lift from one test becomes the new baseline for the next test. Over a year, a team running two tests per month with a 40% win rate and an average 8% lift per win will see a cumulative improvement of roughly 40%.

The math only works if you keep testing. The biggest mistake isn't a failed test — it's stopping.

Getting Started

If you're running your first test, keep it simple:

  1. Pick your highest-traffic page
  2. Write a hypothesis about the headline or CTA
  3. Calculate your required sample size
  4. Build one variant with one change
  5. Run the test for at least two weeks
  6. Document the result regardless of outcome
  7. Start the next test

For teams that want to accelerate beyond sequential testing, platforms like Surface AI run continuous multivariate experiments with automatic traffic allocation — testing dozens of variations in the time it takes to run a single A/B test manually.