Free calculators
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.
Content updated . Assumptions reviewed .
Formula and assumptions
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.
Assumptions reviewed:
Sources
- KlarFort calculator methodology. KlarFort-authored arithmetic; free to use with credit.; vintage 1.
Parameters
View all 29 rows
| Name | Description | Type | Default | Minimum | Maximum |
|---|---|---|---|---|---|
| currency | Currency | string | "USD" | ||
| purchasePrice | Petrol vehicle purchase price | number | 30000 | 0 | 1,000,000,000 |
| downPayment | Cash deposit | number | 5000 | 0 | 1,000,000,000 |
| annualRate | Annual interest rate (%) | number | 6 | 0 | 100 |
| loanMonths | New vehicle loan months | integer | 60 | 1 | 600 |
| horizonMonths | Comparison horizon months | integer | 60 | 1 | 600 |
| powertrain | Vehicle for buy and lease comparison | string | "petrol" | ||
| annualDepreciationPercent | New vehicle annual depreciation (%) | number | 15 | 0 | 100 |
| annualInsurance | New vehicle annual insurance | number | 1200 | 0 | 1,000,000,000 |
| annualMaintenance | New vehicle annual maintenance | number | 600 | 0 | 1,000,000,000 |
| annualDistance | Annual distance (km) | number | 15000 | 0 | 1,000,000 |
| petrolLitresPer100 | Petrol litres per 100 km | number | 7 | 0 | 100 |
| petrolPrice | Petrol price per litre | number | 1.5 | 0 | 100 |
| evKWhPer100 | EV kWh per 100 km | number | 18 | 0 | 200 |
| electricityPrice | Electricity price per kWh | number | 0.2 | 0 | 100 |
| evPricePremium | EV price difference above petrol | number | 5000 | 0 | 1,000,000,000 |
| chargerCost | Upfront EV charger cost | number | 1000 | 0 | 1,000,000,000 |
| currentCarValue | Current car trade-in value | number | 10000 | 0 | 1,000,000,000 |
| currentLoanBalance | Current car loan balance | number | 5000 | 0 | 1,000,000,000 |
| currentLoanRate | Current car annual loan rate (%) | number | 5 | 0 | 100 |
| currentLoanMonths | Current loan remaining months | integer | 24 | 1 | 600 |
| currentDepreciationPercent | Current car annual depreciation (%) | number | 10 | 0 | 100 |
| currentAnnualInsurance | Current car annual insurance | number | 900 | 0 | 1,000,000,000 |
| currentAnnualMaintenance | Current car annual maintenance | number | 1200 | 0 | 1,000,000,000 |
| leaseMonthly | Monthly lease quote for this horizon | number | 450 | 0 | 1,000,000,000 |
| leaseUpfront | Lease upfront payment | number | 2000 | 0 | 1,000,000,000 |
| leaseEndFee | Lease end fee | number | 300 | 0 | 1,000,000,000 |
| leaseAnnualDistance | Lease annual km allowance | number | 15000 | 0 | 1,000,000 |
| leaseExcessDistanceFee | Lease charge per excess km | number | 0.15 | 0 | 100 |
JSON API
GET accepts one input parameter containing URL-encoded JSON. POST sends the JSON input object. Prefer POST for personal figures. Inputs are limited to 16 KiB. POST results are not stored; GET results may be cached for up to 24 hours.
curl -X POST https://klarfort.com/tools/api/v1/car-loan-calculator -H "Content-Type: application/json" --data '{"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}'fetch("https://klarfort.com/tools/api/v1/car-loan-calculator", {method:"POST", headers:{"Content-Type":"application/json"}, body:JSON.stringify({"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})})import json, urllib.request
request = urllib.request.Request("https://klarfort.com/tools/api/v1/car-loan-calculator", data=json.dumps({"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}).encode(), headers={"Content-Type":"application/json"})
print(urllib.request.urlopen(request).read().decode())Connected assistants
Connect using https://klarfort.com/tools/mcp. Discover this calculator with tools/list, then call car-loan-calculator. Protocol versions 2026-07-28 and 2025-11-25 are supported. Modern requests carry protocol metadata and matching HTTP headers. Set Mcp-Name to params.name for tools/call and to params.uri for resources/read. Older clients initialize first.
Limits: 120 requests per minute per address and approximately 3,000 per minute per edge location. Simulations are capped at 1,000 paths, 600 months and 150,000 path-months (paths multiplied by months). Shorten the duration or reduce paths when that work limit is exceeded. A limit response returns 429 and Retry-After. No exact remaining-request count is available.
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.
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. Links to individual calculators are optional.
Computed with KlarFort Calculators, https://klarfort.com/
The API returns this text in credit and the homepage in credit_url. The optional citation_url identifies the calculator for reference. See usage and credit for the full permission.
KlarFort is not financial, investment, tax, or legal advice. Verify outputs before making material decisions.