Skip to content

Mortgage · Calculation

Full mortgage payment (PITI and mortgage insurance)

Break down a purchase price, down payment, loan terms, annual tax, homeowners insurance and entered mortgage-insurance rate. The base mortgage calculation takes a home price for loanAmount. Select payoff-schedule to compare the same fixed principal on monthly or biweekly terms and return its source amortization schedules.

Standard payment (PITI) · Example result · monthlyPayment: 1285 USD/month See output

Monthly payoff with extra payments · Example result · schedule.interestSaved: 27.3 USD over the payoff period See output

Biweekly payoff with extra payments · Example result · schedule.interestSaved: 26.54 USD over the payoff period See output

Cost per success
2 calculation credits
Production plans
Standard, Business, Scale, Enterprise
Plan allowances
Free sandbox
Not available

Integration example

Make a request

Use a production key scoped to mortgage-payment-piti.

Keep the key on your server. A successful call uses 2 calculation credits.

Principal, interest, taxes and insurance

Set HT_PRODUCTION_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.

import { randomUUID } from "node:crypto";

const key = process.env.HT_PRODUCTION_KEY;
if (!key) throw new Error("Set HT_PRODUCTION_KEY on your server.");
const endpoint = "https://calc.hasstechapi.com/v2/calc/mortgage-payment-piti";
const input = {
  "params": {
    "loanAmount": 300000,
    "downPayment": 30000,
    "interestRate": 0,
    "loanTerm": 30,
    "loanTermMonths": 360,
    "propertyTax": 3600,
    "homeInsurance": 1200,
    "pmi": 0.6,
    "financedFees": 0,
    "financeProgramUpfrontFee": false
  },
  "loanType": "MORTGAGE",
  "options": {
    "propertyValue": 300000
  }
};
const requestId = process.env.HT_REQUEST_ID || Date.now() + "." + randomUUID();
// Keep this ID to look up usage if the connection is interrupted.
console.error("Usage lookup ID:", requestId);

const response = await fetch(endpoint, {
  method: "POST",
  redirect: "error",
  headers: {
    "Authorization": "Bearer " + key,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId
  },
  body: JSON.stringify(input)
});
if (!response.ok) {
  const problem = await response.json().catch(() => null);
  const code = problem?.error?.code || response.statusText;
  const delay = response.headers.get("retry-after");
  if (delay) console.error("Retry-After (seconds):", delay);
  console.error("HTTP " + response.status + " " + code + ". Usage lookup ID: " + requestId);
  if (Array.isArray(problem?.error?.details)) {
    for (const issue of problem.error.details) console.error("Input issue:", JSON.stringify(issue));
  }
  process.exitCode = 1;
} else {
  console.log(JSON.stringify(await response.json(), null, 2));
}
cURL (shell)

Set HT_PRODUCTION_KEY on your server. Run in a POSIX shell with cURL 7.76+ and Python 3.7+ to create a request ID.

(
  set -eu
  : "${HT_PRODUCTION_KEY:?Set HT_PRODUCTION_KEY on your server}"
  request_id="${HT_REQUEST_ID:-}"
  if [ -z "$request_id" ]; then
    request_id=$(python3 -c 'import time, uuid; print(str(time.time_ns() // 1000000) + "." + str(uuid.uuid4()))')
  fi
  printf 'Usage lookup ID: %s\n' "$request_id" >&2
  # On INVALID_INPUT, read error.details in the JSON response body.
  curl --disable --silent --show-error --fail-with-body --include \
    --request POST 'https://calc.hasstechapi.com/v2/calc/mortgage-payment-piti' \
    --header "Authorization: Bearer $HT_PRODUCTION_KEY" \
    --header 'Content-Type: application/json' \
    --header "Idempotency-Key: $request_id" \
    --data-binary @- <<'HT_INPUT'
{
  "params": {
    "loanAmount": 300000,
    "downPayment": 30000,
    "interestRate": 0,
    "loanTerm": 30,
    "loanTermMonths": 360,
    "propertyTax": 3600,
    "homeInsurance": 1200,
    "pmi": 0.6,
    "financedFees": 0,
    "financeProgramUpfrontFee": false
  },
  "loanType": "MORTGAGE",
  "options": {
    "propertyValue": 300000
  }
}
HT_INPUT
)

Monthly payments with recurring, annual and month-12 extra principal

Set HT_PRODUCTION_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.

import { randomUUID } from "node:crypto";

const key = process.env.HT_PRODUCTION_KEY;
if (!key) throw new Error("Set HT_PRODUCTION_KEY on your server.");
const endpoint = "https://calc.hasstechapi.com/v2/calc/mortgage-payment-piti";
const input = {
  "mode": "payoff-schedule",
  "schedule": {
    "principal": 2400,
    "ratePercent": 6,
    "termMonths": 24,
    "monthlyExtra": 10,
    "yearlyExtra": 120,
    "oneTimeExtra": 180,
    "oneTimeExtraMonth": 12,
    "payoffFrequency": "monthly"
  }
};
const requestId = process.env.HT_REQUEST_ID || Date.now() + "." + randomUUID();
// Keep this ID to look up usage if the connection is interrupted.
console.error("Usage lookup ID:", requestId);

const response = await fetch(endpoint, {
  method: "POST",
  redirect: "error",
  headers: {
    "Authorization": "Bearer " + key,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId
  },
  body: JSON.stringify(input)
});
if (!response.ok) {
  const problem = await response.json().catch(() => null);
  const code = problem?.error?.code || response.statusText;
  const delay = response.headers.get("retry-after");
  if (delay) console.error("Retry-After (seconds):", delay);
  console.error("HTTP " + response.status + " " + code + ". Usage lookup ID: " + requestId);
  if (Array.isArray(problem?.error?.details)) {
    for (const issue of problem.error.details) console.error("Input issue:", JSON.stringify(issue));
  }
  process.exitCode = 1;
} else {
  console.log(JSON.stringify(await response.json(), null, 2));
}
cURL (shell)

