If you can excavate the pipe ...
Published by T Walski
If you can excavate the pipe and insert a tap, you can use a pipe caliper to determine the inside diameter.
If you don't want to tap the pipe, you measure the circumference, divide by Pi and subtract 2x wall thickness.