ForHosting KIT · Travel & geography

Annual fuel cost calculator

Driving 12,000 miles a year at 28 mpg with fuel at 3.50 a gallon costs 1,500 a year, 125 a month. Enter your yearly mileage, fuel economy and pump price to see the annual fuel bill in monthly, weekly and daily slices too. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Annual mileage
12,000
Fuel economy
28
Fuel price
3.5
You get
Economy unit
Mpg
Annual fuel volume
428.571428571
Annual fuel cost
1,500
Monthly fuel cost
125

Buying a car, filing a household budget, or running a small fleet all stall on the same question: how much will fuel cost over a full year? This annual fuel cost calculator turns three numbers you already know—annual mileage, fuel economy, and the pump price—into a yearly bill plus monthly, weekly, and daily slices so running costs sit next to insurance and maintenance instead of remaining a guess. Enter miles or kilometres driven in a typical year, the vehicle’s economy as miles per gallon, kilometres per litre, litres per 100 kilometres, or gallons per 100 miles, and the price of one unit of fuel. The engine returns annual fuel volume, annual fuel cost, and cost per distance with a transparent formula you can show beside the figure. Optional tank size adds estimated fill-ups per year.

How a yearly fuel bill is worked out

Yearly fuel spend is the fuel a vehicle burns in a typical year multiplied by the price of one unit of that fuel. The volume follows from your annual mileage and fuel economy, once you say how the economy is written. With miles per gallon or kilometres per litre, divide the distance by the economy: 12,000 miles at 28 mpg needs about 429 gallons, and at 3.50 per gallon the bill is 1,500 a year. With litres per 100 kilometres or gallons per 100 miles, multiply the distance by the economy and divide by 100. The yearly figure is then split into monthly, weekly and daily amounts by dividing by 12, 52 and 365.

Keep the units consistent

The calculation trusts the units you give it. The mileage must use the same length unit as the economy, miles with mpg and kilometres with kilometres per litre, and the price must be per unit of the same fuel volume, per gallon or per litre. Nothing is converted between miles and kilometres and no live pump price is looked up, so a mixed entry produces a confident but wrong number. Used consistently, the result gives a household a fuel line to set beside insurance and maintenance, and gives a fleet desk a yearly volume and spend for a fuel-only budget.

Household vehicle running-cost budgets

Households enter yearly miles or kilometres, the car’s average mpg or L/100km, and the local pump price to see annual and monthly fuel spend before setting aside insurance and maintenance.

Car shopping and total cost of ownership

Shoppers compare two vehicles at the same annual mileage and fuel price so the thirstier car’s extra yearly fuel bill is visible beside the sticker price.

Fleet and reimbursement planning

Fleet desks and expense tools turn stated annual mileage and vehicle economy into yearly volume, fill-ups, and currency for fuel-only budget lines without scraping live map APIs.

Is the annual fuel cost calculator free?

The browser tool runs free on your device.

Does it convert miles to kilometres or look up live gas prices?

No. Keep mileage, economy, and price units coherent yourself. Live prices and unit conversion of pump quotes are separate tools; this capability only turns a yearly distance into volume and money.

How do I enter fuel economy in litres per 100 km?

Choose the litres-per-100-kilometres option and enter your yearly distance in kilometres. The yearly volume is then the distance times the consumption divided by 100, so fifteen thousand kilometres at 7 litres per 100 km needs 1,050 litres.

How many times a year will I fill the tank?

Add your usable tank size, in the same volume unit as the fuel, and you also get the number of fill-ups per year, which is the yearly fuel volume divided by the tank capacity.

What does the cost per mile show?