Set HT_PRODUCTION_KEY on your server. Run in a POSIX shell with cURL 7.76+ and Python 3.7+ to create a request ID.

(
  set -eu
  : "${HT_PRODUCTION_KEY:?Set HT_PRODUCTION_KEY on your server}"
  request_id="${HT_REQUEST_ID:-}"
  if [ -z "$request_id" ]; then
    request_id=$(python3 -c 'import time, uuid; print(str(time.time_ns() // 1000000) + "." + str(uuid.uuid4()))')
  fi
  printf 'Usage lookup ID: %s\n' "$request_id" >&2
  # On INVALID_INPUT, read error.details in the JSON response body.
  curl --disable --silent --show-error --fail-with-body --include \
    --request POST 'https://calc.hasstechapi.com/v2/calc/mortgage-payment-piti' \
    --header "Authorization: Bearer $HT_PRODUCTION_KEY" \
    --header 'Content-Type: application/json' \
    --header "Idempotency-Key: $request_id" \
    --data-binary @- <<'HT_INPUT'
{
  "mode": "payoff-schedule",
  "schedule": {
    "principal": 2400,
    "ratePercent": 6,
    "termMonths": 24,
    "monthlyExtra": 10,
    "yearlyExtra": 120,
    "oneTimeExtra": 180,
    "oneTimeExtraMonth": 12,
    "payoffFrequency": "monthly"
  }
}
HT_INPUT
)

Biweekly drafts with monthly extra principal and excluded annual and one-time extras

Set HT_PRODUCTION_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.

import { randomUUID } from "node:crypto";

const key = process.env.HT_PRODUCTION_KEY;
if (!key) throw new Error("Set HT_PRODUCTION_KEY on your server.");
const endpoint = "https://calc.hasstechapi.com/v2/calc/mortgage-payment-piti";
const input = {
  "mode": "payoff-schedule",
  "schedule": {
    "principal": 2400,
    "ratePercent": 6,
    "termMonths": 24,
    "monthlyExtra": 10,
    "yearlyExtra": 120,
    "oneTimeExtra": 180,
    "oneTimeExtraMonth": 12,
    "payoffFrequency": "biweekly"
  }
};
const requestId = process.env.HT_REQUEST_ID || Date.now() + "." + randomUUID();
// Keep this ID to look up usage if the connection is interrupted.
console.error("Usage lookup ID:", requestId);

const response = await fetch(endpoint, {
  method: "POST",
  redirect: "error",
  headers: {
    "Authorization": "Bearer " + key,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId
  },
  body: JSON.stringify(input)
});
if (!response.ok) {
  const problem = await response.json().catch(() => null);
  const code = problem?.error?.code || response.statusText;
  const delay = response.headers.get("retry-after");
  if (delay) console.error("Retry-After (seconds):", delay);
  console.error("HTTP " + response.status + " " + code + ". Usage lookup ID: " + requestId);
  if (Array.isArray(problem?.error?.details)) {
    for (const issue of problem.error.details) console.error("Input issue:", JSON.stringify(issue));
  }
  process.exitCode = 1;
} else {
  console.log(JSON.stringify(await response.json(), null, 2));
}
cURL (shell)

Set HT_PRODUCTION_KEY on your server. Run in a POSIX shell with cURL 7.76+ and Python 3.7+ to create a request ID.

(
  set -eu
  : "${HT_PRODUCTION_KEY:?Set HT_PRODUCTION_KEY on your server}"
  request_id="${HT_REQUEST_ID:-}"
  if [ -z "$request_id" ]; then
    request_id=$(python3 -c 'import time, uuid; print(str(time.time_ns() // 1000000) + "." + str(uuid.uuid4()))')
  fi
  printf 'Usage lookup ID: %s\n' "$request_id" >&2
  # On INVALID_INPUT, read error.details in the JSON response body.
  curl --disable --silent --show-error --fail-with-body --include \
    --request POST 'https://calc.hasstechapi.com/v2/calc/mortgage-payment-piti' \
    --header "Authorization: Bearer $HT_PRODUCTION_KEY" \
    --header 'Content-Type: application/json' \
    --header "Idempotency-Key: $request_id" \
    --data-binary @- <<'HT_INPUT'
{
  "mode": "payoff-schedule",
  "schedule": {
    "principal": 2400,
    "ratePercent": 6,
    "termMonths": 24,
    "monthlyExtra": 10,
    "yearlyExtra": 120,
    "oneTimeExtra": 180,
    "oneTimeExtraMonth": 12,
    "payoffFrequency": "biweekly"
  }
}
HT_INPUT
)
If your request fails
400 INVALID_INPUT

Read error.details when present. Node prints each issue. cURL returns the JSON body. Each path points into your request. An empty path refers to the whole body.

Check the accepted inputs for required fields, units and ranges. Send the corrected JSON as a new request.

401 or 403
Check that the server has the bearer key for the endpoint’s environment and that the key includes mortgage-payment-piti.
429
Read the service error code, check your allowance, and wait for the Retry-After interval when supplied before trying again.
Lost response, 409 or 503
Open Request lookup, select the same environment and enter the printed usage lookup ID. A settled ID has already consumed credits. To retry the same calculation, set HT_REQUEST_ID to the original ID and reuse the same inputs. A settled request does not return its result again. Unset the variable for a new request, which can consume credits.

The usage lookup ID is the Idempotency-Key your server sends. The response’s x-request-id identifies the HTTP exchange for support.

Output

Example result

These values come from running this operation on the example inputs.

Standard payment (PITI)

monthlyPayment
1285 USD/month
principalAndInterest
750 USD/month
monthlyTax
300 USD/month
How to interpret this result
  • HT Calc policy snapshot 719df2c, November 2026. Program comparisons are planning estimates. A lender determines underwriting and eligibility.
