# Car loan, lease and ownership calculator documentation

Inputs, formulas, assumptions and API/MCP examples for the car loan, lease and ownership calculator. Reproduce a calculation and cite its sources.

Canonical calculator: https://klarfort.com/tools/car-loan-calculator/
Content updated: 2026-09-07
Assumptions reviewed: 2026-09-07

## Overview
Compare the total modeled cost of buying a petrol car, buying an electric vehicle, leasing or keeping your current car. Each option uses the same comparison period and includes relevant running costs.

The purchase comparison accounts for your current car value and remaining debt. It includes the new vehicle value and any unpaid loan balance at the end, so a low monthly payment is only part of the picture.

## How to use
1. Enter the petrol purchase price, cash deposit, loan rate and term, then choose the comparison period.
2. Add your current car value, outstanding loan, depreciation, insurance and maintenance costs.
3. Enter annual distance, petrol and electricity use, local energy prices and any electric vehicle price premium or charger cost.
4. Add a lease quote that covers the same period, including its distance allowance and fees, then compare all four options.

## Understanding the result
The headline is total buying cost for the selected powertrain. The comparison table also shows petrol, electric, lease and keep-current-car costs over the same horizon.

Ending equity is vehicle value less remaining debt. Negative equity on your current car increases the amount financed for a purchase. A negative cost difference means the first named option costs less in this model.

## Questions
### Why compare total ownership cost as well as the loan payment?
A payment alone leaves out depreciation, running expenses and the remaining car value or debt. Total ownership cost includes these entered assumptions over the same period for each option.

### How are electric and petrol cars compared?
The model uses your distance, consumption and energy prices, plus the electric vehicle price premium and charger cost. Both new cars use the same entered depreciation, maintenance and insurance assumptions.

### Can I use a lease with a different term from the comparison?
Enter a quote covering the full comparison horizon. The calculator multiplies the monthly quote by that horizon and adds upfront, end and excess-distance fees. It does not renew or renegotiate a shorter lease.

## Default worked example
Buying total ownership cost: 36,763.2 USD. Costs compare the same horizon, including finance balances and vehicle values at the end. Assumptions as of 2026-09-07.

## Formula
Ownership cost = initial equity committed + payments + running costs + ending debt - ending car value.

- All options use the same horizon; loan balances and vehicle resale values are included at that date.
- The current car is traded for a purchase; positive excess trade equity remains cash and negative equity increases financing.
- Leasing assumes sale of the current car with its net equity retained, and an entered lease quote covering the comparison horizon.
- The current car uses the entered petrol consumption; new EV and petrol cars share the entered depreciation, maintenance and insurance assumptions.
- Cash retained across alternatives earns no modeled investment return.
- No tax credits, transaction taxes or manufacturer offers are assumed.

## Inputs
- currency: Currency; default "USD"
- purchasePrice: Petrol vehicle purchase price; default 30000
- downPayment: Cash deposit; default 5000
- annualRate: Annual interest rate (%); default 6
- loanMonths: New vehicle loan months; default 60
- horizonMonths: Comparison horizon months; default 60
- powertrain: Vehicle for buy and lease comparison; default "petrol"
- annualDepreciationPercent: New vehicle annual depreciation (%); default 15
- annualInsurance: New vehicle annual insurance; default 1200
- annualMaintenance: New vehicle annual maintenance; default 600
- annualDistance: Annual distance (km); default 15000
- petrolLitresPer100: Petrol litres per 100 km; default 7
- petrolPrice: Petrol price per litre; default 1.5
- evKWhPer100: EV kWh per 100 km; default 18
- electricityPrice: Electricity price per kWh; default 0.2
- evPricePremium: EV price difference above petrol; default 5000
- chargerCost: Upfront EV charger cost; default 1000
- currentCarValue: Current car trade-in value; default 10000
- currentLoanBalance: Current car loan balance; default 5000
- currentLoanRate: Current car annual loan rate (%); default 5
- currentLoanMonths: Current loan remaining months; default 24
- currentDepreciationPercent: Current car annual depreciation (%); default 10
- currentAnnualInsurance: Current car annual insurance; default 900
- currentAnnualMaintenance: Current car annual maintenance; default 1200
- leaseMonthly: Monthly lease quote for this horizon; default 450
- leaseUpfront: Lease upfront payment; default 2000
- leaseEndFee: Lease end fee; default 300
- leaseAnnualDistance: Lease annual km allowance; default 15000
- leaseExcessDistanceFee: Lease charge per excess km; default 0.15

## Interfaces
Input schema: https://klarfort.com/tools/car-loan-calculator/schema.json
Worked request and response: https://klarfort.com/tools/car-loan-calculator/examples.json
Public table: https://klarfort.com/tools/car-loan-calculator/table.json
JSON API: POST https://klarfort.com/tools/api/v1/car-loan-calculator
MCP endpoint: POST https://klarfort.com/tools/mcp
MCP tool name: car-loan-calculator

## JSON request body
```json
{
  "currency": "USD",
  "purchasePrice": 30000,
  "downPayment": 5000,
  "annualRate": 6,
  "loanMonths": 60,
  "horizonMonths": 60,
  "powertrain": "petrol",
  "annualDepreciationPercent": 15,
  "annualInsurance": 1200,
  "annualMaintenance": 600,
  "annualDistance": 15000,
  "petrolLitresPer100": 7,
  "petrolPrice": 1.5,
  "evKWhPer100": 18,
  "electricityPrice": 0.2,
  "evPricePremium": 5000,
  "chargerCost": 1000,
  "currentCarValue": 10000,
  "currentLoanBalance": 5000,
  "currentLoanRate": 5,
  "currentLoanMonths": 24,
  "currentDepreciationPercent": 10,
  "currentAnnualInsurance": 900,
  "currentAnnualMaintenance": 1200,
  "leaseMonthly": 450,
  "leaseUpfront": 2000,
  "leaseEndFee": 300,
  "leaseAnnualDistance": 15000,
  "leaseExcessDistanceFee": 0.15
}
```

## Usage and credit
Free for personal, commercial and any other lawful use with credit to KlarFort at https://klarfort.com/. Third-party data terms still apply.

Computed with KlarFort Calculators, https://klarfort.com/

Place a visible credit near the reused material or in the credits for your work or integration. One clear credit per work or integration is sufficient; no separate credit per API request is required. The credit_url field contains the homepage. The citation_url field is an optional calculator reference. Full permission: https://klarfort.com/tools/docs/license/

## Sources
KlarFort calculator methodology: https://klarfort.com/tools/methodology/ (1)
