Ammonia (NH3) is a toxic gas emitted into the atmosphere from both anthropogenic and natural sources. Ammonia reacts with nitric and sulfuric acids and forms suspended particles that constitute a large part of all aerosols in the atmosphere. Aerosols can form smog, negatively affecting human health; they also play an important role in the formation of the Earth's radiation balance and, thus, affect climate changes. About 85% of anthropogenic ammonia emissions are associated with the use of nitrogen-containing fertilizers in agriculture. Due to the short lifetime of the gas in the atmosphere, its content significantly varies in space and time. Therefore, it is necessary to regularly monitor the ammonia content in the atmosphere over large cities and their surroundings. In this work, the total ammonia content (TAC) over the vicinity of St. Petersburg (Russia) is estimated and analyzed on the basis of data obtained from ground-based measurements of direct IR solar radiation spectra in 2016-2021 (performed using a high-resolution Bruker 125HR spectrometer). In the vicinity of St. Petersburg, the TAC significantly varied from 10(14) to 10(16) mol cm(-2). The systematic and random errors in determining the TAC amounted to 34 and 20%, respectively. The average TAC in the vicinity of St. Petersburg amounted to 3.6 x 10(15) mol cm(-2), with a natural variability of 3.5 x 10(15) mol cm(-2). Weak seasonal variations were revealed in the TAC with its maximum and minimum values within the warm and cold seasons, respectively. The TAC estimates for the vicinity of St. Petersburg correspond to those obtained in other regions of the globe.