Gas pipeline networks are complex distributed systems consisting of hundreds of kilometers of pipelines of various configurations. Equipping all sections of the gas pipelines with gas accounting and gas parameter metering devices that would allow for the quick detection of pipeline damages and the determination of gas loss volumes requires significant funds. As a result, many transportation and distribution pipelines are not equipped with metering devices. Therefore, it is important to develop algorithms that can estimate the volume of gas losses based on information from existing metering units without the reconstruction of gas networks.The paper proposes an improved mathematical model for the stationary flow of natural gas in pipelines which considers the flow velocity changes along the pipeline. This model is supplemented with an equation for calculating the flowrate of gas flowing into the atmosphere through a hole in the damaged above-ground gas pipeline. The authors have developed an equation to determine the discharge coefficient for a pressure range in the pipeline from 0.1 to 1.2 MPa with a methodological error of no more than 1.7%. Based on the obtained mathematical models, an algorithm has been developed to calculate the gas volume lost because of damage for pipeline configurations with gas parameter metering units at the pipeline outlet. The developed algorithm has been validated, and an example of its application for analyzing the distributions of gas pressure and temperature in a pipeline with existing damage is presented. The paper presents the simulation results for gas leakage through pipeline damage and the iterative determination of gas parameters at the damage point, as well as the results of calculating the gas flowrate through the damage.The application of the developed algorithm allows for increased accuracy in determining the volume of gas losses through pipeline damage. Its hardware implementation in the future will reduce the time for damage detection, localization, and elimination.