---
title: "Vehicle Total Cost of Ownership"
description: "Project vehicle ownership costs by VIN, US ZIP code and annual mileage. Read the five cost components, monthly average and comparable EV estimate."
canonical_url: "https://docs.carsxe.com/docs/products/vehicle-tco"
markdown_url: "https://docs.carsxe.com/docs/products/vehicle-tco.md"
last_updated: "1980-01-01"
x_farming_labs_generated_preamble: true
agent:
  task: "Estimate the cost of owning a vehicle over a selected number of years."
  outcome: "A successful request returns a whole-dollar projection with five cost components, their assumptions and an optional EV comparison."
  prerequisites:
    - "A server-side CarsXE API key for an account with Vehicle TCO enabled and a configured credit price, plan allowance or billable invoice rate."
    - "A 17-character VIN with a valid check digit, an assigned US ZIP code and estimated annual mileage."
  verification:
    - "Sum the five component totals and compare the result with tco_summary.total_cost."
    - "Check the fuel observation period and efficiency source before displaying the estimate."
  failureModes:
    - symptom: "The endpoint returns 403."
      resolution: "Confirm that Vehicle TCO is enabled for the account associated with the key."
    - symptom: "The endpoint returns 422."
      resolution: "Check whether the vehicle has a reported MSRP and is in a supported light-duty weight class."
---

# Vehicle Total Cost of Ownership
URL: /docs/products/vehicle-tco
LLM index: /llms.txt
Description: Project vehicle ownership costs by VIN, US ZIP code and annual mileage. Read the five cost components, monthly average and comparable EV estimate.
Related: /docs/products/market-value, /docs/products/collateral-score, /docs/guides/errors

<!-- farming-labs:agent-contract:start -->
## Agent Contract

Task: Estimate the cost of owning a vehicle over a selected number of years.
Outcome: A successful request returns a whole-dollar projection with five cost components, their assumptions and an optional EV comparison.

### Prerequisites

- A server-side CarsXE API key for an account with Vehicle TCO enabled and a configured credit price, plan allowance or billable invoice rate.
- A 17-character VIN with a valid check digit, an assigned US ZIP code and estimated annual mileage.

### Verification

- Sum the five component totals and compare the result with tco_summary.total_cost.
- Check the fuel observation period and efficiency source before displaying the estimate.

### Failure Modes

- The endpoint returns 403. — Recovery: Confirm that Vehicle TCO is enabled for the account associated with the key.
- The endpoint returns 422. — Recovery: Check whether the vehicle has a reported MSRP and is in a supported light-duty weight class.
<!-- farming-labs:agent-contract:end -->

Task: Estimate monthly and multi-year vehicle ownership costs for a US driver.
  Related: /docs/products/vehicle-tco, /docs/products/market-value,
  /docs/products/collateral-score

# 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.

<Note variant="warning">
  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](https://carsxe.com/contact) for access.
</Note>

## 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

<ApiPlayground
  method="GET"
  path="/v1/vehicle/tco"
  href="/api-reference/vehicle-tco/vehicle-total-cost-of-ownership-tco"
  label="Try Vehicle Total Cost of Ownership"
/>

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. |

<CodeGroup title="Project costs for a Toyota Camry" tag="GET" label="/v1/vehicle/tco">

```bash
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'
```

```javascript
const query = new URLSearchParams({
  key: process.env.CARSXE_API_KEY,
  vin: "4T1BF1FK6HU280187",
  zip: "20878",
  annual_miles: "12000",
});
const response = await fetch(`https://api.carsxe.com/v1/vehicle/tco?${query}`);
const report = await response.json();
if (!response.ok) throw new Error(report.message);
console.log(report.tco_summary.monthly_average);
```

</CodeGroup>

## 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.

```json
{
  "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_segment` is 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. Read `peer_count` with the percentile. When the comparison has fewer than two peers, the percentile and interpretation are `null`.
- **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_input` is 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 return `null` for 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](/api-reference/vehicle-tco/vehicle-total-cost-of-ownership-tco) contains the complete response schema. See the [Errors guide](/docs/guides/errors) for shared API error handling.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
