Now you're entering the world of confusion. lol.
It's not that straight forward with cast iron pipe. The internal diameter is around 4" for 4" pipe but it varies a little. There are different pressure classes as there are with steel and that alters the wall thickness a bit so not all 4" will be exactly 4" inside.
If you looked at 4" class C you will see that it is correct on the internal diameter. (4" exactly), after 12", Class B becomes exact on the internal diameter. It changes with size. Have a look at Wikipedia, there is some history and a chart.
Black iron pipe (steel), has different weights too. Red=Heavy, Blue=Medium, Yellow=Light etc.
This effects the bore slightly due to it being thicker walled but not the O.D.
Hope this helps!