Gas Mileage Calculator

Gas Mileage is evaluated from Gas Tank Size, Fuel Economy and Gas Price. The calculation reports Range on Full Tank, Current Range and Miles per Dollar.

Results

Thanks — we’ve logged this for review.

About the Gas Mileage Calculator

Gas Mileage is treated here as a quantitative relation between Gas Tank Size, Fuel Economy, Gas Price and Current Fuel Level and Range on Full Tank, Current Range, Miles per Dollar and Cost to Fill Tank.

The calculator uses a multi formula configuration. Each reported value is read as a direct evaluation of the stored rules with the declared field formats and units.

Formula basis:
Full range = tank size x MPG
Current range = tank size x fuel level fraction x MPG
Miles per dollar = MPG / gas price
Cost to fill from current level = (tank size x (1 - fuel level fraction)) x gas price

Interpret the outputs in the order shown by the result fields. Optional inputs affect only the outputs that depend on those variables.

Formula & How It Works

The calculation applies the following relations exactly as recorded in the metadata:

Full range = tank size x MPG
Current range = tank size x fuel level fraction x MPG
Miles per dollar = MPG / gas price
Cost to fill from current level = (tank size x (1 - fuel level fraction)) x gas price

Each output field is produced by substituting the supplied inputs into the relevant relation and then applying the declared rounding or text format.

Worked Examples

Example 1: Ford F-150: 26-gallon tank, 22 MPG, half tank, $3.55/gal

Inputs

tank_size: 26 mpg: 22 gas_price: 3.55 current_fuel: Half tank (50%)
Range on Full Tank: 572 miles. Current Range: 286 miles. Miles per Dollar: mi/$6.2. Cost to Fill Tank: $46.15

With Gas Tank Size = 26, Fuel Economy = 22, Gas Price = 3.55 and Current Fuel Level = Half tank (50%) as the stated inputs, the result is Range on Full Tank = 572 miles, Current Range = 286 miles and Miles per Dollar = mi/$6.2. Each value corresponds to the declared output fields.

Example 2: Toyota Prius: 11.3 gal tank, 57 MPG, quarter tank

Inputs

tank_size: 11.3 mpg: 57 gas_price: 3.3 current_fuel: Quarter tank (25%)
Range on Full Tank: 644 miles. Current Range: 161 miles. Miles per Dollar: mi/$17.3. Cost to Fill Tank: $27.97

With Gas Tank Size = 11.3, Fuel Economy = 57, Gas Price = 3.3 and Current Fuel Level = Quarter tank (25%) as the stated inputs, the result is Range on Full Tank = 644 miles, Current Range = 161 miles and Miles per Dollar = mi/$17.3. Each value corresponds to the declared output fields.

Example 3: Honda Civic: 12.4 gallon tank, 36 MPG, 3/4 tank remaining

Inputs

tank_size: 12.4 mpg: 36 gas_price: 3.45 current_fuel: 3/4 tank (75%)
Range on Full Tank: 446 miles. Current Range: 335 miles. Miles per Dollar: mi/$10.4. Cost to Fill Tank: $10.7

With Gas Tank Size = 12.4, Fuel Economy = 36, Gas Price = 3.45 and Current Fuel Level = 3/4 tank (75%) as the stated inputs, the result is Range on Full Tank = 446 miles, Current Range = 335 miles and Miles per Dollar = mi/$10.4. Each value corresponds to the declared output fields.

Example 4: Chevy Suburban: 28-gal tank, 18 MPG, near empty, $3.60/gal

Inputs

tank_size: 28 mpg: 18 gas_price: 3.6 current_fuel: Near empty (10%)
Range on Full Tank: 504 miles. Current Range: 50 miles. Miles per Dollar: mi/$5. Cost to Fill Tank: $90.72

With Gas Tank Size = 28, Fuel Economy = 18, Gas Price = 3.6 and Current Fuel Level = Near empty (10%) as the stated inputs, the result is Range on Full Tank = 504 miles, Current Range = 50 miles and Miles per Dollar = mi/$5. Each value corresponds to the declared output fields.

Common Use Cases

  • Estimate range on a full tank before a long drive
  • Calculate miles per dollar value of fuel economy
  • Plan fuel stops on a long trip