Formula and method
Formula: Fuel used = distance ÷ economy; cost = fuel used × price. Result is reported in fuel cost.
Worked sample
For example, with inputs 12 and 3, this calculator evaluates the stated formula using those values. The numerical result is displayed when you enter the sample inputs.
Validation and limitations
Both inputs must be finite numbers; zero is rejected where it would cause division by zero. Use distance and fuel-economy units consistently (e.g. miles and miles/gallon). Estimates exclude fees and driving variation.