Bell Statistics

Equivalence test calculator: two proportions

Two conversion rates and a claim that they are close enough to treat as the same. This calculator sizes that study and then runs it: two one-sided tests against a margin in percentage points, the p-value that is the larger of the two, and the 90% interval that has to fall inside the margins for the claim to hold.

Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

Calculator

A proportion, so 0.128 is 12.8%.

0.01 is one percentage point.

p₁ − p₂. 0 assumes exact parity.

n₂ ÷ n₁. 1 is an even split.

Each one-sided test runs at α.

Required sample size for equivalence
Per group19,118
Group 219,118
Total38,236
Achieved powerAt the whole-number sample above.80.0%
Assumed rate, group 112.80%
Assumed rate, group 212.80%
Assumed true differencep₁ − p₂ as a share of the reference rate.0.0%

You need 38,236 observations in total — 19,118 in each arm at this split — for both one-sided tests to reject 80.0% of the time, and so to conclude the two rates differ by less than 0.0100 (1.00% in absolute terms). That is far more than an ordinary A/B test on the same base rate would ask for, because the margin is usually much smaller than the lift such a test is powered to find, and the requirement grows with the inverse square of it: halve the margin and the traffic roughly quadruples.

Sample size per group against statistical powerReaching 0.0% power takes 1 per group and 98.7% takes 37,962; the 80.0% target is met at 19,118.5,00010,00015,00020,00025,00030,00035,0000%25%50%75%100%PowerSample size — per group80.0% → 19,118

Drag the dashed line — or focus it and use the arrow keys — to change the target power and resize the study.

Show these numbers as a table
Power at each sample size per group
PowerSample size
0.0%1
0.0%3,191
3.7%6,381
33.0%9,571
54.4%12,761
69.6%15,951
80.1%19,141
87.1%22,331
91.7%25,521
94.8%28,711
96.7%31,901
98.0%35,091
Required sample per group against equivalence marginDetecting 0.64% takes 46,673 and 7.68% takes 325. At the 1.00% currently entered it is 19,118 — the requirement falls roughly as the square of the effect.1,00010,0001.00%2.00%3.00%4.00%5.00%6.00%7.00%Equivalence marginRequired sample per group (log scale)1.00% → 19,118

Drag the dashed line — or focus it and use the arrow keys — to change equivalence margin.

Show these numbers as a table
Required sample per group against equivalence margin
Equivalence marginRequired sample per group
0.64%46,673
1.36%10,305
2.08%4,402
2.81%2,428
3.53%1,536
4.25%1,059
4.97%774
5.69%590
6.42%465
7.14%376

When to use it

Reach for this when a rate has to stay put. You are migrating to a new payment provider and checkout conversion must not move; you are replacing a bloated consent banner and the opt-in rate must hold; you are cutting a step out of signup and day-7 activation must survive it. Shipping is the default, and the experiment exists to rule out damage in either direction larger than a number of percentage points you can name.

A standard A/B test cannot deliver that. Its machinery is built to detect a difference, and its failure mode — p above 0.05 — is silent about whether the rates are close or the test was too small. Migration tests are where this bites: they tend to be run late, in a hurry, on a fraction of traffic, and then read as a clean bill of health. We make the same argument from the other side in common testing mistakes and how to fix them.

Use this page when both directions matter. When only the downside does, use non-inferiority for two proportions, which spends its whole error budget on the side you care about. For a continuous outcome such as revenue per session, use equivalence for two means. If the same users saw both variants, the counts are paired and belong in McNemar's test. And if you only need to know how precisely one rate has been measured, a proportion confidence interval is simpler.

Assumptions

The arithmetic is a normal approximation to a difference of two binomials, so the usual proportion caveats apply — plus two that are specific to margins:

  • The margin is fixed in advance and it is a commercial number. "Conversion must not move by more than a percentage point" is a statement about revenue at risk, not about statistics. Setting it after seeing a difference of 0.4 points guarantees the test passes and means nothing.
  • Absolute or relative, chosen deliberately. One percentage point is generous on a 40% rate and unattainable on a 0.8% one. Pick the framing the business uses and keep the whole plan in those units; switching between design and readout concludes equivalence against a margin nobody agreed to.
  • Independent observations, one per randomised unit. Sessions are not independent when the same person returns, and the understated standard error pushes an equivalence test towards concluding equivalence — not the conservative direction people assume. Randomization: the ABCs of A/B testing covers why the unit has to be chosen once.
  • Enough events, not just enough users. The normal approximation wants roughly ten successes and ten failures per arm as a floor. With genuinely rare events, Fisher's exact test is the more honest starting point.
  • No sample ratio mismatch. A broken split invalidates an equivalence claim as thoroughly as a superiority claim, and it is easy to miss when nobody is hunting for a winner — see sample ratio mismatch.

