What formula is used to calculate the drop off due to the curvature of the Earth?

I found this site that calculates the drop off of the earth at any given distance from an observer. Is this formula correct?

http://earthcurvature.com/

Yes, the formula is correct. For an angle $$a$$ in radians at the centre of the earth we have
$$d = r a \\ r - h = r \cos (a) \\ \displaystyle \Rightarrow h = r(1 - \cos (a)) = r\left(1 - \cos \left(\frac {d}{r}\right) \right)$$
For small values of $$a$$ we have $$\displaystyle \cos (a) \approx 1 - \frac {a^2}{2}$$, so $$\displaystyle h \approx \frac {d^2}{2r}$$.
If $$d$$ is measured in kilometres, this is approximately $$7.85 \times 10^{-5} \space d^2$$ km.