If you could place the centroid of an object exactly on the point of a pencil, the object would stay balanced. This is because the centroid lies at the center of mass. Engineers often use this property when designing buildings and roads. Knowing the centroids of various building beams helps the builders calculate how much stress each beam will take. For a Tbeam, you only need to calculate the vertical centroid. Because a Tbeam is symmetrical about the yaxis, the horizontal centroid lies along the yaxis that passes through the center of the beam.
Cross Your T

Calculate the area of the Tbeam. Multiply the width by the length for each section of the T. Record the areas of each section for use in later calculations. Add the areas together to get the total area. For example, if the T is 10 inches tall and 2 inches wide, multiply to get 20 square inches. If the top bar is 8 inches long and 2 inches thick, multiply to get 16 square inches. Add the areas together for a total area of 36 square inches.

Divide the width of the top bar by two and add this number to the height of the T to find the height of the center of the bar. If the width is 2 inches and the height is 10 inches, 2 inches divide by 2 plus 10 inches equals 11 inches. Multiply the height by the area of the top bar to find its moment of inertia. If the area is 16 square inches, 11 inches times 16 square inches equals 176 cubic inches.

Divide the width of the vertical bar of the T by two. If the width is 2 inches, divide by 2 to get 1 inch. Multiply the width by the area of the vertical bar to find its moment of inertia. If the area is 20 square inches, 1 inch times 20 square inches equals 20 cubic inches.

Add the moment of inertia for the top bar to the moment of inertia for the bottom bar to get the total moment of inertia for the Tbeam. For example, 176 cubic inches plus 20 cubic inches equals 196 cubic inches.

Divide the total moment of inertia by the total area to find the ycentroid for the Tbeam. For example, 196 cubic inches divided by 36 square inches equals 5.44 inches. This means the ycentroid lies along a horizontal axis 5.44 inches above the bottom of the Tbeam.
Tips & Warnings
 Make sure all the units are consistent. If the width is in inches but the height is in feet, for example, convert the height to inches before beginning the calculation.
References
 "Mechanics of Materials"; James Gere, et al.; 2009
 University of South Carolina; Geometric Properties; G. G. Schierle; 2005