Bending stresses in a flanged shape

The distance y from any parallel reference axis to the centroid can be calculated from:

where yi is the distance from the reference axis to the centroid of shape i and Ai is the area of shape i.