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
Send the parameters in the query string. Keep the API key on your server.
| Parameter | Required | Description |
|---|---|---|
key | Yes | CarsXE API key for the enabled account. |
vin | Yes | 17-character VIN with a valid check digit. |
zip | Yes | Assigned five-digit US ZIP code. Preserve leading zeros. |
annual_miles | Yes | Estimated miles driven per year, an integer from 0 to 1,000,000. |
years | No | Projection horizon, an integer from 1 to 30. Defaults to 5. |
Project costs for a Toyota Camry
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.
| Component | Five-year cost in the example | How to interpret it |
|---|---|---|
depreciation | 3,260 USD | Estimated loss in vehicle value. Check the starting value, MSRP source and whether a collateral curve or linear fallback was used. |
fuel | 8,722 USD | Gasoline, diesel or electricity for the stated mileage. The Camry used 25.5 combined MPG and a regional price of 3.707 USD per gallon. |
insurance | 8,838 USD | State average premium adjusted for vehicle segment. An individual driver's quote can differ. |
maintenance | 4,234 USD | Annual make or fallback estimate, adjusted for the vehicle's age in each projected year. |
registration_fees | 810 USD | State 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
- Segment percentile.
cost_percentile_vs_segmentis the rounded percentage of same-segment reference models that cost the same or less than the input vehicle under the same assumptions. A higher percentile means higher relative ownership costs. The Camry's 75 means three of the four sedan reference models cost the same or less. Readpeer_countwith the percentile. When the comparison has fewer than two peers, the percentile and interpretation arenull. - Electricity and fuel. Battery EV estimates use kWh per 100 miles and state residential electricity prices. Plug-in hybrids split miles between electricity and fuel. The fuel assumptions identify efficiency sources, the electric-mile share where applicable, and EIA price observation periods. The service refreshes prices weekly and holds them constant over the projection.
- EV comparison. For an eligible combustion vehicle with a same-segment EV reference,
ev_comparison.delta_vs_inputis the EV total minus the input vehicle's total. In the Camry example, the reference Leaf cost 24,877 USD over five years, a difference of −987 USD. EVs, plug-in hybrids and vehicles without an eligible reference returnnullfor this comparison.
Handle errors
| HTTP status | What to do |
|---|---|
400, 405 | Use GET and check the VIN, assigned ZIP, mileage and horizon. |
401, 403 | Check the API key and Vehicle TCO access. Invoice accounts need a billable rate even when a usage cap is configured. |
402 | Check the available credit balance. |
404 | Check the VIN. The provider could not identify the vehicle. |
422 | Check 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. |
429 | Check the account's available TCO allowance. |
500, 502 | Inspect the returned message for a usage-recording or VIN lookup failure. |
503 | Retry 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.
Project vehicle ownership costs by VIN, US ZIP code and annual mileage. Read the five cost components, monthly average and comparable EV estimate.