A method (200) for real-time estimation of the temperature (Tgas) of a gas in an on-board device (100) for storing pressurized gas, the device (100) comprising a tank (1), a first pressure sensor (4), a first temperature sensor (5), a computer (6) comprising an electronic system equipped with a microprocessor for acquiring and processing data, the method (200) comprising a step (S1) of measuring the pressure (Pgas) of the gas in the tank (1), using the pressure sensor (4), a step (S2) of measuring the ambient temperature (Tamb) outside the tank (1), using the first temperature sensor (5), a step (S3) of determining, on the basis of the measurements from the sensors (4, 5) and by using at least one predefined predictive model, a theoretical minimum temperature (TtankCold) and a theoretical maximum temperature (TtankHot) of the gas in the tank (1), and a step (S4) of approximating the temperature (Tgas) of the gas in the tank (1) to a value comprised between the theoretical minimum temperature (TtankCold) and the theoretical maximum temperature (TtankHot), or to a value equal to one of either the theoretical minimum temperature (TtankCold) or the theoretical maximum temperature (TtankHot), the steps (S3, S4) being executed by the computer (6).