Full example response (JSON)
{
  "status": "available",
  "result": {
    "principalAndInterest": 750,
    "monthlyTax": 300,
    "monthlyInsurance": 100,
    "monthlyPMI": 135,
    "monthlyPayment": 1285,
    "totalPayment": 420480,
    "totalInterest": 0,
    "totalFinancingPayment": 270000,
    "loanAmount": 270000,
    "upfrontFees": 0,
    "originationFeeAmount": 0,
    "feeDeductedFromProceeds": 0,
    "capitalizedInterest": 0,
    "pmiMonths": 48
  },
  "formulaVersion": "mortgage-payment-piti-htcalc-719df2c0e105",
  "units": {
    "loanAmount": "USD",
    "principalAndInterest": "USD/month",
    "monthlyTax": "USD/month",
    "monthlyInsurance": "USD/month",
    "monthlyPMI": "USD/month",
    "monthlyPayment": "USD/month"
  },
  "assumptions": [
    "HT Calc policy snapshot 719df2c, November 2026. Program comparisons are planning estimates. A lender determines underwriting and eligibility."
  ],
  "warnings": [],
  "creditCost": 2
}

Monthly payoff with extra payments

schedule.interestSaved
27.3 USD over the payoff period
schedule.monthsSaved
4 months
How to interpret this result
  • Principal and interest only; same fixed note rate for the comparison. The first monthly payment is numbered 1.
  • Monthly plan interest, principal and balance use the app cent ledger; the final payment absorbs remaining cents. Applied extras stop at the remaining balance.
  • Biweekly uses immediate application, 26 half-payments per year, 12 monthly extras and no fees. Drafts retain engine precision; annual rows group 26 drafts. Its standard interest baseline uses the app’s monthly annuity calculation.
