ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Math
  3. A/B Test in Excel: Compare Conversion Rates and Significance

A/B Test in Excel: Compare Conversion Rates and Significance

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

To analyse an A/B test in Excel, count visitors and conversions for each version with COUNTIFS and divide to get the conversion rates. Lift is (rate B - rate A) / rate A. For significance, run a two-proportion z-test: pool the rates, find the standard error with SQRT, divide the gap by it, and turn z into a p-value with NORM.S.DIST.

Key takeaways

  • Conversion rate is conversions divided by visitors; COUNTIFS gets both counts from raw data.
  • Report the gap in percentage points and as relative lift, so readers see both sizes.
  • A two-proportion z-test needs only SQRT and NORM.S.DIST; CHISQ.TEST on the 2×2 counts gives the same p-value.
  • A p-value of 0.02 means a gap this large would be unusual if A and B truly converted equally; it is not a 98% chance that B is better.
  • Fix the sample size before the test and don't stop early when the result first looks significant.
On this page+
  1. What an A/B test measures
  2. Count visitors and conversions with COUNTIFS
  3. Calculate the difference and the lift
  4. Test significance with a two-proportion z-test
  5. How to read the p-value
  6. Common A/B testing mistakes
  7. Practise it

An A/B test in Excel comes down to three numbers: the conversion rate of each version, the lift of B over A, and a p-value that tells you whether the gap is bigger than chance would usually produce. COUNTIFS gets the counts, simple division gives the rates, and a two-proportion z-test with SQRT and NORM.S.DIST gives the significance. This guide works through one example, for marketers, product analysts and anyone preparing for a data analyst interview.

What an A/B test measures#

In an A/B test, visitors are randomly split between two versions of a page, email or offer. Version A is usually the current one, called the control. Version B is the change. A conversion is the action you want, such as a sign-up or a purchase.

You compare the conversion rate, conversions divided by visitors, of the two versions. The question is whether B's rate is really different, or whether the gap could easily be random noise from which visitors happened to land in each group.

The example below uses these counts, which are made up for illustration:

ABCD
1VersionVisitorsConversionsRate
2A4,0002005.0%
3B4,0002486.2%

Count visitors and conversions with COUNTIFS#

If your data is one row per visitor, COUNTIFS builds the summary table. With the version in column B and "Yes" or "No" in column C of a raw data sheet:

CellFormulaWhat it counts
B2=COUNTIFS(Data!B:B,"A")Visitors who saw A
C2=COUNTIFS(Data!B:B,"A",Data!C:C,"Yes")Visitors who saw A and converted
D2=C2/B2A's conversion rate

Fill down for B, changing "A" to "B", or put the version names in column A and use A2 instead of typing them. Format column D as a percentage. A is 5.0% (200 / 4,000) and B is 6.2% (248 / 4,000).

Count people, not page views. If one visitor can appear many times, remove the duplicates first. The COUNTIFS function guide and our article on COUNTIFS and SUMIFS cover the criteria, and COUNTIF as a percentage shows the same count-and-divide pattern.

Calculate the difference and the lift#

Report the gap two ways. The absolute difference is B's rate minus A's: 6.2% − 5.0% = 1.2 percentage points. The relative lift compares that gap with the control:

Excel formula
=(D3-D2)/D2

The result is 24%: B converted 24% more often than A. Lift is a percent change, so the percent change lesson and our guide to percentage formulas apply directly. Always say which you mean, because "up 1.2%" and "up 24%" describe the same result.

Test significance with a two-proportion z-test#

A two-proportion z-test asks how many standard errors apart the two rates are. Build it in four cells:

CellLabelFormulaResult
G2Pooled rate=(C2+C3)/(B2+B3)0.056
G3Standard error=SQRT(G2*(1-G2)*(1/B2+1/B3))0.00514
G4z=(D3-D2)/G32.33
G5p-value (two-sided)=2*(1-NORM.S.DIST(ABS(G4),TRUE))0.020
  • The pooled rate treats both groups as one, because the test starts by assuming A and B convert at the same rate.
  • The standard error is how much the gap between two rates would normally wobble by chance at these sample sizes. It uses the same idea as standard deviation.
  • z is the gap measured in standard errors. Here the 1.2-point gap is about 2.33 standard errors.
  • NORM.S.DIST with TRUE gives the area under the normal curve below z. 1- that, doubled, is the chance of a gap at least this large in either direction, if there were no real difference.

NORM.S.DIST needs Excel 2010 or later. The z-test relies on a normal approximation, so it works best with reasonably large groups. A common rule of thumb is at least 10 conversions and 10 non-conversions in each version.

The same answer with CHISQ.TEST#

You can also put the counts in a 2×2 table of converted and not converted (200 and 3,800 for A; 248 and 3,752 for B), build the expected counts (224 and 3,776 for each), and use =CHISQ.TEST(observed,expected). It returns the same 0.020, because for a 2×2 table the chi-square test and the two-sided z-test are equivalent. Our guide to the chi-square test in Excel shows how to build the expected table.

How to read the p-value#

The p-value is 0.020. That means: if A and B truly had the same conversion rate, a gap of 1.2 points or more would show up in only about 2% of tests this size. If you set 0.05 as your cut-off before the test, this result counts as statistically significant.

