Sample size and power for non-inferiority or equivalence (TOST) trials
This calculator sizes non-inferiority trials (testing that a new treatment is not worse than control by more than a margin M) or equivalence trials (testing that a difference falls entirely within ±M, via two one-sided tests / TOST). For means it uses the exact noncentral t-distribution (Welch-type, unequal variances allowed); for proportions it uses a normal-approximation z-test on the risk difference. Assumes a higher value is better — if lower is better for your outcome, negate your difference/margin inputs accordingly.