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

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.

Inputs of Ledgerly Rent vs Buy Calculator
FieldTypeDefaultDescription
currencytext"EUR"Currency. ISO code used for the labels, e.g. EUR, USD, CHF.
homePricenumber380000Purchase price of the home
downPaymentPercentnumber20Down payment (% of the price)
buyingCostsPercentnumber10Buying costs (% of the price). Transfer tax, notary, land registry and agent fee, paid in cash on top of the down payment.
mortgageRatePercentnumber3.6Mortgage interest rate (% per year)
mortgageYearsinteger30Mortgage term (years)
propertyTaxPercentnumber0.3Property tax (% of the home value per year)
maintenancePercentnumber1Maintenance (% of the home value per year)
ownerInsurancePerYearnumber600Home insurance per year
ownerFeesPerMonthnumber0Other owner costs per month. For example service charges or a home-owners association fee that is not maintenance.
appreciationPercentnumber2Home price growth (% per year)
sellingCostsPercentnumber6Selling costs at the end (% of the value)
saleGainTaxPercentnumber0Tax on the gain when selling (%). Often 0 for an owner-occupied home; enter your local rate if a gain is taxed.
rentPerMonthnumber1450Rent per month (comparable home)
rentIncreasePercentnumber2.5Rent increase (% per year)
renterInsurancePerYearnumber150Renter’s insurance per year
costIncreasePercentnumber2Increase of insurance and fees (% per year)
investmentReturnPercentnumber5Return on invested savings (% per year). The opportunity cost: what the down payment and every monthly difference would earn if invested instead.
investmentTaxPercentnumber25Tax on investment gains (%)
horizonYearsinteger30Years to compare
scenarioStepPercentnumber1Scenario 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)

{
  "mcpServers": {
    "ledgerly-rent-vs-buy": { "type": "http", "url": "https://ledgerlyrentvsbuy.usefulweb.app/mcp" }
  }
}