Be careful what you claim:

  • It is not a 98% chance that B is better. A p-value is about the data, assuming no real difference.
  • It does not say the lift is exactly 24%. A 95% confidence interval for the gap is roughly 0.2 to 2.2 percentage points, so the true improvement could be small. See confidence intervals in Excel for the method.
  • Significant isn't the same as important. Ask whether the gap is big enough to matter for the business.

Sample size changes everything. With the same rates but only 1,000 visitors per version (50 and 62 conversions), z falls to about 1.17 and the p-value rises to about 0.24. The gap looks identical, but there is too little data to tell it apart from chance.

Common A/B testing mistakes#

These mistakes make a result look more certain than it is:

  1. Stopping as soon as it looks significant. Checking every day and stopping at the first p below 0.05 raises the false-positive rate. Decide the sample size or test length in advance.
  2. Testing many metrics or versions. With 20 comparisons, about one may cross 0.05 by chance alone. Pick one main metric before you start.
  3. Uneven splits. If a 50/50 test ends at 4,000 against 3,500 visitors, check the setup before trusting the result.
  4. Counting sessions instead of people. Repeat visits break the assumption that each row is independent.
  5. Running too short a test. A few days may miss weekday and weekend differences.

A/B test questions are common in analyst interviews. The data analyst Excel test guide covers the other skills they check, and the data analyst mock test lets you try a timed version.

Practise it#

Try the exercise on this page to calculate a conversion rate from raw rows with COUNTIFS. Then practise COUNTIFS and SUMIFS in a live spreadsheet, and practise percent change so lift calculations become automatic. Each lesson checks your formula as soon as you press Enter.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Each row is one visitor, with the version they saw (B) and whether they converted (C). In F2, calculate the conversion rate for version B: conversions divided by visitors. Use COUNTIFS.

fx
ABCDEFG
1
Visitor
Version
Converted
2
V01
A
Yes
Rate B
3
V02
B
No
4
V03
A
No
5
V04
B
Yes
6
V05
A
No
7
V06
B
Yes
8
V07
A
No
9
V08
B
Yes
10
11
12

Tip: The top COUNTIFS needs two conditions (version B and Yes); the bottom one needs only version B.

Practise this in a lesson

LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.LessonPercentages and % changeCalculate percent change with (new - old) / old, format it as a percentage, and grow a number by a percent.Function guideCOUNTIFSCount rows that meet several conditions with COUNTIFS. Examples for text, number ranges and between-values, plus a live exercise.

Frequently asked questions

How do I calculate statistical significance for an A/B test in Excel?

+

Use a two-proportion z-test. Compute the pooled rate, the standard error =SQRT(p*(1-p)(1/n1+1/n2)), and z = (rate B - rate A) / standard error. The two-sided p-value is =2(1-NORM.S.DIST(ABS(z),TRUE)).

What p-value is significant for an A/B test?

+

Many teams use 0.05 as the cut-off, but it is a convention you choose before the test, not a rule. A p-value below your cut-off means the gap would be unlikely if both versions truly performed the same.

Can I use CHISQ.TEST for an A/B test in Excel?

+

Yes. Put the conversions and non-conversions for A and B in a 2 by 2 table, build the expected counts, and use =CHISQ.TEST(observed,expected). For a 2 by 2 table it gives the same p-value as the two-sided z-test.

How do I calculate lift in Excel?

+

Divide the difference in conversion rates by the control's rate: =(D3-D2)/D2. With 5.0% for A and 6.2% for B, the lift is 24%.

Does Excel have an A/B test function?

+

No single function does it all. You combine COUNTIFS for the counts, simple division for the rates, and SQRT with NORM.S.DIST, or CHISQ.TEST, for the p-value.

Sources

  • COUNTIFS function - Microsoft Support
  • SQRT function - Microsoft Support
  • Calculate percentages - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What an A/B test measures
  2. Count visitors and conversions with COUNTIFS
  3. Calculate the difference and the lift
  4. Test significance with a two-proportion z-test
  5. How to read the p-value
  6. Common A/B testing mistakes
  7. Practise it

Keep reading

Conditional math· 7 min read

COUNTIFS and SUMIFS: Multiple Conditions in Excel

COUNTIFS counts rows that meet several conditions, and SUMIFS adds numbers from those rows. Each condition is a pair: a range, then its criteria. A row counts only if it matches every pair. SUMIFS puts the sum range first: =SUMIFS(E2:E9,A2:A9,"North",C2:C9,"Laptop") totals North laptop revenue.

Math· 6 min read

Percentage Formula in Excel: 5 Everyday Calculations

There isn't one percentage formula in Excel; it depends on the question. A percent of a number is =B2*C2. What percent one number is of another is =B2/C2. Percent change is =(C2-B2)/B2. Increasing by a percent is =B2*(1+C2), and removing a percent added earlier is =B2/(1+C2). Format results with Ctrl+Shift+%.

Math· 7 min read

How to Calculate Standard Deviation in Excel

To calculate standard deviation in Excel, use =STDEV.S(B2:B7) when your data is a sample, or =STDEV.P(B2:B7) when it covers the whole group you care about. Standard deviation measures how far values typically sit from the average. A small result means the values are close together; a large one means they are spread out.

More on math

  • Absolute References and the $ Sign in Excel
  • Absolute Value in Excel: How the ABS Function Works
  • How to Run a One-Way ANOVA in Excel
  • AutoSum in Excel: The Alt+= Shortcut Explained
  • AVERAGE, MIN and MAX in Excel With Examples
  • How to Average Percentages in Excel Correctly
All math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free