Mileage and Fuel Cost
Gallons, fuel cost, and IRS reimbursement from miles and MPG.
Example
You enter
- Round-trip miles 100
- MPG 25
- Fuel price ($/gal) 4
You get
- Gallons used 4 gal
- Fuel cost $16
No published worked example is on file for this calculation. It is checked against a hand-worked derivation of its method and an independent reference test.
Details, formula, and sources
Formula or tableGallons = miles / mpg. Fuel cost = gallons × $/gal. IRS reimbursement = miles × IRS_standard_mileage_rate.
Source and editionIRS standard mileage rate, 2026 second-half rate bundled ($0.76/mi, effective 2026-07-01 per IR-2026-29).
Free accessFree at irs.gov.
What governsEstimate. AHJ and licensed professional govern.
API field namesround_trip_miles, mpg, fuel_price_per_gallon, gallons, fuel_cost
- Rate data/crosswalks/irs-mileage.json (rate per mile, USD)IRS-published standard mileage rate