Full example response (JSON)
{
  "status": "available",
  "result": {
    "mode": "payoff-schedule",
    "scheduleFormulaVersion": "mortgage-payment-payoff-schedule-1.0.0",
    "schedule": {
      "active": true,
      "method": "extras",
      "scheduledMonthlyPI": 106.3694646066,
      "effectiveOneTimeMonth": 12,
      "excludedWithBiweekly": false,
      "before": {
        "interest": 152.89,
        "months": 24,
        "totalPrincipalAndInterest": 2552.89
      },
      "after": {
        "interest": 125.59,
        "months": 20,
        "totalPrincipalAndInterest": 2525.59
      },
      "interestSaved": 27.3,
      "monthsSaved": 4,
      "baselineMonthlySchedule": [
        {
          "month": 1,
          "interest": 12,
          "principal": 94.37,
          "remainingBalance": 2305.63
        },
        {
          "month": 2,
          "interest": 11.53,
          "principal": 94.84,
          "remainingBalance": 2210.79
        },
        {
          "month": 3,
          "interest": 11.05,
          "principal": 95.32,
          "remainingBalance": 2115.47
        },
        {
          "month": 4,
          "interest": 10.58,
          "principal": 95.79,
          "remainingBalance": 2019.68
        },
        {
          "month": 5,
          "interest": 10.1,
          "principal": 96.27,
          "remainingBalance": 1923.41
        },
        {
          "month": 6,
          "interest": 9.62,
          "principal": 96.75,
          "remainingBalance": 1826.66
        },
        {
          "month": 7,
          "interest": 9.13,
          "principal": 97.24,
          "remainingBalance": 1729.42
        },
        {
          "month": 8,
          "interest": 8.65,
          "principal": 97.72,
          "remainingBalance": 1631.7
        },
        {
          "month": 9,
          "interest": 8.16,
          "principal": 98.21,
          "remainingBalance": 1533.49
        },
        {
          "month": 10,
          "interest": 7.67,
          "principal": 98.7,
          "remainingBalance": 1434.79
        },
        {
          "month": 11,
          "interest": 7.17,
          "principal": 99.2,
          "remainingBalance": 1335.59
        },
        {
          "month": 12,
          "interest": 6.68,
          "principal": 99.69,
          "remainingBalance": 1235.9
        },
        {
          "month": 13,
          "interest": 6.18,
          "principal": 100.19,
          "remainingBalance": 1135.71
        },
        {
          "month": 14,
          "interest": 5.68,
          "principal": 100.69,
          "remainingBalance": 1035.02
        },
        {
          "month": 15,
          "interest": 5.18,
          "principal": 101.19,
          "remainingBalance": 933.83
        },
        {
          "month": 16,
          "interest": 4.67,
          "principal": 101.7,
          "remainingBalance": 832.13
        },
        {
          "month": 17,
          "interest": 4.16,
          "principal": 102.21,
          "remainingBalance": 729.92
        },
        {
          "month": 18,
          "interest": 3.65,
          "principal": 102.72,
          "remainingBalance": 627.2
        },
        {
          "month": 19,
          "interest": 3.14,
          "principal": 103.23,
          "remainingBalance": 523.97
        },
        {
          "month": 20,
          "interest": 2.62,
          "principal": 103.75,
          "remainingBalance": 420.22
        },
        {
          "month": 21,
          "interest": 2.1,
          "principal": 104.27,
          "remainingBalance": 315.95
        },
        {
          "month": 22,
          "interest": 1.58,
          "principal": 104.79,
          "remainingBalance": 211.16
        },
        {
          "month": 23,
          "interest": 1.06,
          "principal": 105.31,
          "remainingBalance": 105.85
        },
        {
          "month": 24,
          "interest": 0.53,
          "principal": 105.85,
          "remainingBalance": 0
        }
      ],
      "monthlyExtraApplied": [
        {
          "month": 1,
          "extraPrincipal": 10
        },
        {
          "month": 2,
          "extraPrincipal": 10
        },
        {
          "month": 3,
          "extraPrincipal": 10
        },
        {
          "month": 4,
          "extraPrincipal": 10
        },
        {
          "month": 5,
          "extraPrincipal": 10
        },
        {
          "month": 6,
          "extraPrincipal": 10
        },
        {
          "month": 7,
          "extraPrincipal": 10
        },
        {
          "month": 8,
          "extraPrincipal": 10
        },
        {
          "month": 9,
          "extraPrincipal": 10
        },
        {
          "month": 10,
          "extraPrincipal": 10
        },
        {
          "month": 11,
          "extraPrincipal": 10
        },
        {
          "month": 12,
          "extraPrincipal": 310
        },
        {
          "month": 13,
          "extraPrincipal": 10
        },
        {
          "month": 14,
          "extraPrincipal": 10
        },
        {
          "month": 15,
          "extraPrincipal": 10
        },
        {
          "month": 16,
          "extraPrincipal": 10
        },
        {
          "month": 17,
          "extraPrincipal": 10
        },
        {
          "month": 18,
          "extraPrincipal": 10
        },
        {
          "month": 19,
          "extraPrincipal": 10
        },
        {
          "month": 20,
          "extraPrincipal": 0
        }
      ],
      "scheduledRows": {
        "monthly": [
          {
            "month": 1,
            "interest": 12,
            "principal": 104.37,
            "remainingBalance": 2295.63
          },
          {
            "month": 2,
            "interest": 11.48,
            "principal": 104.89,
            "remainingBalance": 2190.74
          },
          {
            "month": 3,
            "interest": 10.95,
            "principal": 105.42,
            "remainingBalance": 2085.32
          },
          {
            "month": 4,
            "interest": 10.43,
            "principal": 105.94,
            "remainingBalance": 1979.38
          },
          {
            "month": 5,
            "interest": 9.9,
            "principal": 106.47,
            "remainingBalance": 1872.91
          },
          {
            "month": 6,
            "interest": 9.36,
            "principal": 107.01,
            "remainingBalance": 1765.9
          },
          {
            "month": 7,
            "interest": 8.83,
            "principal": 107.54,
            "remainingBalance": 1658.36
          },
          {
            "month": 8,
            "interest": 8.29,
            "principal": 108.08,
            "remainingBalance": 1550.28
          },
          {
            "month": 9,
            "interest": 7.75,
            "principal": 108.62,
            "remainingBalance": 1441.66
          },
          {
            "month": 10,
            "interest": 7.21,
            "principal": 109.16,
            "remainingBalance": 1332.5
          },
          {
            "month": 11,
            "interest": 6.66,
            "principal": 109.71,
            "remainingBalance": 1222.79
          },
          {
            "month": 12,
            "interest": 6.11,
            "principal": 410.26,
            "remainingBalance": 812.53
          },
          {
            "month": 13,
            "interest": 4.06,
            "principal": 112.31,
            "remainingBalance": 700.22
          },
          {
            "month": 14,
            "interest": 3.5,
            "principal": 112.87,
            "remainingBalance": 587.35
          },
          {
            "month": 15,
            "interest": 2.94,
            "principal": 113.43,
            "remainingBalance": 473.92
          },
          {
            "month": 16,
            "interest": 2.37,
            "principal": 114,
            "remainingBalance": 359.92
          },
          {
            "month": 17,
            "interest": 1.8,
            "principal": 114.57,
            "remainingBalance": 245.35
          },
          {
            "month": 18,
            "interest": 1.23,
            "principal": 115.14,
            "remainingBalance": 130.21
          },
          {
            "month": 19,
            "interest": 0.65,
            "principal": 115.72,
            "remainingBalance": 14.49
          },
          {
            "month": 20,
            "interest": 0.07,
            "principal": 14.49,
            "remainingBalance": 0
          }
        ],
        "yearly": [
          {
            "year": 1,
            "totalInterest": 108.97,
            "totalPrincipal": 1587.47,
            "remainingBalance": 812.53
          },
          {
            "year": 2,
            "totalInterest": 16.62,
            "totalPrincipal": 812.53,
            "remainingBalance": 0
          }
        ],
        "available": true
      },
      "biweekly": null,
      "beforeYearEndBalances": [
        2400,
        1235.9,
        0
      ],
      "afterYearEndBalances": [
        2400,
        812.53,
        0
      ]
    }
  },
  "formulaVersion": "mortgage-payment-piti-htcalc-719df2c0e105",
  "units": {
    "principal": "USD",
    "ratePercent": "annual percent",
    "termMonths": "months",
    "scheduledMonthlyPI": "USD/month",
    "perPayment": "USD/draft",
    "interestSaved": "USD over the payoff period",
    "monthsSaved": "months",
    "rows": "USD of interest/principal/balance per numbered period"
  },
  "assumptions": [
    "Principal and interest only; same fixed note rate for the comparison. The first monthly payment is numbered 1.",
    "Monthly plan interest, principal and balance use the app cent ledger; the final payment absorbs remaining cents. Applied extras stop at the remaining balance.",
    "Biweekly uses immediate application, 26 half-payments per year, 12 monthly extras and no fees. Drafts retain engine precision; annual rows group 26 drafts. Its standard interest baseline uses the app’s monthly annuity calculation."
  ],
  "warnings": [],
  "creditCost": 2
}

Biweekly payoff with extra payments

schedule.interestSaved
26.54 USD over the payoff period
schedule.monthsSaved
4 months

Result warnings

  • Yearly and one-time extras are excluded on biweekly cadence. The monthly extra still posts 12 times per year.
How to interpret this result
  • Principal and interest only; same fixed note rate for the comparison. The first monthly payment is numbered 1.
  • Monthly plan interest, principal and balance use the app cent ledger; the final payment absorbs remaining cents. Applied extras stop at the remaining balance.
  • Biweekly uses immediate application, 26 half-payments per year, 12 monthly extras and no fees. Drafts retain engine precision; annual rows group 26 drafts. Its standard interest baseline uses the app’s monthly annuity calculation.
