The gas flow profile along the wellbore that includes contribution of all productive layers is an important piece of information for reservoir characterization and well management. It provides flow contribution from each producing interval along the wellbore, which is critical for optimizing well performance and maximizing gas recovery. The present work discussed determination of the rate profile from the pressure and temperature profiles in gas wells, which is significantly cheaper and more precise than the direct flow metering. An effective and robust algorithm for calculation of the rate and thermal conductivity profiles from the depth pressure and temperature distributions have been developed by tuning the mathematical model of non-isothermal gas flow in vertical well. The detailed sensitivity analysis shows that the inverse problem is well-posed. The initial values of rate and thermal conductivity for iterative minimization algorithm were obtained by averaging the values directly calculated from the measured pressure and temperature profiles. The initial values are shown to provide the final solution with good accuracy. It allows recommending the initial values for the estimates of the rate profile. Application of the algorithm to field cases shows good agreement between the directly measured and calculated rate profiles; the results are also consistent with flowmeter (PLT) data. It validates the proposed method.