First, the rated power of the boiler and the calorific value of the gas must be known. Use the formula: Gas consumption = Boiler rated power × Time / Gas calorific value / Boiler efficiency.