API & MCP
Everything a person can do on Ledgerly Rent vs Buy Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ledgerlyrentvsbuy.usefulweb.app/api/v1/calculate– run Ledgerly Rent vs Buy CalculatorGET https://ledgerlyrentvsbuy.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Ledgerly Rent vs Buy Calculator
Simulates buying and renting month by month: mortgage schedule, buying and selling costs, property tax, maintenance, insurance, rent increases and the return the renter earns by investing the down payment and every monthly difference. Shows the break-even year, net worth on both sides, home-price scenarios and a sensitivity table. Part of Ledgerly’s Reality Check.
| Field | Type | Default | Description |
|---|---|---|---|
currency | text | "EUR" | Currency. ISO code used for the labels, e.g. EUR, USD, CHF. |
homePrice | number | 380000 | Purchase price of the home |
downPaymentPercent | number | 20 | Down payment (% of the price) |
buyingCostsPercent | number | 10 | Buying costs (% of the price). Transfer tax, notary, land registry and agent fee, paid in cash on top of the down payment. |
mortgageRatePercent | number | 3.6 | Mortgage interest rate (% per year) |
mortgageYears | integer | 30 | Mortgage term (years) |
propertyTaxPercent | number | 0.3 | Property tax (% of the home value per year) |
maintenancePercent | number | 1 | Maintenance (% of the home value per year) |
ownerInsurancePerYear | number | 600 | Home insurance per year |
ownerFeesPerMonth | number | 0 | Other owner costs per month. For example service charges or a home-owners association fee that is not maintenance. |
appreciationPercent | number | 2 | Home price growth (% per year) |
sellingCostsPercent | number | 6 | Selling costs at the end (% of the value) |
saleGainTaxPercent | number | 0 | Tax on the gain when selling (%). Often 0 for an owner-occupied home; enter your local rate if a gain is taxed. |
rentPerMonth | number | 1450 | Rent per month (comparable home) |
rentIncreasePercent | number | 2.5 | Rent increase (% per year) |
renterInsurancePerYear | number | 150 | Renter’s insurance per year |
costIncreasePercent | number | 2 | Increase of insurance and fees (% per year) |
investmentReturnPercent | number | 5 | Return on invested savings (% per year). The opportunity cost: what the down payment and every monthly difference would earn if invested instead. |
investmentTaxPercent | number | 25 | Tax on investment gains (%) |
horizonYears | integer | 30 | Years to compare |
scenarioStepPercent | number | 1 | Scenario step for home price growth (percentage points) |
Example request
€380k flat vs €1,450 rent, 20 % down, 30 years
curl -X POST https://ledgerlyrentvsbuy.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"currency":"EUR","homePrice":380000,"downPaymentPercent":20,"buyingCostsPercent":10,"mortgageRatePercent":3.6,"mortgageYears":30,"rentPerMonth":1450,"horizonYears":30}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://ledgerlyrentvsbuy.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ledgerly_rent_vs_buy - Local stdio connector:
node src/mcp-stdio.ts --tool=ledgerly-rent-vs-buy
{
"mcpServers": {
"ledgerly-rent-vs-buy": { "type": "http", "url": "https://ledgerlyrentvsbuy.usefulweb.app/mcp" }
}
}