ASME B31.3 Provides formula and guidelines for calculation of pipe under pressure. Though the formula is quite simple, finding correct values of individual factors can be tricky sometimes. This process pipe thickness calculator uses following formula for calculation of wall thickness.
304.1.2 (a) equation 3a :
Seamless Pipes : Design Thickness t = (PD)/2(SE+PY)
Welded Pipes : Design Thickness t = (PD)/2(SEW+PY)
For complete explanation, visit : http://www.pipingengineer.org/pipe-thickness-calculator/