Gas cost calculator

Enter distance, fuel economy and fuel price to estimate the trip's fuel cost.

28 mpg (US) ≈ 8.40 L/100 km
Enter the one-way distance; Round trip doubles it. Enter fuel economy in the selected unit. Enter your price in US dollars, with up to three decimal places.
Trip fuel cost
$52.50
Fuel needed15.00 US gal (56.78 L)
$0.13 per mile
One way · 420 mi total
Trip
Enter 1–99 people; leave blank for no cost split.
Enter 1–999 trips; each trip follows the One way or Round trip selection.

Measured fuel economy

Use the distance between two fill-ups to the same full level and the fuel added at the second fill-up.
Optional; leave blank to see fuel economy only.
Measured fuel economy
30.00 mpg (US)
Equivalent fuel economy12.75 km/L · 7.84 L/100 km
Fuel used10.00 US gal (37.85 L)
Fuel cost$35.00
$0.12 per mile

Based on the distance and fuel used for this journey; costs cover fuel only.

Convert distance and volume with the Measurement converter.

Calculation rules

Fuel needed is distance / mpg, distance × L/100 km / 100, or distance / km/L after matching units; fuel cost is fuel needed × your entered unit price. Round trip doubles the distance, cost per person divides by the entered people, monthly cost multiplies by the entered trip count, and yearly cost is monthly cost × 12.

One mile is exactly 1.609344 km and one US gallon is exactly 3.785411784 L; mpg uses US gallons. Calculate before rounding each displayed fuel amount, cost and converted fuel-economy value once to two decimal places, with ties away from zero; each person's share is rounded separately, so the displayed shares may not add up to the trip total.

Fuel prices are entered by you; the calculator does not retrieve live or average prices, and optional monthly totals stay hidden when no trip count is entered.

This distance-and-fuel-economy estimate does not model idling, traffic or route elevation and includes fuel cost only.

Measured fuel economy uses the distance driven and fuel used over the same journey. For fill-up records, fill the tank to the same full level both times and use the fuel added at the second fill-up. Gallons are US gallons, not imperial gallons. Round trip, people and trips per month apply only to the trip calculator. Leave the price blank to hide costs; enter 0 for a fuel cost of $0.00. Use in trip calculator transfers the unrounded fuel economy, even though the displayed value has two decimal places.

Frequently asked questions

How much fuel and money does a 420-mile trip take at 28 mpg and $3.50 a gallon?
One way uses 15.00 US gal, or 56.78 L, and costs $52.50 with those inputs.
Can I mix kilometers, mpg and a price per liter?
Yes. Distance, fuel economy and price units are converted before calculating; mpg always uses US gallons.
What should I enter for a round trip?
Enter the one-way distance and choose Round trip; each trip in the optional monthly count then includes both directions.
Why do four shares of $13.13 exceed a $52.50 total?
Each exact share is $13.125 and rounds to $13.13, so the displayed shares add to $52.52 while the trip total remains $52.50.
How do I measure fuel economy from fill-up records?
Fill the tank to the same full level twice. Enter the distance driven between those fill-ups and the fuel added at the second fill-up. The calculation assumes that this fuel replaces the amount used over that distance.
Does mpg use US or imperial gallons?
This calculator uses US gallons. One US gallon is exactly 3.785411784 liters. If your fuel record is in imperial gallons, convert it to liters before entering it.
Do I need to enter a fuel price?
No. Leave the price blank to see fuel economy and fuel used without costs. Entering 0 shows a fuel cost of $0.00. Example prices are sample inputs, not current market prices.
How do I use measured fuel economy for a trip?
Select Use in trip calculator to enter the unrounded fuel economy in the trip calculator’s selected economy unit. Your trip distance, fuel price and other trip settings stay as entered.

Privacy on this page

Calculations run in your browser. The values you enter are not sent to the server or saved in browser storage. Reloading the page returns the inputs to their initial state.

To understand how the page is used and to improve the service, this page sends semku’s own usage statistics and automatic error reports. They go only to the dedicated endpoint under semku.com/api/telemetry/v1/. They are not used for advertising or third-party tracking.

The usage statistics include stages of use (such as starting an operation or requesting a copy), the times they occur and fixed identifiers that distinguish the page and feature. They do not include the values you enter, the results shown or the text you copy. Inputs are not sent as hashes or as size categories either. The full URL and search terms are not sent.

Operations and sessions are distinguished by randomly generated identifiers. In the browser, these identifiers exist only in temporary memory and are not written to cookies or browser storage. No identification based on cookies or combined device characteristics is used.

Error reports contain the error type, code and time, and, where available, a registered program-source identifier with line and column numbers. The error message text and stack traces are not sent. Usage statistics and error reports also carry the site identifier, the deployment version and a random record identifier. For access records such as IP addresses, browser signals (User-Agent Client Hints), region and language, see the paragraph below.

The feedback form sends the rating you chose and the text you typed in the free-text field when you press the send button. The form also sends a random ID that distinguishes the submission, along with the page, site, deployment version and type of request. There are no fields for your name, email address or phone number, and the values you enter are not attached automatically. Before sending your text, the widget removes leading and trailing whitespace and, if you selected a rating, adds [+1] or [-1] at the start; it makes no other changes to your text. After receipt, the collector standardizes line endings and removes leading and trailing whitespace. Please do not enter personal data, passwords, authentication keys or payment details.

To improve the service, we record the country and state/province-level region at the time of your visit (an estimate based on the connecting network), which site you came from including the page path, and one display-language setting announced by your browser (for example, en-US). Location is kept to country and region only; no city or precise position is recorded. When you use the service, connection records, including your IP address, are automatically generated and retained to maintain service security and identify abnormal access. Cloudflare is the data processor for this site. Collection of this item is enabled only after this notice is published; we do not collect it retrospectively for use before collection is enabled. Query strings such as search terms are not recorded, and neither is the full list of preferred languages or the raw request headers. Collection of this information is currently disabled and will only be enabled after this notice is published. If we enable collection, we will collect and use signals your browser reports about its type and version, along with an indication of whether automation tools are being used, to identify bots. These browser signals are estimates and do not conclusively identify your browser's type or version or whether automation tools are being used. We do not collect it retrospectively for use before collection is enabled. The raw User-Agent request header is not recorded. These records are per visit only and use no identifier that links one visit to another. Recording starts only with visits after this notice is published and is not applied retroactively to earlier visits. The region and the referring site have been recorded since 2026-09-20; the display language since 2026-09-24. Browser signals are not recorded yet.

Separately, when you visit the site, the hosting provider records your IP address, the time of the request and user-agent information about your browser and device in Cloudflare Pages’ standard access logs.

For details, see the privacy policy.

Calculations run in your browser without sending your calculation inputs or results to the server. See “Privacy on this page” for information about access data.