The research object was the vibrations of buildings on sliding foundations with dry friction under the action of real earthquakes. Methods. The samples of a four-story and a nine-story building were used with a set of five earthquake records of 7-10 MSK-64 scale. The design model of the building has the form of a system with many degrees of freedom, subjected to shear vibrations only. The Coulomb dry friction model describes the foundation-grillage interaction. The foundation motion is specified as the horizontal component of the seismogram of a real earthquake. The absence of a condition to calculate the friction force between two absolutely rigid bodies during the period of their cohesion in the dynamics does not allow determining the time of the beginning of sliding, and this complicates the problem. In addition, the seismograms of real earthquakes are of complex nature, which can lead to multiple changes in the state of sliding and cohesion between the grillage and the foundation. Discretization of the problem in time and the use of a logical algorithm made it possible to solve this problem. The implicit Newmark scheme was used; at each time step, the problem was solved in three statements and the true solution was chosen. To ensure the required accuracy of solving the nonlinear problem, the time step value was selected by performing a computational experiment. Results. The developed algorithm for calculating displacements, velocities, accelerations, and shear forces was proposed based on the horizontal component of the seismogram record. The results obtained are presented in the form of comparative graphs of the grillage and foundation displacements, and the shear force of the first floor. The results were also presented in ten tables for four-story and nine-story buildings subjected to the influence of five earthquakes. These tables show the maximum values of the shear forces for the floors of the buildings. With a favorable combination of the dynamic characteristics of the building and the amplitude-frequency response of the seismogram, the use of a sliding foundation can lead to multiple reductions in the shear force in the building, while a poor combination of them in a sliding foundation gives an insignificant effect. It is shown that a sliding foundation does not always lead to multiple reductions in shear force.