MPG Calculator

MPG is evaluated from Miles Driven, Gallons Used and Gas Price. The calculation reports Fuel Economy, Cost per Mile and Gallons per 100 Miles.

Results

Thanks — we’ve logged this for review.

About the MPG Calculator

MPG is treated here as a quantitative relation between Miles Driven, Gallons Used and Gas Price and Fuel Economy, Cost per Mile and Gallons per 100 Miles.

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:
MPG = miles driven / gallons used
Cost per mile = gas price per gallon / MPG
Gallons per 100 miles = 100 / MPG

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:

MPG = miles driven / gallons used
Cost per mile = gas price per gallon / MPG
Gallons per 100 miles = 100 / MPG

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: Road trip fill-up: 350 miles, 12.5 gallons, $3.45/gal

Inputs

miles: 350 gallons: 12.5 gas_price: 3.45
Fuel Economy: 28 MPG. Cost per Mile: $0.123/mile. Gallons per 100 Miles: 3.57 gal/100mi

With Miles Driven = 350, Gallons Used = 12.5 and Gas Price = 3.45 as the stated inputs, the result is Fuel Economy = 28 MPG, Cost per Mile = $0.123/mile and Gallons per 100 Miles = 3.57 gal/100mi. Each value corresponds to the declared output fields.

Example 2: City commute: 180 miles per week, 8 gallons used

Inputs

miles: 180 gallons: 8 gas_price: 3.6
Fuel Economy: 22.5 MPG. Cost per Mile: $0.16/mile. Gallons per 100 Miles: 4.44 gal/100mi

With Miles Driven = 180, Gallons Used = 8 and Gas Price = 3.6 as the stated inputs, the result is Fuel Economy = 22.5 MPG, Cost per Mile = $0.16/mile and Gallons per 100 Miles = 4.44 gal/100mi. Each value corresponds to the declared output fields.

Example 3: F-150 truck towing: 120 miles, 14 gallons

Inputs

miles: 120 gallons: 14 gas_price: 3.75
Fuel Economy: 8.6 MPG. Cost per Mile: $0.438/mile. Gallons per 100 Miles: 11.67 gal/100mi

With Miles Driven = 120, Gallons Used = 14 and Gas Price = 3.75 as the stated inputs, the result is Fuel Economy = 8.6 MPG, Cost per Mile = $0.438/mile and Gallons per 100 Miles = 11.67 gal/100mi. Each value corresponds to the declared output fields.

Example 4: Toyota Prius hybrid: 550 miles, 9.5 gallons, $3.30/gal

Inputs

miles: 550 gallons: 9.5 gas_price: 3.3
Fuel Economy: 57.9 MPG. Cost per Mile: $0.057/mile. Gallons per 100 Miles: 1.73 gal/100mi

With Miles Driven = 550, Gallons Used = 9.5 and Gas Price = 3.3 as the stated inputs, the result is Fuel Economy = 57.9 MPG, Cost per Mile = $0.057/mile and Gallons per 100 Miles = 1.73 gal/100mi. Each value corresponds to the declared output fields.

Common Use Cases

  • Calculate actual MPG after a road trip fill-up
  • Compare fuel economy to EPA rating
  • Track MPG over time to detect engine issues