It is the yearly fuel cost divided by the yearly distance, so in the 12,000-mile example each mile costs 0.125 in fuel. It is handy for comparing vehicles or setting a fuel-only reimbursement rate.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/travel/annual-fuel-cost

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/travel/annual-fuel-cost \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"annual_mileage":12000,"fuel_economy":28,"fuel_price":3.5}'
{
  "annual_mileage": 12000,
  "fuel_economy": 28,
  "fuel_price": 3.5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "travel.annual_fuel_cost",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How yearly fuel spending is computed from mileage, economy, and price

Yearly fuel spend is the volume of fuel a vehicle burns over a typical year multiplied by the price of one unit of that fuel. Volume is not a guess: it follows from annual mileage and fuel economy once you state how economy is written. Twelve thousand miles at twenty-eight miles per gallon needs about four hundred twenty-nine gallons; at three dollars and fifty cents per gallon the annual bill is one thousand five hundred dollars. Fifteen thousand kilometres at seven litres per one hundred kilometres needs one thousand fifty litres. When economy is distance per unit of fuel—miles per gallon or kilometres per litre—annual fuel volume equals annual_mileage divided by fuel_economy. When economy is consumption per distance—litres per one hundred kilometres or gallons per one hundred miles—annual fuel volume equals annual_mileage times fuel_economy divided by one hundred. Send required fields annual_mileage, fuel_economy, and fuel_price as JSON numbers or numeric strings. Optional economy_unit selects the identity: mpg (the default), km_per_l, l_per_100km, or gal_per_100mi. Optional tank_size, when positive, yields fillups_per_year so a household can see how often the tank is emptied. Aliases miles, km, annual_miles, annual_km, mileage, yearly_mileage, and distance map to annual_mileage; economy, mpg, km_per_l, efficiency, consumption, and fuel_efficiency map to fuel_economy; price, gas_price, price_per_unit, and fuel_unit_price map to fuel_price. Non-positive mileage or economy, a negative price, and an unknown economy_unit fail with invalid_input so a zero odometer or inverted sensor never produces a divide-by-zero or a nonsense credit. Magnitude caps keep results finite on the Worker isolate. Identical inputs always produce identical JSON: pure arithmetic, no network, no random seed, and no wall clock.

Reading the response, choosing units, and using realistic inputs

Prefer a real-world average economy over an optimistic brochure figure when the year includes cold starts, hills, short urban hops, or highway speeds. On success the response echoes annual_mileage, fuel_economy, fuel_price, and economy_unit after stable rounding, plus annual_fuel_volume, annual_fuel_cost, monthly_fuel_cost, weekly_fuel_cost, daily_fuel_cost, cost_per_distance, a human-readable formula string, and method. Monthly is the yearly bill divided by twelve, weekly by fifty-two, and daily by three hundred sixty-five so a budget sheet can drop the same total into any calendar grain. cost_per_distance is the yearly bill divided by annual mileage—useful when you compare two cars at the same pump price, or when a reimbursement policy wants a fuel-only cents-per-mile check beside a statutory mileage rate. When tank_size is supplied, tank_size and fillups_per_year appear; those keys are omitted when you leave tank size out, so clients never see a null. Keep units coherent: miles with mpg or gal_per_100mi and a per-gallon price, or kilometres with km_per_l or l_per_100km and a per-litre price. This endpoint does not convert miles to kilometres or gallons to litres, and it does not look up live pump prices. Currency is whatever unit you use for fuel_price; the engine is unit-agnostic and never converts dollars to euros. Missing required fields, non-finite values, non-positive mileage or economy, a negative price, and an unknown economy_unit all fail with invalid_input and are not charged after the engine rejects the request.

API usage, pricing, vehicle-budget workflows, and practical limits

Call the free in-browser annual fuel cost calculator for household planning, car-shopping comparisons, and classroom demos without installing a spreadsheet. Send a JSON body with annual_mileage, fuel_economy, and fuel_price, plus optional economy_unit and tank_size (or the documented aliases). Use the prepaid API when a dealer desk, fleet dashboard, insurance quote, or personal-finance app needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance. Pair this endpoint with a fuel-economy converter when the window sticker is in litres per one hundred kilometres but your mileage log is in miles—convert first, then call here with matching units. For two vehicles, call twice at the same fuel_price and the same annual_mileage so the cost_per_distance fields are comparable. This calculator is a yearly running-cost slice, not a single-trip estimator: trip distance and one-journey cost belong on a different landing. Authors shipping SDKs can map annual_fuel_cost and monthly_fuel_cost into tables that sit next to insurance, parking, and service—the same shape drivers see on a simple total-cost-of-ownership sheet.

How do I estimate yearly fuel spending with this calculator?

Send JSON with annual_mileage, fuel_economy, and fuel_price. Optional economy_unit is mpg (default), km_per_l, l_per_100km, or gal_per_100mi. The response includes annual_fuel_volume, annual_fuel_cost, and monthly, weekly, and daily slices.

What is the difference between mpg and L/100km in this tool?

mpg and km_per_l treat economy as distance per unit of fuel, so volume is mileage divided by economy. l_per_100km and gal_per_100mi treat economy as volume per 100 units of distance, so volume is mileage times economy divided by 100.

What happens if annual mileage or fuel economy is zero or negative?

The request fails with invalid_input. Non-positive mileage or fuel_economy is rejected so the engine never divides by zero or returns a nonsense yearly bill.

Read the full KIT documentation →