CarsXECarsXE

Product page: Vehicle Total Cost of Ownership

Vehicle Total Cost of Ownership

Estimate how much a vehicle will depreciate and what a driver can expect to spend on energy, insurance, maintenance and registration. The default projection covers five years. All amounts are in constant US dollars.

Vehicle TCO requires an enabled account with a configured credit price, plan allowance or billable invoice rate. Each successful report counts as one TCO lookup, including repeat requests for the same VIN. Contact sales for access.

Who uses this API

Lenders can use the running costs alongside a borrower's loan payment. Marketplaces and fintech apps can show shoppers how annual mileage and location affect the cost of owning a particular vehicle.

Project ownership costs

GET /v1/vehicle/tcoTry Vehicle Total Cost of Ownership

Send the parameters in the query string. Keep the API key on your server.

ParameterRequiredDescription
keyYesCarsXE API key for the enabled account.
vinYes17-character VIN with a valid check digit.
zipYesAssigned five-digit US ZIP code. Preserve leading zeros.
annual_milesYesEstimated miles driven per year, an integer from 0 to 1,000,000.
yearsNoProjection horizon, an integer from 1 to 30. Defaults to 5.

Project costs for a Toyota Camry

Code
curl --get 'https://api.carsxe.com/v1/vehicle/tco' \
  --data-urlencode "key=${CARSXE_API_KEY}" \
  --data-urlencode 'vin=4T1BF1FK6HU280187' \
  --data-urlencode 'zip=20878' \
  --data-urlencode 'annual_miles=12000'

Read the projection

In a November 2026 verification run, the 2017 Camry in the example returned the following summary. Estimates can change as the vehicle ages and regional prices change.

{
  "success": true,
  "tco_summary": {
    "years": 5,
    "total_cost": 25864,
    "total_5yr_cost": 25864,
    "monthly_average": 431,
    "cost_percentile_vs_segment": 75,
    "peer_count": 4,
    "interpretation": "Cheaper to own than 25% of sedan reference models",
    "comparison_basis": "CarsXE reference models projected at the same ZIP, mileage and horizon"
  }
}

For depreciation, the API first looks up the CarsXE year, make and model with the decoded trim, then without it. It retries powertrain-suffixed models with the suffix removed before checking the base price in the VIN specifications. Read cost_breakdown.depreciation.assumptions.msrp_source to distinguish a trim match, a model-level price and a VIN-specific price. The Camry used a model-level MSRP of 23,070 USD.

Each entry in cost_breakdown includes its total, annual_avg, pct_of_total and assumptions.

ComponentFive-year cost in the exampleHow to interpret it
depreciation3,260 USDEstimated loss in vehicle value. Check the starting value, MSRP source and whether a collateral curve or linear fallback was used.
fuel8,722 USDGasoline, diesel or electricity for the stated mileage. The Camry used 25.5 combined MPG and a regional price of 3.707 USD per gallon.
insurance8,838 USDState average premium adjusted for vehicle segment. An individual driver's quote can differ.
maintenance4,234 USDAnnual make or fallback estimate, adjusted for the vehicle's age in each projected year.
registration_fees810 USDState estimate or national fallback, with an EV surcharge where modeled. Check assumptions.method.

The five totals add to 25,864 USD. Dividing by 60 months and rounding gives 431 USD. Use total_cost for any horizon. The API also returns total_5yr_cost when years is five.

For a monthly cash budget, combine the loan payment with the four running-cost components. Adding the full monthly_average to a loan payment would also include depreciation, which measures a loss in asset value.

Compare vehicles and energy costs

Handle errors

HTTP statusWhat to do
400, 405Use GET and check the VIN, assigned ZIP, mileage and horizon.
401, 403Check the API key and Vehicle TCO access. Invoice accounts need a billable rate even when a usage cap is configured.
402Check the available credit balance.
404Check the VIN. The provider could not identify the vehicle.
422Check the weight class and whether the year/make/model catalog or VIN specifications supplied a positive MSRP. Vehicles in classes 3–8 and vehicles with insufficient specifications return an error before billing.
429Check the account's available TCO allowance.
500, 502Inspect the returned message for a usage-recording or VIN lookup failure.
503Retry when projection data is temporarily unavailable. An incomplete price lookup with no usable fallback returns this status before billing.

The interactive API reference contains the complete response schema. See the Errors guide for shared API error handling.