Overall depth h = h_w + t_f. The centroid y̅ is measured downwards from the top of the flange.
While paused, moving a slider updates the results immediately.
Left: T-section (red = elastic neutral axis y̅, yellow = plastic neutral axis PNA, cyan/blue dots = centroids of flange and web with parallel-axis distances d). Right: the bending stress distribution σ = M·y / I pulses in real time as the bending moment M rises and falls.
A T-section is an asymmetric section made of a flange b_f × t_f and a web t_w × h_w. Its centroid and section properties are found as follows.
Total area and centroid y̅ (distance from the top of the flange):
$$A = b_f t_f + t_w h_w,\qquad \bar{y} = \frac{b_f t_f \cdot \tfrac{t_f}{2} + t_w h_w \cdot (t_f + \tfrac{h_w}{2})}{A}$$Second moment of area I by the parallel-axis theorem:
$$I = \frac{b_f t_f^3}{12} + b_f t_f\!\left(\bar{y}-\tfrac{t_f}{2}\right)^2 + \frac{t_w h_w^3}{12} + t_w h_w\!\left(t_f + \tfrac{h_w}{2} - \bar{y}\right)^2$$Section moduli (top and bottom) and shape factor f:
$$S_\text{top} = \frac{I}{\bar{y}},\quad S_\text{bot} = \frac{I}{h - \bar{y}},\quad f = \frac{Z_p}{S_\text{min}}$$The plastic neutral axis PNA is the position that divides the area into A/2 above and below; the plastic section modulus is Z_p = (A/2)(d_t + d_b), where d_t and d_b are the distances of the upper and lower centroids from the PNA.