Toolvito

Calculates on this device. File exports run online.

A/B Test Calculator

Enter the visitors and conversions of each variant to see the conversion rates, the uplift, the p-value and whether the difference is significant. The second mode plans how many visitors and days a test needs.

Enter your values

Enter the visitors and conversions of each variant. Add rows for an A/B/n test.

Your values

95% means a 5% chance of a false winner when there is no real difference.

Variants

The first row is the control. Visitors are the people (or sessions) who saw the variant; conversions are those who did the action.

More options

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

Full analysis and power curve

Task
Full analysis of the test result

Uses the variants of Is my test result significant? above: Fisher's exact test, a chi-square test of all variants, p-values adjusted for several comparisons, the Bayesian chance of each variant to be the best, a check of the visitor split and plots.

More options

Random draws from the posterior of each rate. More draws are steadier.

The same seed and counts always give the same Bayesian numbers.

The calculator above works on your device. When you run a task in this section, Toolvito receives the values and result you submit to make the file or run the check. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

How to check a test result

  1. Choose Is my test result significant?.
  2. Type the visitors and conversions of the control (A) and of the variant (B). Add rows for more variants.
  3. Choose the confidence level, usually 95%. Under More options you can make the test one-sided.
  4. Press Calculate. The result says whether B differs from A, by how much, and the Bayesian chance that B is better.

How to plan a test

  1. Choose How many visitors does my test need?.
  2. Type the conversion rate of the control today and the smallest change you want to detect.
  3. Type the visitors per day to also see how many days the test needs.

The formulas

  • z test of two proportions: z = (pB − pA) ÷ √(p̂(1 − p̂)(1/nA + 1/nB)), with the pooled rate p̂. The p-value comes from the normal distribution.
  • Interval of the difference: (pB − pA) ± z × √(pA(1 − pA)/nA + pB(1 − pB)/nB).
  • Several variants: each is compared with the control at α ÷ (k − 1) (Bonferroni), so the chance of a false winner stays at α.
  • Bayesian chance that B beats A: with flat Beta(1, 1) priors, worked out exactly (not by simulation).
  • Sample size per variant: n = [z_α √(2 p̄ q̄) + z_β √(p1 q1 + p2 q2)]² ÷ (p2 − p1)² (Fleiss, Levin and Paik).

Worked example

A: 10,000 visitors and 500 conversions (5.0%). B: 10,000 visitors and 570 conversions (5.7%). The uplift is 14%. The pooled rate is 5.35%, z = 2.20 and the two-sided p-value is 0.028, so the difference is significant at 95%. The 95% interval of the difference is 0.08 to 1.32 percentage points.

To detect a change from 10% to 12% (20% relative) with 95% confidence and 80% power, each variant needs 3,841 visitors.

Limits you should know

  • The tests assume that visitors are independent and were assigned at random. Check the sample ratio: very uneven visitor counts point to a problem in the set-up.
  • Do not stop a test the first time the p-value drops below the level: peeking makes false winners more likely. Decide the sample size first.
  • A significant result says the difference is unlikely to be chance alone; it does not say the change is worth making.

Related tools