Investment · Calculation
DSCR refinance timing
Sizes a refinance using supplied NOI, value, rate and DSCR/LTV limits. Models closing date and seasoning, reserves, debt payoff, prepayment penalty, cash out, new payments and NPV over the entered horizon. The seasoning state refers to the entered timing assumption.
Example result · state: available See output
- Cost per success
- 20 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 investor-dscr-refi.
Keep the key on your server. A successful call uses 20 calculation credits.
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/investor-dscr-refi";
const input = {
"annualNoi": 48000,
"currentValue": 600000,
"currentPayoff": 240000,
"currentAnnualDebtService": 24000,
"targetDscr": 1.25,
"maxLtvPct": 75,
"newRatePct": 6,
"amortizationYears": 30,
"interestOnlyMonths": 0,
"closingCostPct": 2,
"fixedClosingCosts": 1000,
"prepaymentPenalty": 0,
"reserveMonths": 3,
"acquiredDate": "2026-01-10",
"requestedClosingDate": "2026-09-10",
"analysisDate": "2026-09-01",
"seasoningMonths": 6,
"npvHorizonMonths": 36,
"discountRatePct": 6
};
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 -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/investor-dscr-refi' \
--header "Authorization: Bearer $HT_PRODUCTION_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $request_id" \
--data-binary @- <<'HT_INPUT'
{
"annualNoi": 48000,
"currentValue": 600000,
"currentPayoff": 240000,
"currentAnnualDebtService": 24000,
"targetDscr": 1.25,
"maxLtvPct": 75,
"newRatePct": 6,
"amortizationYears": 30,
"interestOnlyMonths": 0,
"closingCostPct": 2,
"fixedClosingCosts": 1000,
"prepaymentPenalty": 0,
"reserveMonths": 3,
"acquiredDate": "2026-01-10",
"requestedClosingDate": "2026-09-10",
"analysisDate": "2026-09-01",
"seasoningMonths": 6,
"npvHorizonMonths": 36,
"discountRatePct": 6
}
HT_INPUT
) If your request fails
400 INVALID_INPUT-
Read
error.detailswhen present. Node prints each issue. cURL returns the JSON body. Eachpathpoints 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.
401or403- Check that the server has the bearer key for the endpoint’s environment and that the key includes
investor-dscr-refi. 429- Read the service error code, check your allowance, and wait for the
Retry-Afterinterval when supplied before trying again. - Lost response,
409or503 - 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_IDto 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.
state- available
formulaVersion- dscr-refi-2.0.0
value.qualifyingNoi- 48000
Result warnings
- No lender program was supplied; this is manual sizing, not an availability or approval claim.
How to interpret this result
- Sizes a refinance using supplied NOI, value, rate and DSCR/LTV limits. Models closing date and seasoning, reserves, debt payoff, prepayment penalty, cash out, new payments and NPV over the entered horizon. The seasoning state refers to the entered timing assumption.
Full example response (JSON)
{
"status": "available",
"result": {
"state": "available",
"fieldErrors": {},
"warnings": [
{
"code": "manual-program",
"severity": "info",
"message": "No lender program was supplied; this is manual sizing, not an availability or approval claim."
}
],
"assumptions": [
{
"key": "qualifyingRatePct",
"value": "6",
"source": "default"
}
],
"provenance": [
{
"source": "Declared residential gross-rent/PITIA and commercial NOI/debt-service definitions",
"asOf": "2026-08-13"
},
{
"source": "Standard monthly level-payment annuity formula, nominal annual rate / 12",
"asOf": "2026-08-13"
},
{
"source": "Microsoft XNPV/XIRR ACT/365F definitions",
"asOf": "2026-08-13"
}
],
"formulaVersion": "dscr-refi-2.0.0",
"ruleVersions": [
"refi-cap=min(DSCR,LTV,program)",
"seasoning-months:6",
"manual-no-program"
],
"auditTrail": [
"Constrained loan is min(DSCR 533733.17, LTV 450000.00).",
"Net proceeds deduct payoff 240000.00, penalty 0.00, costs 10000.00, and reserves 8093.94.",
"Requested close 2026-09-10; earliest eligible 2026-07-10; modeled 2026-09-10."
],
"value": {
"qualifyingNoi": "48000",
"effectiveRequiredDscr": "1.25",
"maxLoanByDscr": "533733.17",
"maxLoanByLtv": "450000",
"maxLoanByProgram": null,
"constrainedLoan": "450000",
"limitingConstraint": "LTV",
"requestedClosingDate": "2026-09-10",
"earliestEligibleClosingDate": "2026-07-10",
"modeledClosingDate": "2026-09-10",
"seasoningState": "eligible",
"programState": "manual",
"closingCosts": "10000",
"prepaymentPenalty": "0",
"reserveFunding": "8093.94",
"projectedNetCashOut": "191906.06",
"netCashOutAtRequestedDate": "191906.06",
"newMonthlyPayment": "2697.98",
"newAnnualDebtService": "32375.76",
"newDscr": "1.482590678952401426252233152210172054648",
"balloonBalance": "0",
"monthlyDebtServiceSavings": "-697.98",
"breakEvenMonths": null,
"savingsNpv": "-22997.52",
"ledger": [
{
"date": "2026-09-10",
"amount": "191906.06",
"label": "Net refinance proceeds after payoff, penalty, costs, and reserves"
},
{
"date": "2026-10-10",
"amount": "-697.98",
"label": "Debt-service savings month 1"
},
{
"date": "2026-11-10",
"amount": "-697.98",
"label": "Debt-service savings month 2"
},
{
"date": "2026-12-10",
"amount": "-697.98",
"label": "Debt-service savings month 3"
},
{
"date": "2027-01-10",
"amount": "-697.98",
"label": "Debt-service savings month 4"
},
{
"date": "2027-02-10",
"amount": "-697.98",
"label": "Debt-service savings month 5"
},
{
"date": "2027-03-10",
"amount": "-697.98",
"label": "Debt-service savings month 6"
},
{
"date": "2027-04-10",
"amount": "-697.98",
"label": "Debt-service savings month 7"
},
{
"date": "2027-05-10",
"amount": "-697.98",
"label": "Debt-service savings month 8"
},
{
"date": "2027-06-10",
"amount": "-697.98",
"label": "Debt-service savings month 9"
},
{
"date": "2027-07-10",
"amount": "-697.98",
"label": "Debt-service savings month 10"
},
{
"date": "2027-08-10",
"amount": "-697.98",
"label": "Debt-service savings month 11"
},
{
"date": "2027-09-10",
"amount": "-697.98",
"label": "Debt-service savings month 12"
},
{
"date": "2027-10-10",
"amount": "-697.98",
"label": "Debt-service savings month 13"
},
{
"date": "2027-11-10",
"amount": "-697.98",
"label": "Debt-service savings month 14"
},
{
"date": "2027-12-10",
"amount": "-697.98",
"label": "Debt-service savings month 15"
},
{
"date": "2028-01-10",
"amount": "-697.98",
"label": "Debt-service savings month 16"
},
{
"date": "2028-02-10",
"amount": "-697.98",
"label": "Debt-service savings month 17"
},
{
"date": "2028-03-10",
"amount": "-697.98",
"label": "Debt-service savings month 18"
},
{
"date": "2028-04-10",
"amount": "-697.98",
"label": "Debt-service savings month 19"
},
{
"date": "2028-05-10",
"amount": "-697.98",
"label": "Debt-service savings month 20"
},
{
"date": "2028-06-10",
"amount": "-697.98",
"label": "Debt-service savings month 21"
},
{
"date": "2028-07-10",
"amount": "-697.98",
"label": "Debt-service savings month 22"
},
{
"date": "2028-08-10",
"amount": "-697.98",
"label": "Debt-service savings month 23"
},
{
"date": "2028-09-10",
"amount": "-697.98",
"label": "Debt-service savings month 24"
},
{
"date": "2028-10-10",
"amount": "-697.98",
"label": "Debt-service savings month 25"
},
{
"date": "2028-11-10",
"amount": "-697.98",
"label": "Debt-service savings month 26"
},
{
"date": "2028-12-10",
"amount": "-697.98",
"label": "Debt-service savings month 27"
},
{
"date": "2029-01-10",
"amount": "-697.98",
"label": "Debt-service savings month 28"
},
{
"date": "2029-02-10",
"amount": "-697.98",
"label": "Debt-service savings month 29"
},
{
"date": "2029-03-10",
"amount": "-697.98",
"label": "Debt-service savings month 30"
},
{
"date": "2029-04-10",
"amount": "-697.98",
"label": "Debt-service savings month 31"
},
{
"date": "2029-05-10",
"amount": "-697.98",
"label": "Debt-service savings month 32"
},
{
"date": "2029-06-10",
"amount": "-697.98",
"label": "Debt-service savings month 33"
},
{
"date": "2029-07-10",
"amount": "-697.98",
"label": "Debt-service savings month 34"
},
{
"date": "2029-08-10",
"amount": "-697.98",
"label": "Debt-service savings month 35"
},
{
"date": "2029-09-10",
"amount": "-697.98",
"label": "Debt-service savings month 36"
}
]
}
},
"formulaVersion": "dscr-refi-2.0.0",
"units": {
"money": "USD",
"months": "whole months",
"years": "whole years",
"percentage": "percent points (6 = 6%)",
"dscr": "income divided by debt service, unitless"
},
"assumptions": [
"Sizes a refinance using supplied NOI, value, rate and DSCR/LTV limits. Models closing date and seasoning, reserves, debt payoff, prepayment penalty, cash out, new payments and NPV over the entered horizon. The seasoning state refers to the entered timing assumption."
],
"warnings": [
"No lender program was supplied; this is manual sizing, not an availability or approval claim."
],
"creditCost": 20
}Request contract
Accepted inputs
Fields for this example. Expand the schema for all supported combinations and limits.
FieldType, units and limits
annualNoiRequiredUSD per year in property net operating income before debt service.
Min 0 · Max 1000000000currentValueRequiredCaller-supplied current property value in USD used for the refinance LTV ceiling.
Min 0.01 · Max 1000000000appraisalRentLimitedNoiOptionalUSD per year in net operating income supported by an entered appraisal rent constraint.
Min 0 · Max 1000000000currentPayoffRequiredUSD needed to retire the existing debt before the separately entered prepayment penalty.
Min 0 · Max 1000000000currentAnnualDebtServiceRequiredUSD per year in payments on the existing debt, used as the payment-savings baseline.
Min 0 · Max 1000000000targetDscrRequiredRequired ratio of annual qualifying NOI to annual debt service (1.25 means 1.25 times).
Min 0.01 · Max 10maxLtvPctRequiredMaximum refinance loan principal as a percent of current property value (75 means 75%).
Min 0.01 · Max 100newRatePctRequiredAnnual contractual refinance note interest rate in percent (6 means 6% per year).
Min 0 · Max 100qualifyingRatePctOptionalAnnual interest rate in percent used to size the refinance loan (6.5 means 6.5% per year).
Min 0 · Max 100amortizationYearsRequiredWhole years in the new loan amortization term.
Min 1 · Max 50interestOnlyMonthsRequiredWhole months at the start of the new loan with interest-only payments.
Min 0 · Max 599balloonMonthsOptionalWhole months from modeled closing until balloon maturity.
Min 1 · Max 600closingCostPctRequiredClosing costs as a percent of the sized refinance principal, in addition to fixed costs.
Min 0 · Max 100fixedClosingCostsRequiredOne-time refinance closing costs in USD, in addition to the percentage-based costs.
Min 0 · Max 1000000000prepaymentPenaltyRequiredOne-time penalty in USD for paying off the current debt at refinance.
Min 0 · Max 1000000000reserveMonthsRequiredNumber of months of the new monthly payment to set aside as refinance reserves.
Min 0 · Max 120acquiredDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10requestedClosingDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10analysisDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10seasoningMonthsRequiredWhole calendar months from acquisition required by the caller’s seasoning assumption.
Min 0 · Max 600npvHorizonMonthsRequiredWhole months of payment differences discounted from the modeled refinance closing.
Min 1 · Max 600discountRatePctRequiredSigned annual discount rate in percent for the present value of monthly payment savings (6 means 6% per year).
Min -90 · Max 100limitsOptionallimits.asOfRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10limits.expiresAtRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10limits.requiredDscrOptionalMinimum coverage multiple under the dated assumption (1.25 means income is 1.25 times debt service).
Min 0.01 · Max 10limits.maxLtvPctOptionalMaximum loan as a percent of property value under the dated assumption (75 means 75%).
Min 0.01 · Max 100limits.maxLoanOptionalAbsolute loan principal ceiling in USD under the dated assumption.
Min 0.01 · Max 1000000000limits.reserveMonthsOptionalMinimum number of months of new monthly debt payments to reserve under the dated assumption.
Min 0 · Max 120limits.minimumSeasoningMonthsOptionalMinimum whole calendar months after acquisition under the dated seasoning assumption.
Min 0 · Max 600Example request body (JSON)
{
"annualNoi": 48000,
"currentValue": 600000,
"currentPayoff": 240000,
"currentAnnualDebtService": 24000,
"targetDscr": 1.25,
"maxLtvPct": 75,
"newRatePct": 6,
"amortizationYears": 30,
"interestOnlyMonths": 0,
"closingCostPct": 2,
"fixedClosingCosts": 1000,
"prepaymentPenalty": 0,
"reserveMonths": 3,
"acquiredDate": "2026-01-10",
"requestedClosingDate": "2026-09-10",
"analysisDate": "2026-09-01",
"seasoningMonths": 6,
"npvHorizonMonths": 36,
"discountRatePct": 6
} Full JSON schema
{
"type": "object",
"properties": {
"annualNoi": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD per year in property net operating income before debt service."
},
"currentValue": {
"type": "number",
"minimum": 0.01,
"maximum": 1000000000,
"description": "Caller-supplied current property value in USD used for the refinance LTV ceiling."
},
"appraisalRentLimitedNoi": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD per year in net operating income supported by an entered appraisal rent constraint."
},
"currentPayoff": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD needed to retire the existing debt before the separately entered prepayment penalty."
},
"currentAnnualDebtService": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD per year in payments on the existing debt, used as the payment-savings baseline."
},
"targetDscr": {
"type": "number",
"minimum": 0.01,
"maximum": 10,
"description": "Required ratio of annual qualifying NOI to annual debt service (1.25 means 1.25 times)."
},
"maxLtvPct": {
"type": "number",
"minimum": 0.01,
"maximum": 100,
"description": "Maximum refinance loan principal as a percent of current property value (75 means 75%)."
},
"newRatePct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual contractual refinance note interest rate in percent (6 means 6% per year)."
},
"qualifyingRatePct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual interest rate in percent used to size the refinance loan (6.5 means 6.5% per year)."
},
"amortizationYears": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"description": "Whole years in the new loan amortization term."
},
"interestOnlyMonths": {
"type": "integer",
"minimum": 0,
"maximum": 599,
"description": "Whole months at the start of the new loan with interest-only payments."
},
"balloonMonths": {
"type": "integer",
"minimum": 1,
"maximum": 600,
"description": "Whole months from modeled closing until balloon maturity."
},
"closingCostPct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Closing costs as a percent of the sized refinance principal, in addition to fixed costs."
},
"fixedClosingCosts": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "One-time refinance closing costs in USD, in addition to the percentage-based costs."
},
"prepaymentPenalty": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "One-time penalty in USD for paying off the current debt at refinance."
},
"reserveMonths": {
"type": "number",
"minimum": 0,
"maximum": 120,
"description": "Number of months of the new monthly payment to set aside as refinance reserves."
},
"acquiredDate": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(?:19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "Gregorian calendar date, YYYY-MM-DD."
},
"requestedClosingDate": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(?:19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "Gregorian calendar date, YYYY-MM-DD."
},
"analysisDate": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(?:19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "Gregorian calendar date, YYYY-MM-DD."
},
"seasoningMonths": {
"type": "integer",
"minimum": 0,
"maximum": 600,
"description": "Whole calendar months from acquisition required by the caller’s seasoning assumption."
},
"npvHorizonMonths": {
"type": "integer",
"minimum": 1,
"maximum": 600,
"description": "Whole months of payment differences discounted from the modeled refinance closing."
},
"discountRatePct": {
"type": "number",
"minimum": -90,
"maximum": 100,
"description": "Signed annual discount rate in percent for the present value of monthly payment savings (6 means 6% per year)."
},
"limits": {
"type": "object",
"properties": {
"asOf": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(?:19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "Gregorian calendar date, YYYY-MM-DD."
},
"expiresAt": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(?:19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "Gregorian calendar date, YYYY-MM-DD."
},
"requiredDscr": {
"type": "number",
"minimum": 0.01,
"maximum": 10,
"description": "Minimum coverage multiple under the dated assumption (1.25 means income is 1.25 times debt service)."
},
"maxLtvPct": {
"type": "number",
"minimum": 0.01,
"maximum": 100,
"description": "Maximum loan as a percent of property value under the dated assumption (75 means 75%)."
},
"maxLoan": {
"type": "number",
"minimum": 0.01,
"maximum": 1000000000,
"description": "Absolute loan principal ceiling in USD under the dated assumption."
},
"reserveMonths": {
"type": "number",
"minimum": 0,
"maximum": 120,
"description": "Minimum number of months of new monthly debt payments to reserve under the dated assumption."
},
"minimumSeasoningMonths": {
"type": "integer",
"minimum": 0,
"maximum": 600,
"description": "Minimum whole calendar months after acquisition under the dated seasoning assumption."
}
},
"required": [
"asOf",
"expiresAt"
],
"additionalProperties": false
}
},
"required": [
"annualNoi",
"currentValue",
"currentPayoff",
"currentAnnualDebtService",
"targetDscr",
"maxLtvPct",
"newRatePct",
"amortizationYears",
"interestOnlyMonths",
"closingCostPct",
"fixedClosingCosts",
"prepaymentPenalty",
"reserveMonths",
"acquiredDate",
"requestedClosingDate",
"analysisDate",
"seasoningMonths",
"npvHorizonMonths",
"discountRatePct"
],
"additionalProperties": false,
"description": "Sizes a refinance using supplied NOI, value, rate and DSCR/LTV limits. Models closing date and seasoning, reserves, debt payoff, prepayment penalty, cash out, new payments and NPV over the entered horizon. The seasoning state refers to the entered timing assumption."
}Production endpoint: POST https://calc.hasstechapi.com/v2/calc/investor-dscr-refi
Formula: dscr-refi-2.0.0