The standard to calculate the MAWP would be ANSI B31.3 using a threading allowance
ANSI B2.1 is the standard for threaded pipe that gives thread depths. You may be able to get a copy of the relevant dimensions from a piping stockist. My chart shows the maximum depth of thread for a 2" would be 1.767mm.
Also, generally you go you a schedule when you are threading pipe
Other factors that need to be considered would be operating temperature and materials of construction.