Full example response (JSON)
{
  "status": "available",
  "result": {
    "mode": "payoff-schedule",
    "scheduleFormulaVersion": "mortgage-payment-payoff-schedule-1.0.0",
    "schedule": {
      "active": true,
      "method": "biweekly",
      "scheduledMonthlyPI": 106.3694646066,
      "effectiveOneTimeMonth": 12,
      "excludedWithBiweekly": true,
      "before": {
        "interest": 152.86715055840023,
        "months": 24,
        "totalPrincipalAndInterest": 2552.8671505584
      },
      "after": {
        "interest": 126.32612021950817,
        "months": 20,
        "totalPrincipalAndInterest": 2526.326120219508
      },
      "interestSaved": 26.541030338892057,
      "monthsSaved": 4,
      "baselineMonthlySchedule": null,
      "monthlyExtraApplied": null,
      "scheduledRows": {
        "monthly": [
          {
            "month": 1,
            "interest": 16.28527208024527,
            "principal": 153.26892482965474,
            "remainingBalance": 2246.7310751703453
          },
          {
            "month": 2,
            "interest": 10.258758881670033,
            "principal": 106.11070572492997,
            "remainingBalance": 2140.6203694454152
          },
          {
            "month": 3,
            "interest": 9.768452076341053,
            "principal": 106.60101253025896,
            "remainingBalance": 2034.0193569151565
          },
          {
            "month": 4,
            "interest": 9.275879705424607,
            "principal": 107.0935849011754,
            "remainingBalance": 1926.9257720139813
          },
          {
            "month": 5,
            "interest": 8.781031300398999,
            "principal": 107.58843330620101,
            "remainingBalance": 1819.3373387077802
          },
          {
            "month": 6,
            "interest": 12.232938891552564,
            "principal": 157.32125801834746,
            "remainingBalance": 1662.0160806894328
          },
          {
            "month": 7,
            "interest": 7.556960424923615,
            "principal": 108.81250418167639,
            "remainingBalance": 1553.2035765077562
          },
          {
            "month": 8,
            "interest": 7.05416939228769,
            "principal": 109.31529521431231,
            "remainingBalance": 1443.888281293444
          },
          {
            "month": 9,
            "interest": 6.549055108069605,
            "principal": 109.8204094985304,
            "remainingBalance": 1334.0678717949136
          },
          {
            "month": 10,
            "interest": 6.041606837197402,
            "principal": 110.32785776940261,
            "remainingBalance": 1223.7400140255108
          },
          {
            "month": 11,
            "interest": 5.53181379499547,
            "principal": 110.83765081160453,
            "remainingBalance": 1112.9023632139065
          },
          {
            "month": 12,
            "interest": 7.330940294080559,
            "principal": 162.22325661581942,
            "remainingBalance": 950.6791065980871
          },
          {
            "month": 13,
            "interest": 4.2700785132790475,
            "principal": 112.09938609332096,
            "remainingBalance": 838.5797205047661
          },
          {
            "month": 14,
            "interest": 3.752099752330679,
            "principal": 112.61736485426933,
            "remainingBalance": 725.9623556504968
          },
          {
            "month": 15,
            "interest": 3.2317275617111587,
            "principal": 113.13773704488884,
            "remainingBalance": 612.8246186056078
          },
          {
            "month": 16,
            "interest": 2.70895088207593,
            "principal": 113.66051372452407,
            "remainingBalance": 499.1641048810838
          },
          {
            "month": 17,
            "interest": 2.1837586029784104,
            "principal": 114.18570600362159,
            "remainingBalance": 384.9783988774622
          },
          {
            "month": 18,
            "interest": 2.2798281945573176,
            "principal": 167.2743687153427,
            "remainingBalance": 217.7040301621195
          },
          {
            "month": 19,
            "interest": 0.8832132044693024,
            "principal": 115.4862514021307,
            "remainingBalance": 102.2177787599888
          },
          {
            "month": 20,
            "interest": 0.3495847209194571,
            "principal": 102.2177787599888,
            "remainingBalance": 0
          }
        ],
        "yearly": [
          {
            "year": 1,
            "totalInterest": 104.36,
            "totalPrincipal": 1398.45,
            "remainingBalance": 1001.5525637542619
          },
          {
            "year": 2,
            "totalInterest": 21.97,
            "totalPrincipal": 1001.55,
            "remainingBalance": 0
          }
        ],
        "available": true
      },
      "biweekly": {
        "perPayment": 53.1847323033,
        "annualExtraPrincipal": 226.3694646066,
        "drafts": [
          {
            "period": 1,
            "interest": 5.538461538461538,
            "principal": 47.64627076483846,
            "remainingBalance": 2352.3537292351616
          },
          {
            "period": 2,
            "interest": 5.428508605927296,
            "principal": 47.756223697372704,
            "remainingBalance": 2304.597505537789
          },
          {
            "period": 3,
            "interest": 5.318301935856436,
            "principal": 57.86643036744357,
            "remainingBalance": 2246.7310751703453
          },
          {
            "period": 4,
            "interest": 5.184764019623874,
            "principal": 47.999968283676125,
            "remainingBalance": 2198.7311068866693
          },
          {
            "period": 5,
            "interest": 5.07399486204616,
            "principal": 58.110737441253846,
            "remainingBalance": 2140.6203694454152
          },
          {
            "period": 6,
            "interest": 4.93989316025865,
            "principal": 48.244839143041354,
            "remainingBalance": 2092.375530302374
          },
          {
            "period": 7,
            "interest": 4.828558916082401,
            "principal": 58.3561733872176,
            "remainingBalance": 2034.0193569151565
          },
          {
            "period": 8,
            "interest": 4.693890823650361,
            "principal": 48.49084147964964,
            "remainingBalance": 1985.528515435507
          },
          {
            "period": 9,
            "interest": 4.5819888817742465,
            "principal": 58.60274342152576,
            "remainingBalance": 1926.9257720139813
          },
          {
            "period": 10,
            "interest": 4.446751781570725,
            "principal": 48.73798052172928,
            "remainingBalance": 1878.187791492252
          },
          {
            "period": 11,
            "interest": 4.334279518828273,
            "principal": 58.85045278447173,
            "remainingBalance": 1819.3373387077802
          },
          {
            "period": 12,
            "interest": 4.198470781633339,
            "principal": 48.98626152166666,
            "remainingBalance": 1770.3510771861136
          },
          {
            "period": 13,
            "interest": 4.085425562737185,
            "principal": 59.09930674056282,
            "remainingBalance": 1711.2517704455508
          },
          {
            "period": 14,
            "interest": 3.94904254718204,
            "principal": 49.235689756117964,
            "remainingBalance": 1662.0160806894328
          },
          {
            "period": 15,
            "interest": 3.8354217246679214,
            "principal": 49.34931057863208,
            "remainingBalance": 1612.6667701108006
          },
          {
            "period": 16,
            "interest": 3.721538700255693,
            "principal": 59.46319360304431,
            "remainingBalance": 1553.2035765077562
          },
          {
            "period": 17,
            "interest": 3.584315945787129,
            "principal": 49.60041635751287,
            "remainingBalance": 1503.6031601502434
          },
          {
            "period": 18,
            "interest": 3.4698534465005615,
            "principal": 59.714878856799444,
            "remainingBalance": 1443.888281293444
          },
          {
            "period": 19,
            "interest": 3.332049879907947,
            "principal": 49.852682423392054,
            "remainingBalance": 1394.035598870052
          },
          {
            "period": 20,
            "interest": 3.217005228161658,
            "principal": 59.96772707513834,
            "remainingBalance": 1334.0678717949136
          },
          {
            "period": 21,
            "interest": 3.0786181656805693,
            "principal": 50.106114137619436,
            "remainingBalance": 1283.9617576572941
          },
          {
            "period": 22,
            "interest": 2.9629886715168325,
            "principal": 60.22174363178317,
            "remainingBalance": 1223.7400140255108
          },
          {
            "period": 23,
            "interest": 2.824015416981948,
            "principal": 50.36071688631805,
            "remainingBalance": 1173.3792971391929
          },
          {
            "period": 24,
            "interest": 2.7077983780135217,
            "principal": 60.47693392528648,
            "remainingBalance": 1112.9023632139065
          },
          {
            "period": 25,
            "interest": 2.5682362228013225,
            "principal": 50.61649608049868,
            "remainingBalance": 1062.285867133408
          },
          {
            "period": 26,
            "interest": 2.451428924154018,
            "principal": 60.73330337914599,
            "remainingBalance": 1001.5525637542619
          },
          {
            "period": 27,
            "interest": 2.3112751471252193,
            "principal": 50.87345715617478,
            "remainingBalance": 950.6791065980871
          },
          {
            "period": 28,
            "interest": 2.1938748613802006,
            "principal": 50.9908574419198,
            "remainingBalance": 899.6882491561672
          },
          {
            "period": 29,
            "interest": 2.0762036518988474,
            "principal": 61.10852865140116,
            "remainingBalance": 838.5797205047661
          },
          {
            "period": 30,
            "interest": 1.935183970395614,
            "principal": 51.24954833290439,
            "remainingBalance": 787.3301721718617
          },
          {
            "period": 31,
            "interest": 1.8169157819350652,
            "principal": 61.36781652136494,
            "remainingBalance": 725.9623556504968
          },
          {
            "period": 32,
            "interest": 1.6752977438088386,
            "principal": 51.50943455949116,
            "remainingBalance": 674.4529210910056
          },
          {
            "period": 33,
            "interest": 1.5564298179023204,
            "principal": 61.62830248539768,
            "remainingBalance": 612.8246186056078
          },
          {
            "period": 34,
            "interest": 1.4142106583206333,
            "principal": 51.77052164497937,
            "remainingBalance": 561.0540969606285
          },
          {
            "period": 35,
            "interest": 1.2947402237552965,
            "principal": 61.889992079544704,
            "remainingBalance": 499.1641048810838
          },
          {
            "period": 36,
            "interest": 1.1519171651101934,
            "principal": 52.03281513818981,
            "remainingBalance": 447.131289742894
          },
          {
            "period": 37,
            "interest": 1.0318414378682168,
            "principal": 62.152890865431786,
            "remainingBalance": 384.9783988774622
          },
          {
            "period": 38,
            "interest": 0.8884116897172204,
            "principal": 52.29632061358278,
            "remainingBalance": 332.6820782638794
          },
          {
            "period": 39,
            "interest": 0.7677278729166448,
            "principal": 62.41700443038336,
            "remainingBalance": 270.26507383349605
          },
          {
            "period": 40,
            "interest": 0.6236886319234524,
            "principal": 52.56104367137655,
            "remainingBalance": 217.7040301621195
          },
          {
            "period": 41,
            "interest": 0.5023939157587373,
            "principal": 52.682338387541265,
            "remainingBalance": 165.02169177457824
          },
          {
            "period": 42,
            "interest": 0.38081928871056514,
            "principal": 62.80391301458944,
            "remainingBalance": 102.2177787599888
          },
          {
            "period": 43,
            "interest": 0.23588718175382029,
            "principal": 52.948845121546185,
            "remainingBalance": 49.26893363844262
          },
          {
            "period": 44,
            "interest": 0.1136975391656368,
            "principal": 49.26893363844262,
            "remainingBalance": 0
          }
        ]
      },
      "beforeYearEndBalances": [
        2400,
        1235.9,
        0
      ],
      "afterYearEndBalances": [
        2400,
        1001.5525637542619,
        0
      ]
    }
  },
  "formulaVersion": "mortgage-payment-piti-htcalc-719df2c0e105",
  "units": {
    "principal": "USD",
    "ratePercent": "annual percent",
    "termMonths": "months",
    "scheduledMonthlyPI": "USD/month",
    "perPayment": "USD/draft",
    "interestSaved": "USD over the payoff period",
    "monthsSaved": "months",
    "rows": "USD of interest/principal/balance per numbered period"
  },
  "assumptions": [
    "Principal and interest only; same fixed note rate for the comparison. The first monthly payment is numbered 1.",
    "Monthly plan interest, principal and balance use the app cent ledger; the final payment absorbs remaining cents. Applied extras stop at the remaining balance.",
    "Biweekly uses immediate application, 26 half-payments per year, 12 monthly extras and no fees. Drafts retain engine precision; annual rows group 26 drafts. Its standard interest baseline uses the app’s monthly annuity calculation."
  ],
  "warnings": [
    "Yearly and one-time extras are excluded on biweekly cadence. The monthly extra still posts 12 times per year."
  ],
  "creditCost": 2
}