How the calculation works

Both tabs work on the absolute difference in rates, d = p̂₁ − p̂₂, and its unpooled standard error. Unpooled is deliberate: the pooled estimator used by a standard two-proportion test assumes the rates are equal under the null, and here the null is that they differ by exactly the margin. Equivalence is concluded when both one-sided tests reject at α, and we report the larger p-value alongside the (1 − 2α) interval — 90% when α = 0.05 — the interval that agrees with the procedure.

Difference and standard error
d = p̂₁ − p̂₂, SE = √(p̂₁(1−p̂₁)/n₁ + p̂₂(1−p̂₂)/n₂)

Each arm contributes its own variance. No pooling, because the hypothesis under test is a non-zero difference.

The two one-sided tests
z₁ = (d + Δ) / SE, z₂ = (Δ − d) / SE

z₁ asks whether the difference clears the lower margin, z₂ whether it stays below the upper one. Both are upper-tail tests at the full α.

Reported p-value
p = max(p₁, p₂), equivalent when p < α

Taking the maximum keeps the overall type I error at α without correction: to declare equivalence you must clear both hurdles, so the harder one governs.

The agreeing interval
d ± z₁₋α · SE (90% at α = 0.05)

Equivalence holds exactly when this lies inside (−Δ, +Δ). The 95% interval you would report beside an ordinary A/B result is the wrong one here and will occasionally appear to contradict the p-value.

Sample size per arm, true difference zero
n = (z₁₋α + z₁₋β/₂)² · [p₁(1−p₁) + p₂(1−p₂)] / Δ²

The half-beta again: power must be delivered against both tests. Substituting z₁₋β — as though only one had to reject — understates the sample by about a fifth at 90% power and more than a quarter at 80%.

Sample size with an assumed gap
n = (z₁₋α + z₁₋β)² · [p₁(1−p₁) + p₂(1−p₂)] / (Δ − |d₀|)²

Set d₀ to the shortfall you genuinely expect. The distance enters squared, so even a small expected gap moves the answer sharply, and power tends to zero as d₀ approaches the margin.

Worked example

You have moved checkout to a new payment provider behind a 50/50 split and want to confirm conversion has not shifted by more than a percentage point either way — the threshold at which the integration saving stops covering lost revenue. The margin went into the plan a fortnight before launch. After a week you have 4,000 sessions per arm: 512 conversions on the incumbent, 498 on the new provider.

Group 1 — new provider
4,000 sessions, 498 conversions (12.45%)
Group 2 — incumbent provider
4,000 sessions, 512 conversions (12.80%)
Equivalence margin (±Δ)
±1.00 percentage point
Significance level (α)
0.05, each one-sided test
Reported difference
Group 1 − group 2

Difference −0.35pp, standard error 0.74pp. The lower one-sided test gives p = 0.19 and the upper gives p = 0.03, so the reported TOST p-value is 0.19 and equivalence is not established. The 90% interval is [−1.57pp, +0.87pp], which crosses the lower margin.

Now run the ordinary comparison on the same numbers: z = −0.47, p = 0.64. Nothing remotely significant, and in most organisations that is where the migration gets signed off as "no impact". The equivalence test says something different — a drop of a full percentage point has not been ruled out, and the interval reaches to −1.57pp, well inside the range that would have made the migration a bad trade. Neither test found a difference; only one was capable of finding sameness. The fix is sample size: this margin around a 12.8% base rate needs roughly 19,000 sessions per arm for 80% power, nearly five times what a week bought you.

Interpreting the output

A TOST p-value below α licenses one sentence: the difference in rates is smaller than the margin, at the confidence level you chose. It does not say the rates are identical, it does not transfer to a tighter margin someone else has in mind, and it does not survive being quoted without the margin attached.

The 90% interval is the better thing to circulate, because it degrades gracefully. Inside both margins, equivalence. Crossing one, not equivalent — and you can see whether you are a tenth of a point short or a mile away. Wider than the margins on both sides, and the study never had a chance, which is the usual outcome of a migration test run on a week of traffic.

