Natural vibrations of a stratified liquid in a reactangular vessel are examined. As the limiting case of stratification, an incompressible liquid divided into layers of different densities is considered. A frequency equation for an arbitrary number of layers is obtained. For a continuous distribution of density, the vibration equation is solved numerically using a computer. Results calculated for a sinusoidal law of density distribution are compared with those for an exponential law for which an exact solution is available.