Mileage Calculator

Work out your gas mileage, price the fuel for any trip, and calculate mileage reimbursement at the current IRS rate. Switches between MPG, L/100km and km/L.

Units

Result

25 MPG (US)

350 miles on 14 gallons works out at 25 MPG (US).

MPG (US)

25

MPG (UK)

30.02

L/100km

9.41

km/L

10.63

How it was worked out

350 miles ÷ 14 gallons = 25 MPG (US)

IRS figures follow Notice 2026-10 as revised for travel from 1 July 2026. Employers can pay a different rate, so check your own policy before you file.

One Tool for Fuel, Cost, and Claims

Most mileage questions fall into three buckets: how much fuel the car actually uses, what a drive will cost, and what the miles are worth on an expense claim. Each one has its own tab here, so you are never converting units in your head or hunting for this year’s reimbursement rate.

MPG · L/100km · Trip Cost · IRS Rates

Why Use This Mileage Calculator?

Every Fuel Unit at Once

Enter a tank in gallons or litres and read the result as US MPG, imperial MPG, L/100km and km/L together. Switching the unit system converts the numbers you already typed.

Real Trip Costs

Price a drive from distance, economy and pump price, with a round trip toggle and a split between passengers. You get total cost, fuel needed, and cost per mile.

Current Reimbursement Rates

IRS business, medical and charitable rates for 2026 and 2025 are built in, alongside the German and Spanish per-kilometre allowances. Any custom rate works too.

The Arithmetic Stays Visible

Every answer shows the formula behind it, so you can paste the working into an expense report or rebuild it in a spreadsheet without guessing.

How this Mileage Calculator works

Three calculations sit behind the tabs, and all of them run on one internal pair of units: kilometres and litres. Whatever you type is converted to that pair first, the arithmetic happens once, and the answer is converted back into the system you selected. That is also why switching from US to metric halfway through carries your numbers with it, instead of leaving a 350 that used to mean miles sitting in a field now labelled kilometres.

Fuel economy divides distance by fuel. The single figure that comes out is then expressed four ways, because MPG and L/100km are inverses of each other: one counts distance per unit of fuel, the other counts fuel per fixed distance. Gallons are the other trap. A US gallon holds 3.785 litres and an imperial gallon holds 4.546, a gap of about 20 percent.

Trip cost turns your economy figure into litres per kilometre, multiplies by the distance, then multiplies by the pump price. Ticking round trip doubles the distance before any of that runs, and the passenger field divides the total at the very end.

Reimbursement is a straight multiplication, so the work is in the rate. The presets carry the IRS business, medical and charitable rates for 2026 and 2025, including the mid-year revision that lifted the business rate from 72.5 to 76 cents on 1 July 2026, alongside the German and Spanish per-kilometre allowances. Editing the rate by hand switches the selector to custom. Nothing you type is uploaded.

How to use this Mileage Calculator

1

Pick the calculation

Choose fuel economy, trip cost, or mileage reimbursement. Each tab keeps its own figures, so you can move between them without retyping anything.

2

Set the units and enter your numbers

Switch between miles and gallons, kilometres and litres, or imperial gallons. Anything you have already typed is converted for you.

3

Read the result and copy it

Under the answer sit the formula and four supporting figures, including MPG, L/100km and km/L side by side.

Example Usage

Pricing a long drive before you set off:

Input
Trip cost · 300 miles at 28 MPG, fuel $3.45 per gallon
Output
$36.96 total — 10.71 gallons, $0.12 per mile

Frequently Asked Questions

How do I work out my real gas mileage?
Fill the tank right up and note the odometer reading. Drive normally until the tank is about a quarter full, then fill up again and write down how many gallons went in. Enter the miles you covered and that fuel figure into the fuel economy mode. Two or three tanks give a better average than one, because a single fill-up can be thrown off by how far the pump cut off.
Why is my calculated MPG lower than the number on the window sticker?
EPA and WLTP figures come from controlled test cycles, not from your commute. Short trips, cold starts, roof boxes, low tyre pressure, heavy traffic, and a right foot that likes acceleration all cost fuel. A gap of 10 to 20 percent below the official rating is normal. A much bigger gap usually points to tyre pressure, a dragging brake, or a sensor fault worth checking.
What is the IRS mileage rate for 2026?
The business rate started 2026 at 72.5 cents per mile and rose to 76 cents per mile for travel on or after 1 July 2026 after the IRS revised Notice 2026-10. Medical and moving mileage moved from 20.5 to 23.5 cents, and the charitable rate stays fixed at 14 cents because it is set by statute. Pick the period that matches your trip date in the reimbursement mode.
Which mileage rate applies if my trip crossed 1 July 2026?
Rates apply by trip date, not by claim date. Miles driven up to 30 June use the 72.5 cent rate and miles from 1 July onwards use 76 cents. Run the calculator twice, once for each block of miles, then add the two totals. Your expense report should show the split, since a single blended rate will not match what your finance team expects.
Can I use this for German or Spanish mileage allowances?
Yes. The reimbursement mode includes the German business-trip rate of 0.30 euro per kilometre, the 2026 commuter allowance of 0.38 euro per kilometre, and the Spanish AEAT tax-exempt rate of 0.26 euro per kilometre. You can also type any rate your employer uses and switch the unit to kilometres or miles.
How do I convert MPG to L/100km?
Divide 235.21 by your US MPG figure. So 28 MPG is roughly 8.4 L/100km. The fuel economy mode does this for you and shows US MPG, imperial MPG, L/100km and km/L side by side, which is handy if you drive a US-spec car in Europe or read reviews from both markets.
Is a US gallon the same as a UK gallon?
No, and the difference is large enough to matter. A US gallon is 3.785 litres and an imperial gallon is 4.546 litres, so the same car reads about 20 percent higher in imperial MPG. Use the UK unit setting if you are working from British figures, otherwise your fuel costs will come out wrong.
Does the trip cost mode account for a return journey?
Only if you tick the round trip box, which doubles the distance before it prices the fuel. There is also a field for splitting the total between passengers, which is what most people actually want when they are sorting out a shared drive.
Should I claim the standard mileage rate or my actual car expenses?
The standard rate covers fuel, maintenance, insurance, and depreciation in one number and needs only a mileage log. Actual expenses can pay more if you drive an expensive vehicle or cover few miles, but you have to keep every receipt. If you want the choice later, note that the IRS requires you to use the standard rate in the first year you use a car for business.
Are my numbers sent anywhere?
No. Every calculation runs in your browser with JavaScript, nothing is uploaded, and nothing is stored after you close the tab. The tool is free, needs no account, and keeps working offline once the page has loaded.

Related Tools

The Mileage Calculator is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.

Comments

Questions, corrections, and useful tips are welcome. Comments are reviewed before publication.

Loading comments...

Comments are stored and moderated using Cusdis Cloud. Email is optional. Privacy Policy

As featured on

CodeItBro - Free dev tools + practical guides to help you ship faster | Product HuntCodeItBro - Free Online Developer Tools badgeCodeItBro badge