Watch the two combinations that look paradoxical and are not. A result can be non-significant and non-equivalent at once, as the worked example shows; that pairing is the signature of insufficient data. It can also be significant and equivalent — with a few million sessions a 0.05pp difference has a tiny p-value and still sits deep inside a one-point margin. Reporting both tests and the margin together stops either being misread, as in reporting A/B results properly.

One caution specific to rates: equivalence on an overall conversion rate can conceal a real change in a segment that matters. If mobile fell a point and desktop rose a point, the aggregate is beautifully equivalent and something is wrong. Pre-register the two or three cuts you would act on, accept that testing several costs you multiple comparisons, and treat the rest as exploratory. Where the segments are the question, our causal inference practice can help.

Frequently asked questions

Should the margin be in percentage points or as a relative percentage?
Use whichever unit the business decision is actually made in, and then stay in it. Absolute margins in percentage points are easier to reason about and are what most product teams mean when they say conversion must not move by more than a point, but they behave very differently across base rates: one point off a 40% rate is a 2.5% relative loss, while one point off a 1.5% rate is catastrophic. Relative margins travel better across metrics but hide the absolute revenue at stake. The mistake to avoid is agreeing a relative margin in the plan and then reading the result against an absolute one.
Why does the sample size come out so much larger than for a normal A/B test?
Two reasons compound. First, equivalence requires both one-sided tests to reject, so the power requirement is split across two tails and the multiplier grows. Second, and more importantly, the margin is usually far smaller than the effect an A/B test is powered to find. Teams happily power a test to detect a 5% relative lift and then ask for equivalence within 1 percentage point on a 12% base rate, which is a far finer distinction. Sample size scales with the inverse square of that distance, so halving the margin roughly quadruples the traffic you need.
Why is the standard error unpooled here when my A/B test pools it?
Pooling is justified when the null hypothesis says the two rates are equal, because then a single combined estimate is the best guess at the common rate. In an equivalence test the null says the difference equals the margin, so the two rates are not equal under the hypothesis being tested and pooling them estimates a quantity the null does not claim exists. The unpooled standard error is the standard choice for both equivalence and non-inferiority testing on proportions. The numerical difference is small in practice; the conceptual one is total.
Can I stop early once the interval fits inside the margins?
Not without planning for it. Repeatedly checking whether the interval has narrowed enough inflates the false-equivalence rate in exactly the way repeated peeking inflates false positives in a superiority test, and the inflation is worse than most people expect because the interval only ever shrinks. If you need interim looks, use a group-sequential design with spending boundaries set in advance, or fix the sample size and wait. Peeking without a correction turns a rigorous procedure into an expensive way of confirming what you hoped.
My conversion rate is under 1%. Does this still work?
The formulas still work but the sample sizes become brutal, and the normal approximation starts to drift once the expected number of conversions per arm falls into the low dozens. At very low rates an absolute margin is almost always the wrong framing: a margin of half a percentage point on a 0.6% rate permits the rate to fall by more than 80%. Switch to a relative margin, expect the required traffic to run into the hundreds of thousands, and consider whether a longer window or a coarser upstream metric would answer the business question with data you can actually collect.

Related calculators

  • Equivalence: two means

    Show two averages are close enough to be interchangeable — set the margin, size the study, run both one-sided tests.

  • A/B test sample size

    Size a two-proportion experiment before you launch, then read the lift and its interval once it lands.

  • Non-inferiority: two means

    Show an average is not meaningfully worse — one margin, one direction, one-sided p-value and confidence bound.

  • Non-inferiority: two proportions

    Show a rate has not dropped by more than you can afford — margin, direction, sample size and confidence bound.

Terms on this page

  • Guardrail metric

    A metric that can veto a launch but never justify one, and why that asymmetry is the whole point.

  • Null hypothesis

    The assumption every test argues against, and the reason you can never prove two things are the same.

Talk to the people who build these for a living

Migrations and re-platformings are where "no significant difference" does the most damage. We size them so the reassurance is real. Causal Inference Analysis

References

  • Schuirmann, D. J. (1987). A comparison of the two one-sided tests procedure and the power approach for assessing the equivalence of average bioavailability. Journal of Pharmacokinetics and Biopharmaceutics, 15(6), 657-680.
  • Wellek, S. (2010). Testing Statistical Hypotheses of Equivalence and Noninferiority (2nd ed.). Chapman & Hall/CRC.
  • Chow, S.-C., Shao, J., Wang, H., & Lokhnygina, Y. (2018). Sample Size Calculations in Clinical Research (3rd ed.). Chapman & Hall/CRC.