As of 2015, there were more than 200 permanent and variable gravity sections of crude oil and petroleum product pipelines in the pipeline system of PJSC Transneft, the natural monopoly for pipeline transportation of crude oil and petroleum products in the Russian Federation. The operation of gravity sections in oil pipelines in Russia is a very important safety and environmental issue, and Russian oil transportation companies are constantly working on improving approaches to monitor and control pipeline operation modes. When these sections occur, special attention is given to determining the geometric capacity of the pipeline section, as pumping is done in batches and commercial pumping product remains in the gravity section during periodic shutdowns. Due to the limited technical equipment of these sections and the likely illegal unrecorded product withdrawals in these pipeline sections, the most demanding approach is to determine the fill factor of the pipe body. The fill factor is influenced by many factors, including the presence of gas phase and water accumulations, correct geometry of the pipe body and other factors. Given the given initial data, it can be seen that the solution to the problem of determining the filling level of a stopped oil pipeline is reduced to the construction of a multifactor model. For accurate determination, in addition to the model, there is a need for relevant software, an algorithm for solving the problem ofcalculating the filling factor. Correspondingly, operating organisations need a system for accounting and control of the product filling level at these sections at the level of improvement of the state system for ensuring unity of measurements and metrological support of accounting for the long-distance pipeline transport of oil and oil products - a strategic resource, the revenues from the sale of which account for about 23 % of the budgetary system of the Russian Federation.The calculation created and proposed by the authors is divided into stages in which the initial data is sequentially collected, the voltages on the capacitors are calculated, the data is processed using the interpolation method, an image is constructed using the Newton-Gauss method, and the filling factor is calculated with various multiphase pumping products. The calculation is made based on voltage readings from sensors located orthogonally to the axis of the pipe body. Using the approximation method and the Newton-Gauss method, you can get rid of the «noise» and level the phase boundary. When tested and implemented at pipeline pumping facilities, it will be possible to clarify the existing dependences of the influence of gas phase friction on the fluid flow rate, and, therefore, evaluate the effect on the filling factor. This calculation can become a tool in the fight against illegal tappings.