Find the manufacturer’s runtime at a stated load and divide the listed fuel quantity by those hours. That gives a planning burn rate for the same load. Your actual rate will change as the electrical load changes.
Example: If a generator runs 10 hours on 5 gallons at 50% load, the planning rate is 0.5 gallon per hour. Twenty gallons would provide about 40 hours at that same load—not necessarily 40 hours at full output.
Fuel storage is part of the calculation
Follow local fire rules and manufacturer guidance. Rotate stabilized gasoline, inspect approved propane cylinders, and test the generator on every fuel you expect to use. Never refuel a hot or running generator.