Request contract

Accepted inputs

Fields for this example. Expand the schema for all supported combinations and limits.

Standard payment (PITI)

FieldType, units and limits

paramsRequired
object
params.loanAmountRequired
number

Positive US dollars

Min 0.01 · Max 1000000000
params.downPaymentRequired
number

US dollars

Min 0 · Max 1000000000
params.interestRateRequired
number

Annual note rate in percent; 6 means 6%

Min 0 · Max 50
params.loanTermConditional
integer

Whole years

Min 1 · Max 50
params.loanTermMonthsConditional
integer

Whole months

Min 1 · Max 600
params.loanTermYearsConditional
integer

Whole years

Min 1 · Max 50
params.propertyTaxRequired
number

US dollars per year

Min 0 · Max 1000000000
params.homeInsuranceRequired
number

US dollars per year

Min 0 · Max 1000000000
params.pmiRequired
number

Annual mortgage insurance rate in percent

Min 0 · Max 25
params.financedFeesOptional
number

US dollars

Min 0 · Max 1000000000
params.loanProgramOptional
stringAllowed: "conventional", "fha", "va", "usda"
params.financeProgramUpfrontFeeOptional
boolean
loanTypeRequired
stringMust equal "MORTGAGE"
optionsOptional
object
options.propertyValueRequired
number

