In this paper, a periodic cosmological model is considered. Previously, it was assumed that the expansion of the universe slows down over time. Theorists proceeded from the assumption that the main part of the mass of the Universe is matter - both visible and invisible (dark matter). On the basis of new observations indicating the acceleration of expansion, it was found that in the Universe there is a previously unknown energy with negative pressure (equation of state). They called it "dark energy". In this paper, a scalar cosmological model is considered. The Lagrangian is derived and the system of equations of motion is obtained. To study the model, a scalar field in the form of a periodic function was chosen. The Hubble parameter, the scale factor, which has the meaning of the radius of the Universe, and in the case of a periodic function of the scalar field, which has an exponential dependence, the density of dark energy, the pressure and the potential of the scalar field are calculated, and their graphs are plotted in the time dependence section from 0 to 2p. To study the inflationary model, the potential is introduced in a power-law form. From it, the parameters of slow rolling through e-folding are derived and a plot of spectral indices for this model is plotted. The results obtained are consistent with the Planck observational data and confirm the correspondence of the model under study with the previously proposed ones.