You tried two versions of the same offer. A got 250 clicks from 5,000 people. B got 300. Your client wants B everywhere by Friday. But is B better, or did it get lucky? This calculator checks, and it also tells you how many people a test needs before you start.
How to use the AB test calculator
- On Results, type the visitors and conversions for A (your control) and B (your new version). A conversion is whatever you count as a win: a click, a sign-up, a sale.
- Pick your confidence. 95% is the usual choice. Leave Test on two-sided unless you decided before the test that only "B is better" matters.
- Read the plain sentence at the top, then the numbers under it.
- Have daily numbers in a spreadsheet? Open Add up daily numbers, paste the rows or open a CSV file, and the four boxes fill themselves.
- Selling something? Open Revenue. Type visitors, the average money per visitor and its spread for each version.
- Before you start a test, open Sample size. Type your current rate and the smallest lift worth finding. You get the visitors needed in each version, and the days to run if you add your daily traffic.
- Copy the result gives one line for Slack or a report. Copy link opens the same numbers for a teammate.
Why a bigger number is not a winner
Flip a fair coin 20 times. You will often get 12 heads, not 10. Nothing is wrong with the coin. Small samples are noisy, and so are visitors. Two identical pages will not get exactly the same number of sign-ups.
So the question is not "which number is higher?" The question is "how often would two identical pages show a gap this big by luck?" That chance is the p-value. If it is below 5%, most people call the result real. That is what 95% confidence means.
The three mistakes that fake a winner
Stopping early. You check the test each morning and stop the first time B looks ahead. A test that you watch like this will crown a winner far more often than 5% of the time, even when both pages are the same. Pick the number of visitors first. Stop when you reach it.
Too few conversions. With 3 sign-ups against 6, one lucky day swings the result. The calculator warns you when a version has under 10 conversions.
Testing many things. Try ten ideas and one will look good by luck. This tool compares two versions on one number. It does not correct for many tests.
What this calculator does and does not do
For conversions it runs a two-proportion z-test. The p-value comes from the combined rate of both versions. The likely range for the gap uses each version's own rate. There is no continuity correction, so another calculator may differ by a small amount.
Chance B beats A is a second view. It starts with no opinion about either rate and updates with your counts. It answers a different question than the p-value, so read it as a guide, not as a pass mark.
For revenue it runs a Welch t-test on the average per visitor. You need the spread (standard deviation) of money per visitor. A spreadsheet's STDEV function gives it. Revenue is lumpy, so a few big orders can move the answer.
For sample size it uses the standard formula for two rates. Pick a lift you would care about. A smaller lift needs many more visitors. With a 5% rate and a 10% relative lift (5% to 5.5%), you need about 31,000 visitors in each version at 95% confidence and 80% power. For a lift from 5% to 6%, about 8,150.
It assumes visitors were split at random, each person saw one version, and you counted conversions once per person. It cannot fix a test that broke these rules. Everything runs in your browser. Nothing you type is sent anywhere.
What this means for Instagram, TikTok, LinkedIn, YouTube, Pinterest, X and Facebook
For a normal post you post each version yourself. Two posts reach different people at different times, so one post going ahead is only a hint. To use this tool, treat "people who saw it" as visitors and "clicks" (or saves, or sign-ups) as conversions. Test one thing at a time, such as the first line of the caption or the cover.
Paid ads are cleaner. Meta's Ads Manager has an A/B test tool for Facebook and Instagram ads, and Meta advises against switching ad sets on and off by hand to compare them. Paste its visitor and result counts here to check the gap yourself.
On YouTube, Studio can test up to three titles or thumbnails on one long video. It picks the winner by watch time, not clicks, and it works on a computer, not on Shorts. That is a different measure than the one here, so use this page for clicks you count yourself.
FAQ
How many visitors does an AB test need?
It depends on your current rate and the smallest lift you care about. At a 5% rate, finding a lift to 5.5% takes about 31,000 visitors in each version, and finding a lift to 6% takes about 8,150. Use the Sample size tab for your own numbers.
What does 95% confidence mean?
If both versions were the same, you would see a gap this big less than 5% of the time. It does not mean there is a 95% chance that B is better. The Chance B beats A number is the one that answers that question.
Should I use a one-sided or a two-sided test?
Use two-sided unless you decided before the test that only "B is better" matters. A one-sided test needs fewer visitors, but it cannot call B a loser. Choosing it after you saw the data is cheating.
My test is not significant. Should I keep it running?
Only if you planned to run longer. Adding visitors after a result looks close makes false wins more likely. If you reached your planned number, call it a tie, keep A, and test a bolder change.
What if one version got zero conversions?
The test still works. The relative lift shows "None", because you cannot divide by zero. With so few conversions, treat the result as rough and collect more.
Does this work for revenue or average order value?
Yes, on the Revenue tab. Type visitors, the average per visitor and the spread for each version. It runs a Welch t-test, which handles different spreads and sizes.