A non-significant [two-sample t-test](/calculators/two-sample-t-test) does not tell you two averages are the same — only that you could not distinguish them. This calculator runs the test that does answer the question: two one-sided tests against a margin you nominate in advance, and the sample size that design actually needs.
The largest difference in means you are willing to call “the same”, in your own units. It is a judgement about what matters, not a statistic, it has to be fixed before the data, and the sample grows with the inverse square of it.
A magnitude. The test uses ±this.
What you expect the real gap to be. Power comes from the room between this and the margin rather than from the margin alone, so nudging this towards ±Δ makes the sample climb steeply — and assuming exact parity you do not believe in is how the study ends up too small.
Group 1 − group 2. 0 assumes exact parity.
How much individual values scatter within a group, in your own units. The sample scales with its square, so this and the margin together decide the answer: what the design really cares about is the margin measured in standard deviations.
Pooled, from historical data.
n₂ ÷ n₁ — how the sample is divided between the two groups. An even split (1) buys the most power per observation. A larger ratio puts more in the second group, which is worth doing when one arm is cheaper or riskier to fill, and needs a bigger total for the same power.
n₂ ÷ n₁. 1 is an even split.
Each of the two one-sided tests runs at this level, which is why the interval beside the result is the (1 − 2α) one — 90% at α = 0.05, not 95%. That is not a slip: needing both one-sided tests to reject already holds the pair to an overall error rate of α.
Each one-sided test runs at α.
The chance the test finds the effect if the effect is really there. At 0.80 you miss a real one in one study out of five; 0.90 is the usual choice when a miss is the expensive outcome, and costs roughly a third more data. Power is a property of the design — it cannot be recovered after the data is in.
Required sample size for equivalence
Per group
975
Group 2
975
Total
1,950
Achieved powerAt the whole-number sample above.
90.0%
Margin as Cohen's dΔ ÷ σ.
0.167
Assumed true difference
0.2000
Collect 1,950 observations in total and both one-sided tests will reject 90.0% of the time — that is, the study will succeed in showing the two means differ by less than 1.00 — provided the real gap is about the 0.200 you assumed. What buys that power is the room between the assumed gap and the margin, not the margin on its own: nudge the assumed difference towards ±1.00 and the sample climbs steeply.
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
Power
Sample size
0.0%
2
0.0%
162
33.1%
322
59.2%
482
74.5%
642
83.8%
802
89.6%
962
93.4%
1,122
95.8%
1,282
97.3%
1,442
98.3%
1,602
99.0%
1,762
99.4%
1,922
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 margin
Required sample per group
0.300
61,661
0.762
1,959
1.22
606
1.68
298
2.15
179
2.61
120
3.07
86
3.53
65
3.99
51
4.45
41
How many independent observations the first group's summary came from. Equivalence needs more data than a difference test on the same margin, so this is usually the number that decides whether the question can be answered at all.
The same count for the second group. Unequal sizes are fine; the interval is dominated by the smaller arm, which is where more data buys the most narrowing.
The first group's observed average, in the same units as the margin. Mixing units between the two — seconds here, milliseconds in the margin — is the error that makes a failed test look passed.
The second group's observed average. The difference reported below is group 1 minus group 2, and the ±Δ test is symmetric, so which is which affects only the sign you read.
The first group's sample standard deviation — the spread of individual values, not the standard error of the mean. Multiply a standard error by √n if that is all you have.
The second group's sample standard deviation. If it came in well above the figure you designed against, the interval will be wider than planned and equivalence may fail for a reason that has nothing to do with the means.
The margin fixed before the data, in your own units. Widening it after seeing the interval turns the test into a formality — which is why this number, not the p-value, is the one to record first.
The one you agreed before the data landed.
Each of the two one-sided tests runs at this level, which is why the interval beside the result is the (1 − 2α) one — 90% at α = 0.05, not 95%. That is not a slip: needing both one-sided tests to reject already holds the pair to an overall error rate of α.
Each one-sided test runs at α.
Welch does not assume the two groups have the same spread, and costs almost nothing when they do — which is why it is the default here and in R. Student's pooled version is marginally more powerful under equal variances and is misleading when they differ, badly so if the groups are also unequal in size.
Welch unless you have a reason.
Equivalence (TOST) result
TOST p-valueThe weaker of the two one-sided tests.
0.0019
Equivalent at ±1.00
Yes
90% interval (1 − 2α)The interval that matches this test.
[-0.255, 0.655]
Difference in means
0.2000
p, against the lower margin
< 0.0001
p, against the upper margin
0.0019
t, lower
4.3429
t, upper
-2.8953
Standard error
0.2763
Degrees of freedom
1945.91
The 90% interval runs from -0.255 to 0.655, and both ends sit inside ±1.00, so the two means are equivalent at the margin you set (TOST p 0.0019). That is a claim about this margin and no other — it does not say the means are identical, and someone who would have chosen a tighter margin has not been given an answer.
The interval shown is the 90% one (1 − 2α), which is the interval that matches this test: equivalence holds exactly when it sits inside ±1.000. Reading a 95% interval against the margin at α = 0.05 is the usual way this gets reported wrong.
Drag either dashed line — or focus it and use the arrow keys — to change equivalence margin.
Show these numbers as a table
The interval on the difference, against the equivalence margins
Difference in means
Estimate
Interval
Difference in means
0.200
-0.255 to 0.655
When to use it
Use an equivalence test when the conclusion you want is "these two are interchangeable" rather than "these two differ". A cheaper vendor whose handling time must not change, a refactor that should leave average basket value where it was, a shorter survey that should recover the same mean score — the decision is to swap one thing for another, and the evidence you need is that the difference is too small to care about.
That is not the question a significance test asks. Failing to reject is a statement about the power of your study, not about the world: run a two-sample t-test on twelve observations per arm and you will fail to reject almost anything. Treating p > 0.05 as proof of sameness is the most common inferential error in product analytics, and the sloppier the experiment the likelier it becomes. We work the logic through in when being good enough is enough.
Choose this page when a difference in either direction would concern you. If only one direction matters, use non-inferiority for two means — cheaper, and the honest description of most "can we ship the cheaper thing?" decisions. If the outcome is a rate, go to equivalence for two proportions. If the same units are measured twice, the pairing belongs in the analysis: start from the paired t-test and apply the margin to the mean of the differences.
Assumptions
TOST inherits every assumption of the t-test it is built from, and adds one of its own that is not statistical at all:
The margin is set before you see the data. A margin chosen after looking at the observed difference is not a hypothesis test but a description of the data with a p-value attached. Write it into the plan alongside the metric and the stopping rule.
The margin is a business decision. It is the largest difference you would accept in exchange for whatever the change buys, and that answer comes from finance or product rather than from a formula. Half a standard deviation is not a margin; "eighteen cents per session" is.
Independence, within and between groups — unchanged from the two-sample t-test. Clustering shrinks the standard error, which in an equivalence test means falsely concluding equivalence. The error runs opposite to the direction people check for.
Approximate normality of the two sample means, which the Central Limit Theorem covers at a few hundred observations per arm. Heavy tails remain a real problem — see what to do when data is not normally distributed. Welch's standard error is the default here, so unequal variances are already handled.
How the calculation works
Two one-sided tests, each run at the full α. The first asks whether the difference is comfortably above the lower margin, the second whether it is below the upper one; equivalence is concluded only when both reject, and the p-value we report is the larger of the two. Because both tests are one-sided at α, the interval that agrees with the procedure is the (1 − 2α) interval — 90% at α = 0.05, not the 95% you would quote beside [an ordinary t-test](/calculators/two-sample-t-test) — and equivalence holds exactly when it lies inside ±Δ.
The two one-sided tests
t₁ = (d − (−Δ)) / SE, t₂ = (Δ − d) / SE
d is the observed difference and ±Δ the margin. Both go against t₁₋α,df in the upper tail; equivalence needs both to reject.
Reported p-value
p = max(p₁, p₂)
The maximum, not the minimum. The rejection region is an intersection rather than a union, so running both tests at α leaves the overall error rate at α.
Standard error (Welch)
SE = √(s₁²/n₁ + s₂²/n₂)
Same denominator and Welch–Satterthwaite degrees of freedom as the ordinary test. The equivalence framing changes nothing about how the difference is estimated.
The agreeing interval
d ± t₁₋α,df · SE (a 1 − 2α interval)
At α = 0.05, a 90% interval. Printing a 95% one beside a TOST result is a classic error — in a band of borderline results the p-value says equivalent while the interval appears not to.
Sample size, assuming no true difference
n = 2σ²(z₁₋α + z₁₋β/₂)² / Δ²
The z₁₋β/₂ is not a typo. Both tests must reject, so the power requirement splits across two tails — precisely the step the "two-sided power at the margin" shortcut skips.
Sample size, with an assumed true difference
n = 2σ²(z₁₋α + z₁₋β)² / (Δ − |d₀|)²
d₀ is the difference you actually expect. Power collapses as d₀ approaches the margin, so a design assuming perfect equality quotes its best case — and calculators with no d₀ field overstate power for that reason.
Worked example
You are moving support tickets from one outsourced vendor to another. The new contract is cheaper, and the only thing that must not change is how long a ticket takes to close: within a minute of the current average is operationally invisible, beyond that customers notice. Handling time historically averages 21 minutes with a standard deviation of 6. You plan against a true gap of 0.2 minutes rather than assuming the vendors are identical.
Significance level (α)
0.05, each one-sided test
Power (1 − β)
0.90
Equivalence margin (±Δ)
±1.0 minute
Assumed true difference (d₀)
0.2 minutes
Standard deviation (σ)
6.0 minutes
Allocation ratio
1:1
975 tickets per vendor, 1,950 in total. Had you assumed the two vendors were exactly identical, the same design would have asked for 780 per arm.
Two things there are worth carrying away. A 0.2-minute assumed gap — a fifth of the margin — added a quarter to the sample, because equivalence power depends on the room between the true difference and the margin, not on the margin alone. And the margin has enormous leverage: tighten it to ±0.5 minutes at the same assumed gap and the requirement rises to roughly 6,850 per arm. For comparison, a conventional test powered to detect a one-minute difference would need 758. Proving sameness costs more than finding a difference of the same size.
Interpreting the output
Read the reported p-value as the weaker of two claims. Below α, both one-sided tests rejected and the data is consistent with a difference small enough to ignore — at the margin you nominated, and only at that margin. Someone who thinks half your margin is the real threshold has not been given an answer, so put the margin in the headline rather than a footnote.
Then read the 90% interval, because it says more. Entirely inside ±Δ, you have equivalence. Straddling a margin, you do not, and the interval shows which end is the problem and by how far. Wider than the margins on both sides, and the study was simply too small. A result can be both non-significant against zero and non-equivalent, which is what an underpowered study looks like from the inside.
The reverse combination catches people out too: a difference can be significant and equivalent at once. With a large enough sample, two seconds of handling time will have p < 0.001 against zero and still sit well inside a one-minute margin. That is the point — significance asks "distinguishable from zero?", equivalence asks "small enough to ignore?". Report both, as in how to properly report A/B test results.
Finally, equivalence is a claim about the average, not the distribution. Two vendors can share a mean handling time while one has a tail of three-hour tickets that generates every complaint you get. If the tail is what matters, test the tail — a quantile, or the proportion breaching a threshold via equivalence for two proportions. Pressure-testing a margin before it enters a test plan is what our causal inference work is for.
Frequently asked questions
Why can't I just say a non-significant t-test proves no difference?
Because absence of evidence is not evidence of absence, and the smaller your study the easier it is to produce. A t-test with 30 observations per arm fails to reject almost any difference you care about; the p-value above 0.05 is telling you about your sample size, not about the two groups. An equivalence test inverts the burden of proof: the null hypothesis is that the difference is at least as large as the margin, and you have to gather enough evidence to reject it. That is the only way round that lets a positive result mean what you want it to mean.
How do I choose the equivalence margin?
Ask what difference would change the decision. If the new vendor is 15% cheaper, how much slower could they be before the saving is not worth it? That number, converted into the units of your metric, is the margin. Common shortcuts are worse than they look: half a standard deviation is a statistical convention with no business content, and a fixed 5% relative margin will be far too loose on some metrics and unattainable on others. Whatever you choose, choose it in writing before the data lands, because a margin picked afterwards can always be made to give the answer you were hoping for.
Should I report a 90% or a 95% confidence interval with a TOST?
90%, when alpha is 0.05. The TOST procedure is two one-sided tests each run at 5%, and the interval that agrees with it is the 1 minus 2 alpha interval, so equivalence holds exactly when the 90% interval falls inside the margins. Printing a 95% interval beside a TOST p-value creates a visible contradiction in a band of borderline results, where the p-value declares equivalence and the wider interval appears to overlap a margin. Both numbers are correct; they are simply answering questions at different confidence levels, and only one of them matches the test you ran.
My other calculator gives a much smaller sample size. Which is right?
Check whether it is computing the power of a two-sided test to detect a difference equal to the margin. That shortcut is common and it overstates power, because it ignores the requirement that both one-sided tests reject and it implicitly assumes the true difference is exactly zero. The gap is widest at high power and when you expect any real difference at all. If a tool has no field for the difference you actually expect, it is almost certainly using the shortcut.
Do the two groups need equal variances?
No. The standard error here is Welch's, which allows the two groups to have different spreads at a cost of a fraction of a degree of freedom. That matters more in equivalence work than in ordinary testing, because the point of many equivalence studies is to compare two genuinely different systems — an old vendor and a new one, a heavyweight model and a cheap one — and there is no reason for two different systems to produce identically variable outcomes.
Can I test one group against a fixed benchmark instead of another group?
Yes, and it is cheaper: with a known target value there is only one source of sampling error rather than two, so the required sample is roughly halved. The procedure is the same — two one-sided tests of the sample mean against the benchmark plus and minus the margin — but be careful that the benchmark really is known rather than estimated from a previous period. A historical average carries its own uncertainty, and treating it as fixed will make your interval too narrow and your equivalence claim too confident.
We help teams write down the margin that makes a swap acceptable before the test runs, so the result is a decision rather than an argument. 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.