{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://klarfort.com/tools/rent-vs-buy-calculator/schema.json",
  "title": "Rent versus buy calculator",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "currency": {
      "type": "string",
      "title": "Currency",
      "description": "Currency",
      "enum": [
        "USD",
        "EUR",
        "GBP",
        "JPY",
        "CHF",
        "CAD",
        "AUD",
        "CNY",
        "INR",
        "MXN",
        "BRL",
        "SGD",
        "HKD",
        "SEK",
        "NOK",
        "DKK",
        "NZD",
        "ZAR",
        "KRW",
        "TRY",
        "PLN",
        "CZK",
        "HUF",
        "AED",
        "THB",
        "IDR",
        "MYR",
        "PHP"
      ],
      "default": "USD"
    },
    "homePrice": {
      "type": "number",
      "title": "Home purchase price",
      "description": "Home purchase price",
      "minimum": 0,
      "maximum": 1000000000,
      "default": 400000
    },
    "downPayment": {
      "type": "number",
      "title": "Cash deposit",
      "description": "Cash deposit",
      "minimum": 0,
      "maximum": 1000000000,
      "default": 80000
    },
    "annualMortgageRate": {
      "type": "number",
      "title": "Mortgage annual rate (%)",
      "description": "Mortgage annual rate (%)",
      "minimum": 0,
      "maximum": 100,
      "default": 5
    },
    "mortgageMonths": {
      "type": "integer",
      "title": "Mortgage term months",
      "description": "Mortgage term months",
      "minimum": 1,
      "maximum": 600,
      "default": 300
    },
    "horizonMonths": {
      "type": "integer",
      "title": "Comparison horizon months",
      "description": "Comparison horizon months",
      "minimum": 1,
      "maximum": 600,
      "default": 120
    },
    "buyingCostsPercent": {
      "type": "number",
      "title": "Purchase transaction costs (%)",
      "description": "Purchase transaction costs (%)",
      "minimum": 0,
      "maximum": 30,
      "default": 3
    },
    "sellingCostsPercent": {
      "type": "number",
      "title": "Selling transaction costs (%)",
      "description": "Selling transaction costs (%)",
      "minimum": 0,
      "maximum": 30,
      "default": 3
    },
    "homeAppreciation": {
      "type": "number",
      "title": "Effective annual home appreciation (%)",
      "description": "Effective annual home appreciation (%)",
      "minimum": -50,
      "maximum": 100,
      "default": 0
    },
    "monthlyRent": {
      "type": "number",
      "title": "Starting monthly rent",
      "description": "Starting monthly rent",
      "minimum": 0,
      "maximum": 1000000000,
      "default": 1800
    },
    "rentGrowth": {
      "type": "number",
      "title": "Effective annual rent growth (%)",
      "description": "Effective annual rent growth (%)",
      "minimum": -50,
      "maximum": 100,
      "default": 0
    },
    "investmentReturn": {
      "type": "number",
      "title": "Effective annual investment return (%)",
      "description": "Effective annual investment return (%)",
      "minimum": -50,
      "maximum": 100,
      "default": 0
    },
    "annualPropertyTaxPercent": {
      "type": "number",
      "title": "Annual property tax (% of current value)",
      "description": "Annual property tax (% of current value)",
      "minimum": 0,
      "maximum": 20,
      "default": 0
    },
    "annualMaintenancePercent": {
      "type": "number",
      "title": "Annual maintenance (% of current value)",
      "description": "Annual maintenance (% of current value)",
      "minimum": 0,
      "maximum": 20,
      "default": 1
    },
    "annualHomeInsurance": {
      "type": "number",
      "title": "Starting annual home insurance",
      "description": "Starting annual home insurance",
      "minimum": 0,
      "maximum": 1000000000,
      "default": 1200
    },
    "monthlyServiceCharges": {
      "type": "number",
      "title": "Starting monthly service charges",
      "description": "Starting monthly service charges",
      "minimum": 0,
      "maximum": 1000000000,
      "default": 150
    },
    "annualRentersInsurance": {
      "type": "number",
      "title": "Starting annual renter insurance",
      "description": "Starting annual renter insurance",
      "minimum": 0,
      "maximum": 1000000000,
      "default": 200
    },
    "costInflation": {
      "type": "number",
      "title": "Effective annual insurance and service inflation (%)",
      "description": "Effective annual insurance and service inflation (%)",
      "minimum": -50,
      "maximum": 100,
      "default": 0
    }
  },
  "required": [
    "currency",
    "homePrice",
    "downPayment",
    "annualMortgageRate",
    "mortgageMonths",
    "horizonMonths",
    "buyingCostsPercent",
    "sellingCostsPercent",
    "homeAppreciation",
    "monthlyRent",
    "rentGrowth",
    "investmentReturn",
    "annualPropertyTaxPercent",
    "annualMaintenancePercent",
    "annualHomeInsurance",
    "monthlyServiceCharges",
    "annualRentersInsurance",
    "costInflation"
  ]
}