Measure one consistent fuel-use interval
Start with distance traveled and the fuel consumed over that same period. A trip odometer can supply the miles, or you can subtract an earlier main-odometer reading from a later one. Enter the distance difference rather than the vehicle's lifetime mileage. A fuel quantity from a different trip does not describe the same interval, even if the arithmetic produces a plausible number.
The DOE and EPA describe a fill-to-fill method: begin with a full tank, record distance until the next complete refill, and use the amount needed to refill. This makes the distance and fuel observations comparable. A purchase that only partly refills the tank may not match all the miles since the earlier full tank. Keep those records together before using the result.
Use the US gallon basis shown beside the input
Enter miles and US liquid gallons. This version does not accept an Imperial gallon value or a liter value in the gallons field. If your receipt reports another unit, convert the quantity first. The unit labels are part of the input contract; changing a number without changing its measurement basis can create a misleading comparison.
The secondary result converts that same interval to liters per 100 kilometers. Its constants use the exact international-mile and US-liquid-gallon definitions. One mile is 1.609344 kilometers, while one US liquid gallon is 3.785411784 liters. The latter follows from 231 cubic inches per gallon and the exact 2.54-centimeter inch. Calculations keep these factors before rounding the displayed result.
Worked example using the prefilled values
The example enters 360 miles and 12 US gallons. Dividing distance by fuel gives 30.0000 US mpg. The equivalent metric consumption displays as 7.8405 L/100 km. These are two ways of describing the same recorded distance and fuel amount, rather than two independent measurements of the vehicle.
If the distance remains 360 miles and fuel use rises to 15 US gallons, the MPG result decreases and consumption per 100 kilometers increases. That direction is intentional. MPG measures how far each gallon carries you, so a larger number means more distance per unit of fuel. Liters per 100 kilometers measures the fuel needed for a fixed distance, so a smaller number means less fuel for that distance.
Combine multiple periods using their underlying totals
For an overall figure across several compatible records, add all the miles and add all the gallons, then enter those two totals. Do not automatically take the simple average of separate MPG readings. A short period and a much longer period should not receive equal influence merely because each appears as one line in a notebook.
Keep the result's scope visible when comparing it with another period. This calculator summarizes the supplied totals; it does not identify the cause of a change or adjust observations for route, weather, loading or driving style. It also does not retrieve a manufacturer's rating or an EPA vehicle listing. Treat an external rating and your measured interval as different kinds of information.
Separate measured economy from trip budgeting
This tool answers how much distance your entered fuel quantity covered. It does not calculate a purchase price, trip bill, annual driving cost or amount left in the tank. Once you have an economy assumption appropriate to a planned trip, the gas cost calculator can use that assumption with distance and price. A consumption result alone is not a complete vehicle budget.
Record enough detail to reproduce your comparison later: the distance interval, US gallons and whether the fuel record represented a full refill. The calculator does not save a history or build a log for you. When comparing several scenarios, retain your own records instead of assuming that an earlier entry remains available after you reset or close the page.
Correct invalid values and interpret display precision
Both inputs must be greater than zero. Distance may be no more than 1,000,000 miles, and fuel no more than 100,000 US gallons. These broad limits define supported numeric entries, not a normal driving range. Blank, nonnumeric, negative, zero or out-of-range values show an input message and clear both results.
The calculation uses the entered values before rounding either output to four decimal places. The extra digits help show a conversion consistently, but they do not make a pump or odometer reading more precise. Valid edits recalculate automatically, Calculate requests an update explicitly, and Reset to example restores 360 miles and 12 gallons.