The unpaired $t$-test is commonly used to reject the null hypothesis that two sample means are equal.
However, suppose one wants to prove that the sample means are no different than some given maximal difference, i.e. we want to reject the hypothesis $|\mu_1-\mu_2|>y\%$. Moreover, suppose we have an a priori estimate of the pooled sample variance $\sigma^2$.
How can one calculate the minimal sample size needed $n$ so that we can reject this hypothesis with a given power?