Positive US dollars

Min 0.01 · Max 1000000000
Example request body (JSON)
{
  "params": {
    "loanAmount": 300000,
    "downPayment": 30000,
    "interestRate": 0,
    "loanTerm": 30,
    "loanTermMonths": 360,
    "propertyTax": 3600,
    "homeInsurance": 1200,
    "pmi": 0.6,
    "financedFees": 0,
    "financeProgramUpfrontFee": false
  },
  "loanType": "MORTGAGE",
  "options": {
    "propertyValue": 300000
  }
}

Monthly payoff with extra payments

FieldType, units and limits

modeRequired
stringMust equal "payoff-schedule"
scheduleRequired
object
schedule.principalRequired
number

Financed principal in USD. Payment shares accept up to $100 million; the editable field caps at $10 million. Zero returns an empty plan.

Min 0 · Max 100000000 · Step 0.01
schedule.ratePercentRequired
number

Fixed annual note rate, as a percent. Enter 6 for 6%.

Min 0 · Max 99
schedule.termMonthsRequired
integer

Number of scheduled monthly payments, including terms entered in years and converted to months.

Min 1 · Max 600
schedule.payoffFrequencyOptional
string

Default monthly. Biweekly uses 26 immediate half-P&I drafts each year.

Allowed: "monthly", "biweekly"
schedule.monthlyExtraOptional
number

Optional extra principal in USD per month, including in biweekly mode. Default zero.

Min 0 · Max 10000000 · Step 0.01
schedule.yearlyExtraOptional
number

Optional extra principal in USD at every twelfth monthly payment. Retained but unapplied in biweekly mode. Default zero.

Min 0 · Max 10000000 · Step 0.01
schedule.oneTimeExtraOptional
number

Optional extra principal in USD at one payment. Retained but unapplied in biweekly mode. Default zero.

Min 0 · Max 10000000 · Step 0.01
schedule.oneTimeExtraMonthOptional
integer

One-based payment number. Defaults to min(12, termMonths). A value past the contractual term is clamped to its last payment, matching app restoration. An already-paid loan receives nothing.

Min 1 · Max 600
Example request body (JSON)
{
  "mode": "payoff-schedule",
  "schedule": {
    "principal": 2400,
    "ratePercent": 6,
    "termMonths": 24,
    "monthlyExtra": 10,
    "yearlyExtra": 120,
    "oneTimeExtra": 180,
    "oneTimeExtraMonth": 12,
    "payoffFrequency": "monthly"
  }
}

Biweekly payoff with extra payments

FieldType, units and limits

modeRequired
stringMust equal "payoff-schedule"
scheduleRequired
object
schedule.principalRequired
number

Financed principal in USD. Payment shares accept up to $100 million; the editable field caps at $10 million. Zero returns an empty plan.

Min 0 · Max 100000000 · Step 0.01
schedule.ratePercentRequired
number

Fixed annual note rate, as a percent. Enter 6 for 6%.

Min 0 · Max 99
schedule.termMonthsRequired
integer

Number of scheduled monthly payments, including terms entered in years and converted to months.

Min 1 · Max 600
schedule.payoffFrequencyOptional
string

Default monthly. Biweekly uses 26 immediate half-P&I drafts each year.

Allowed: "monthly", "biweekly"
schedule.monthlyExtraOptional
number

Optional extra principal in USD per month, including in biweekly mode. Default zero.

Min 0 · Max 10000000 · Step 0.01
schedule.yearlyExtraOptional
number

Optional extra principal in USD at every twelfth monthly payment. Retained but unapplied in biweekly mode. Default zero.

Min 0 · Max 10000000 · Step 0.01
schedule.oneTimeExtraOptional
number

Optional extra principal in USD at one payment. Retained but unapplied in biweekly mode. Default zero.

Min 0 · Max 10000000 · Step 0.01
schedule.oneTimeExtraMonthOptional
integer

One-based payment number. Defaults to min(12, termMonths). A value past the contractual term is clamped to its last payment, matching app restoration. An already-paid loan receives nothing.

