In the present paper, the problem of detecting unknown number of cracks is solved in a closed form for a multistep beam. First, general Rayleigh quotient is established for a multistep beam with an arbitrary number of cracks and boundary conditions. Then, it is used for obtaining an explicit expression of natural frequencies through crack parameters for cantilever multistep beams. The obtained expression is straightforward for calculating natural frequencies of a multistep beam with an arbitrary number of transverse cracks and enables to develop an efficient procedure for detecting unknown number of cracks in the beam structure. Numerical examples show that the Rayleigh quotient is really a useful tool for modal analysis and identification of cracked multistep beams. An experimental study is accomplished for a two-step cracked cantilever beam to validate the theoretical development.