# Rent versus buy calculator documentation

Inputs, formulas, assumptions and API/MCP examples for the rent versus buy calculator. Reproduce a calculation and cite its sources.

Canonical calculator: https://klarfort.com/tools/rent-vs-buy-calculator/
Content updated: 2026-09-07
Assumptions reviewed: 2026-09-07

## Overview
Compare modeled net wealth from renting or buying a home over one chosen period. The calculation includes mortgage payments, ownership costs, rent, transaction costs and returns on money left available to invest.

Both options start with the same funds and receive the same monthly cash budget. The renter invests the buyer's deposit and purchase costs, and whichever option has lower monthly costs invests the difference.

## How to use
1. Enter the home price, deposit, mortgage rate and term, then choose how long to compare the options.
2. Add purchase and sale costs, property tax, maintenance, insurance and service charges.
3. Enter starting rent, renter insurance, rent growth, home appreciation, investment return and cost inflation assumptions.
4. Calculate and compare end wealth, monthly costs, investments and the first modeled break-even month.

## Understanding the result
A positive headline means buying ends with more modeled wealth than renting; a negative value means renting ends with more. Buying wealth assumes a sale at the horizon after the entered selling costs and mortgage repayment.

Break-even is the first month buying wealth reaches renting wealth. It can reverse later, so inspect the timeline and final difference. An unavailable break-even means no crossing occurred within the chosen horizon.

## Questions
### Why does the renter have investments from the start?
The comparison gives both options equal starting funds. Money used by the buyer for the deposit and purchase costs is invested by the renter at the entered return assumption.

### Does a first break-even month mean buying stays ahead?
No. It marks only the first modeled crossing. Different growth and cost assumptions can cause the comparison to reverse later, which is visible in the monthly wealth table.

### Which costs are outside the comparison?
Capital-gains taxes and rent deposits are excluded. The model uses the purchase, sale, insurance, maintenance, service and property-tax inputs you enter, without country-specific tax or lending rules.

## Default worked example
Buying minus renting wealth: -17,040.9 USD. Buying minus renting net wealth at the same horizon, after hypothetical selling costs. Both sides invest cash-flow savings. Assumptions as of 2026-09-07.

## Formula
Buyer wealth = home sale proceeds - mortgage balance + investments; renter wealth = invested deposit, closing costs and monthly savings.

- Both options start with the same funds: the renter invests the buyer deposit and purchase costs.
- Each month both receive the larger housing cash outflow; the less expensive option invests the difference at month end.
- Property tax and maintenance track current property value. Insurance and service costs follow entered cost inflation.
- The buyer sells at the horizon using the entered selling-cost percentage; gains taxes and rent deposits are excluded.
- Break-even is the first modeled month when buying wealth reaches renting wealth; elapsed break-even years equal that month divided by 12. Both are null if no crossing occurs within the horizon, and later reversal remains possible.
- Return, appreciation and rent-growth assumptions have neutral zero defaults and are not forecasts.

## Inputs
- currency: Currency; default "USD"
- homePrice: Home purchase price; default 400000
- downPayment: Cash deposit; default 80000
- annualMortgageRate: Mortgage annual rate (%); default 5
- mortgageMonths: Mortgage term months; default 300
- horizonMonths: Comparison horizon months; default 120
- buyingCostsPercent: Purchase transaction costs (%); default 3
- sellingCostsPercent: Selling transaction costs (%); default 3
- homeAppreciation: Effective annual home appreciation (%); default 0
- monthlyRent: Starting monthly rent; default 1800
- rentGrowth: Effective annual rent growth (%); default 0
- investmentReturn: Effective annual investment return (%); default 0
- annualPropertyTaxPercent: Annual property tax (% of current value); default 0
- annualMaintenancePercent: Annual maintenance (% of current value); default 1
- annualHomeInsurance: Starting annual home insurance; default 1200
- monthlyServiceCharges: Starting monthly service charges; default 150
- annualRentersInsurance: Starting annual renter insurance; default 200
- costInflation: Effective annual insurance and service inflation (%); default 0

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

## JSON request body
```json
{
  "currency": "USD",
  "homePrice": 400000,
  "downPayment": 80000,
  "annualMortgageRate": 5,
  "mortgageMonths": 300,
  "horizonMonths": 120,
  "buyingCostsPercent": 3,
  "sellingCostsPercent": 3,
  "homeAppreciation": 0,
  "monthlyRent": 1800,
  "rentGrowth": 0,
  "investmentReturn": 0,
  "annualPropertyTaxPercent": 0,
  "annualMaintenancePercent": 1,
  "annualHomeInsurance": 1200,
  "monthlyServiceCharges": 150,
  "annualRentersInsurance": 200,
  "costInflation": 0
}
```

## 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)