Min 1 · Max 600
Example request body (JSON)
{
  "mode": "payoff-schedule",
  "schedule": {
    "principal": 2400,
    "ratePercent": 6,
    "termMonths": 24,
    "monthlyExtra": 10,
    "yearlyExtra": 120,
    "oneTimeExtra": 180,
    "oneTimeExtraMonth": 12,
    "payoffFrequency": "biweekly"
  }
}
Full JSON schema
{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "params": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "loanAmount": {
              "type": "number",
              "minimum": 0.01,
              "maximum": 1000000000,
              "description": "Positive US dollars"
            },
            "downPayment": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000,
              "description": "US dollars"
            },
            "interestRate": {
              "type": "number",
              "minimum": 0,
              "maximum": 50,
              "description": "Annual note rate in percent; 6 means 6%"
            },
            "loanTerm": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "description": "Whole years"
            },
            "loanTermMonths": {
              "type": "integer",
              "minimum": 1,
              "maximum": 600,
              "description": "Whole months"
            },
            "loanTermYears": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "description": "Whole years"
            },
            "propertyTax": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000,
              "description": "US dollars per year"
            },
            "homeInsurance": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000,
              "description": "US dollars per year"
            },
            "pmi": {
              "type": "number",
              "minimum": 0,
              "maximum": 25,
              "description": "Annual mortgage insurance rate in percent"
            },
            "financedFees": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000,
              "description": "US dollars"
            },
            "loanProgram": {
              "type": "string",
              "enum": [
                "conventional",
                "fha",
                "va",
                "usda"
              ]
            },
            "financeProgramUpfrontFee": {
              "type": "boolean"
            }
          },
          "required": [
            "loanAmount",
            "downPayment",
            "interestRate",
            "propertyTax",
            "homeInsurance",
            "pmi"
          ],
          "anyOf": [
            {
              "required": [
                "loanTerm"
              ]
            },
            {
              "required": [
                "loanTermMonths"
              ]
            },
            {
              "required": [
                "loanTermYears"
              ]
            }
          ]
        },
        "loanType": {
          "type": "string",
          "const": "MORTGAGE"
        },
        "options": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "propertyValue": {
              "type": "number",
              "minimum": 0.01,
              "maximum": 1000000000,
              "description": "Positive US dollars"
            }
          },
          "required": [
            "propertyValue"
          ]
        }
      },
      "required": [
        "params",
        "loanType"
      ],
      "title": "Monthly principal, interest, taxes and insurance"
    },
    {
      "type": "object",
      "title": "Mortgage payoff schedule",
      "additionalProperties": false,
      "required": [
        "mode",
        "schedule"
      ],
      "properties": {
        "mode": {
          "const": "payoff-schedule"
        },
        "schedule": {
          "type": "object",
          "properties": {
            "principal": {
              "type": "number",
              "minimum": 0,
              "maximum": 100000000,
              "multipleOf": 0.01,
              "description": "Financed principal in USD. Payment shares accept up to $100 million; the editable field caps at $10 million. Zero returns an empty plan.",
              "anyOf": [
                {
                  "const": 0
                },
                {
                  "minimum": 1
                }
              ]
            },
            "ratePercent": {
              "type": "number",
              "minimum": 0,
              "maximum": 99,
              "description": "Fixed annual note rate, as a percent. Enter 6 for 6%."
            },
            "termMonths": {
              "type": "integer",
              "minimum": 1,
              "maximum": 600,
              "description": "Number of scheduled monthly payments, including terms entered in years and converted to months."
            },
            "payoffFrequency": {
              "type": "string",
              "enum": [
                "monthly",
                "biweekly"
              ],
              "description": "Default monthly. Biweekly uses 26 immediate half-P&I drafts each year."
            },
            "monthlyExtra": {
              "type": "number",
              "minimum": 0,
              "maximum": 10000000,
              "multipleOf": 0.01,
              "description": "Optional extra principal in USD per month, including in biweekly mode. Default zero."
            },
            "yearlyExtra": {
              "type": "number",
              "minimum": 0,
              "maximum": 10000000,
              "multipleOf": 0.01,
              "description": "Optional extra principal in USD at every twelfth monthly payment. Retained but unapplied in biweekly mode. Default zero."
            },
            "oneTimeExtra": {
              "type": "number",
              "minimum": 0,
              "maximum": 10000000,
              "multipleOf": 0.01,
              "description": "Optional extra principal in USD at one payment. Retained but unapplied in biweekly mode. Default zero."
            },
            "oneTimeExtraMonth": {
              "type": "integer",
              "minimum": 1,
              "maximum": 600,
              "description": "One-based payment number. Defaults to min(12, termMonths). A value past the contractual term is clamped to its last payment, matching app restoration. An already-paid loan receives nothing."
            }
          },
          "required": [
            "principal",
            "ratePercent",
            "termMonths"
          ],
          "additionalProperties": false
        }
      }
    }
  ],
  "examples": [
    {
      "params": {
        "loanAmount": 300000,
        "downPayment": 30000,
        "interestRate": 0,
        "loanTerm": 30,
        "loanTermMonths": 360,
        "propertyTax": 3600,
        "homeInsurance": 1200,
        "pmi": 0.6,
        "financedFees": 0,
        "financeProgramUpfrontFee": false
      },
      "loanType": "MORTGAGE",
      "options": {
        "propertyValue": 300000
      }
    },
    {
      "mode": "payoff-schedule",
      "schedule": {
        "principal": 2400,
        "ratePercent": 6,
        "termMonths": 24,
        "monthlyExtra": 10,
        "yearlyExtra": 120,
        "oneTimeExtra": 180,
        "oneTimeExtraMonth": 12,
        "payoffFrequency": "monthly"
      }
    },
    {
      "mode": "payoff-schedule",
      "schedule": {
        "principal": 2400,
        "ratePercent": 6,
        "termMonths": 24,
        "monthlyExtra": 10,
        "yearlyExtra": 120,
        "oneTimeExtra": 180,
        "oneTimeExtraMonth": 12,
        "payoffFrequency": "biweekly"
      }
    }
  ]
}

Production endpoint: POST https://calc.hasstechapi.com/v2/calc/mortgage-payment-piti
Formula: mortgage-payment-piti-htcalc-719df2c0e105

Method and sources

Fixed mortgage only. Entered price, down payment, note terms, annual taxes and insurance and specified PMI percentage; uses core program fees only if explicitly requested.

Reviewed .