Inputs
| Field | Type | Valid domain |
|---|---|---|
| equipmentCost | float | 5,000 – 5,000,000 |
| loanRate | float | 0.02 – 0.25 |
| loanTermMonths | int | 12 – 84 |
| monthlyLeasePayment | float | 100 – 100,000 |
| leaseTermMonths | int | 12 – 84 |
| residualValuePct | float | 0 – 0.6 |
| marginalTaxRate | float | 0 – 0.37 |
- Costs are after-tax lifetime nominal dollars, undiscounted, and the two terms may differ — the loan-comparison time-value caveat applies. Straight-line depreciation to residual; accelerated schedules (MACRS/§179/bonus) excluded.
- Under this contract the tax rate rescales BOTH costs by (1 − marginalTaxRate) and can never change cheaperOption — taxes flip the real decision only through deduction timing and discounting, which are excluded (see spec).
All fields required. Out-of-domain values are rejected with per-field errors — never clamped. Unknown fields are rejected.
Live example — generated from the real engine
Request
POST /api/v1/models/equipment-lease-vs-buy
{
"equipmentCost": 2503000,
"loanRate": 0.14,
"loanTermMonths": 48,
"monthlyLeasePayment": 50000,
"leaseTermMonths": 48,
"residualValuePct": 0.3,
"marginalTaxRate": 0.19
}Response (chart arrays compacted)
{
"ok": true,
"model": "equipment-lease-vs-buy",
"specVersion": "1.0.0",
"contractUrl": "/api/v1/models/equipment-lease-vs-buy",
"specUrl": "/api/v1/models/equipment-lease-vs-buy/spec",
"inputs": {
"equipmentCost": 2503000,
"loanRate": 0.14,
"loanTermMonths": 48,
"monthlyLeasePayment": 50000,
"leaseTermMonths": 48,
"residualValuePct": 0.3,
"marginalTaxRate": 0.19
},
"outputs": {
"monthlyLoanPayment": 68398.17066710221,
"totalBuyOutlay": 3283112.192020906,
"totalInterest": 780112.1920209061,
"residualValue": 750900,
"netBuyCostPreTax": 2532212.192020906,
"afterTaxBuyCost": 2051091.875536934,
"totalLeaseOutlay": 2400000,
"afterTaxLeaseCost": 1944000.0000000002,
"cheaperOption": "lease",
"afterTaxSavings": 107091.87553693377
},
"sentinels": [],
"assumptions": [
"Implements model spec equipment-lease-vs-buy v1.0.0 (dual-implementation verified).",
"Costs are after-tax lifetime nominal dollars, undiscounted, and the two terms may differ — the loan-comparison time-value caveat applies. Straight-line depreciation to residual; accelerated schedules (MACRS/§179/bonus) excluded.",
"Under this contract the tax rate rescales BOTH costs by (1 − marginalTaxRate) and can never change cheaperOption — taxes flip the real decision only through deduction timing and discounting, which are excluded (see spec)."
],
"facts": [],
"record": {
"sha256": "2f34e5adf3cf3bbbcd20c195aa80db2f410755552a3be155870c1d666770ccb3",
"fields": [
"model",
"specVersion",
"inputs",
"outputs"
],
"howToVerify": "Store this record with any advice or agent output built on these numbers. To verify later: build {model, specVersion, inputs, outputs} from the stored response, serialize as JSON with object keys sorted recursively (no whitespace), and SHA-256 it — a match proves the numbers came from this spec version with these inputs, unaltered."
},
"disclaimer": "Illustrative planning model, not financial advice. Outputs follow the published model spec exactly; read the spec for assumptions and exclusions before relying on any number."
}This example is executed against the production engine when the page builds — it cannot drift from the API's real behavior.