Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

A/B test calculator

Check whether version B really beats A with a z-test, p-value and confidence interval, and plan how many visitors an A/B test needs before you start.

How to use it

  1. Before the test: open Plan the sample size, type your current conversion rate and the smallest improvement worth finding. You get how many visitors each version needs and how many days that takes.
  2. After the test: type the visitors and conversions of A and B. You get both rates, the difference, the p-value, a confidence interval and a plain verdict.
  3. Decide the sample size first and stop when you reach it. Checking every day and stopping at the first good-looking result gives false winners.

Keyboard

TabMove between the boxes and tabs
EnterCheck or work it out

Tips

  • The p-value is the chance of seeing a difference at least this big if A and B were really the same. It is not the chance that B is better.
  • Small changes need big samples: halving the change you want to detect needs about four times as many visitors.
  • If the confidence interval crosses zero, the data still fit "no difference".
  • The traffic split check warns when a 50/50 test got very uneven visitor counts: that usually means a set-up problem, and the result cannot be trusted.
  • Run whole weeks: people buy differently on weekends.

About this calculator

The result check uses the standard two-proportion z-test with a pooled rate, the most common test for conversion rates, and a confidence interval for the difference from the unpooled standard error. The chance that B beats A is an approximation: each version's rate is treated as a Beta distribution from its counts and the two are compared with a normal approximation. The sample size uses the usual formula for comparing two proportions at a chosen significance and power. The normal distribution and its inverse are computed to about 15 digits (Hart's and Acklam's methods). The tests compare every number with Python's own statistics module (NormalDist) in a separately written version. Everything runs in your browser; your numbers never leave it.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product