Calculate the moment of inertia of the cross section. For a rectangular cross section, I = (bh^3)/12 where I = Moment of inertia, b = width and h = height. I varies with shape.
Gather all necessary information. This includes the uniform load q, the length of the beam L, the perpendicular distance of the load from the neutral axis y and moment of inertia I.
Calculate the maximum stress σ using the formula for maximum stress in a beam with uniform load supported on both ends: σ = (y*q*L^2)/8*I, where y = the perpendicular distance of the load from the neutral axis, q = the magnitude of the load, L = the length of the beam and I = the moment of inertia of the cross section.