This document derives the formula for shear stress distribution in a square cross-section beam. It begins by introducing shear stress and normal stress. It then shows the derivation of the shear stress formula using integrals and the relationship between shear force and shear stress. The formula derived is that shear stress varies quadratically with distance from the neutral axis, reaching a maximum at the center of the cross-section and reducing to zero at the outer edges. For a square cross-section, the final formula is that shear stress equals the shear force times (b^2/4 - y1^2)/2I, where b is the side length and y1 is the distance from the neutral axis.