Key Concepts:  Transverse loads, such as P, acting on beams result in both internal shear stresses as well as internal bending stresses across the X-section.  The transverse  shear stress distribution for beams with a rectangular cross-section varies parabolically.

In  a Nut Shell:  The maximum shear stress occurs at the neutral (centroidal) axis of the
beam.  See the figure below.  Note that at both the top and bottom fibers the transverse
shear stress is zero (provided there is no horizontal force acting on the beam).

The table below gives the equation for the (transverse) shear stress, τ, at an arbitrary distance,
y, from the neutral axis.

 τ  =  VQ/It

where

τ  is the (transverse) shear stress acting at a distance, y, from the neutral axis
V is the value of the shear force at the section
Q is the first moment of the area (about the neutral axis, centroidal axis)

between the location where the shear stress is being calculated and the
location where the shear stress is zero
I  is the moment of inertia of the entire cross-section about the neutral axis
t  is the width of the cross-section at the location where the shear stress is
being calculated