Car total cost of ownership calculator
A purchase price is only the beginning of what a car costs. This total cost of ownership calculator combines the vehicle price with fuel, insurance, maintenance, and depreciation across the number of years you expect to keep it.
Run — free
Enter estimates in one consistent currency and supply mileage, fuel economy, and fuel price assumptions. The result shows each component separately, the estimated value remaining at the end, the combined ownership total, and an average annual cost for easier comparisons between vehicles.
Build a complete ownership estimate
A useful car comparison needs a shared time horizon and consistent assumptions. Start with the amount paid for the vehicle, then choose how many whole years you plan to own it. Add expected annual mileage, real-world fuel efficiency in miles per US gallon, and an average price per gallon. Insurance and maintenance should be entered as annual amounts in the same currency as the purchase price. The calculator expands those recurring amounts across the ownership period and keeps each category visible in the response. That breakdown matters because two cars with similar sticker prices can create very different ongoing expenses. A cheaper model with poor fuel economy or unusually high insurance can overtake a more expensive alternative over several years. Use realistic rather than best-case figures: recent annual mileage, an insurance quote for the exact model, and a maintenance allowance informed by its age and warranty provide a more defensible estimate. Because every monetary field is currency-neutral, the calculator works with dollars, euros, pounds, or another currency as long as you never mix units within one calculation. The combined total follows the stated formula and includes purchase and depreciation as distinct requested components.
Understand fuel and depreciation calculations
Fuel cost begins with total distance: annual miles multiplied by ownership years. Dividing that distance by fuel efficiency gives estimated gallons consumed, and multiplying gallons by the selected fuel price gives the period fuel cost. This approach assumes mileage, efficiency, and fuel price remain constant, so it is a planning baseline rather than a forecast of pump prices. Depreciation uses a declining-balance method. Each year, the annual percentage is applied to the vehicle value remaining after the previous year, not repeatedly to the original price. For example, a rate of ten percent leaves ninety percent of the prior value after each year. The reported depreciation cost is the original purchase price minus that estimated residual value. A zero percent rate keeps residual value equal to purchase price, while a one hundred percent rate reduces the modeled residual value to zero after the first year. Real resale values depend on mileage, condition, trim, demand, accidents, and local markets, so the rate is deliberately an input rather than an external lookup. Try conservative and optimistic rates to see how sensitive the result is. Calculations retain full precision internally, then round displayed quantities using the requested precision.
Compare scenarios without hiding assumptions
The strongest use of a total ownership calculation is comparison. Run the same ownership years and annual mileage for every candidate, keep fuel price assumptions equal, and change only facts that genuinely differ, such as efficiency, insurance quotes, expected maintenance, purchase price, and depreciation rate. The component fields show what drives the gap, while average annual cost turns a multi-year total into a number that is easier to place beside a yearly transportation budget. You can also test one vehicle under several futures: lower and higher mileage, a range of fuel prices, or different maintenance allowances after a warranty ends. Save the inputs with the result so another person can reproduce the estimate and challenge a particular assumption instead of debating an unexplained total. This calculator intentionally does not infer financing interest, taxes, registration, parking, charging, inflation, rebates, or opportunity cost. If those items matter, add them in a separate budgeting step and document them consistently for every candidate. The result is not a promise about what ownership will cost; it is a transparent arithmetic model. Via the API, each calculation costs $0.002, making it practical to evaluate many consistent scenarios in a vehicle selection workflow.
What you can do with it
Compare two cars
Hold years and mileage constant, then compare how price, efficiency, insurance, maintenance, and depreciation change the total.
Plan a household vehicle budget
Convert a multi-year ownership estimate into an average annual amount and inspect each cost component.
Test high- and low-mileage scenarios
Run several mileage and fuel-price assumptions to understand how driving patterns affect ownership cost.
FAQ
What does one API calculation cost?
Each API request costs $0.002; the browser calculator can be run free on this page.
Which currency should I use?
Use any currency, but enter the purchase price and every recurring cost in that same currency.
How is fuel cost calculated?
Total miles are divided by miles per US gallon, then multiplied by the price per gallon.
How is depreciation calculated?
The annual percentage compounds against the remaining value, and depreciation cost is purchase price minus estimated residual value.
Does the estimate include financing or taxes?
No. It includes only purchase, fuel, insurance, maintenance, and modeled depreciation; add other costs separately.
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/travel/total-cost-ownership \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"purchase_price":32000,"years":5,"annual_miles":12000,"fuel_efficiency_mpg":30,"fuel_price_per_gallon":3.5,"annual_insurance":1600,"annual_maintenance":900,"annual_depreciation_rate":15}'const res = await fetch("https://api.kit.forhosting.com/travel/total-cost-ownership", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"purchase_price": 32000,
"years": 5,
"annual_miles": 12000,
"fuel_efficiency_mpg": 30,
"fuel_price_per_gallon": 3.5,
"annual_insurance": 1600,
"annual_maintenance": 900,
"annual_depreciation_rate": 15
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/travel/total-cost-ownership",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"purchase_price": 32000,
"years": 5,
"annual_miles": 12000,
"fuel_efficiency_mpg": 30,
"fuel_price_per_gallon": 3.5,
"annual_insurance": 1600,
"annual_maintenance": 900,
"annual_depreciation_rate": 15
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/travel/total-cost-ownership", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"purchase_price":32000,"years":5,"annual_miles":12000,"fuel_efficiency_mpg":30,"fuel_price_per_gallon":3.5,"annual_insurance":1600,"annual_maintenance":900,"annual_depreciation_rate":15}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"purchase_price":32000,"years":5,"annual_miles":12000,"fuel_efficiency_mpg":30,"fuel_price_per_gallon":3.5,"annual_insurance":1600,"annual_maintenance":900,"annual_depreciation_rate":15}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/travel/total-cost-ownership", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"purchase_price": 32000,
"years": 5,
"annual_miles": 12000,
"fuel_efficiency_mpg": 30,
"fuel_price_per_gallon": 3.5,
"annual_insurance": 1600,
"annual_maintenance": 900,
"annual_depreciation_rate": 15
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "travel.total_cost_ownership",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_money | 1000000000000 |
max_years | 100 |
max_annual_miles | 1000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |