Substitute (D^4 - d^4) for D^4 in your formula above and it will work.

D = outside Dia.
D = inside Dia.

I believe I got this from an old Steve Smith book. I just happen to keep that formula in a little notebook I always seem to have handy