Investment · Calculation
Compare four property strategies
Ranks purchase-and-hold, fix and flip, BRRRR and wholesale under a common dated horizon. The objective may be NPV, IRR, equity multiple or balanced. The fixed app cash model discloses each financing convention and assumes the same before- and after-tax cash flows.
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-compare-strategies.
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-compare-strategies";
const input = {
"purchasePrice": 200000,
"monthlyRent": 2400,
"rehabCosts": 30000,
"arv": 290000,
"downPaymentPct": 25,
"interestRate": 6,
"closingCostsPct": 3,
"vacancyRate": 5,
"operatingExpensePct": 30,
"holdingPeriod": 6,
"monthlyHoldingCosts": 400,
"sellingCostsPct": 6,
"refiLTV": 75,
"refiRate": 7,
"assignmentFee": 10000,
"investorProfitPct": 20,
"requiredDscr": 1.25,
"startDate": "2025-01-01",
"horizonYears": 5,
"discountRatePct": 8,
"objective": "npv"
};
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-compare-strategies' \
--header "Authorization: Bearer $HT_PRODUCTION_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $request_id" \
--data-binary @- <<'HT_INPUT'
{
"purchasePrice": 200000,
"monthlyRent": 2400,
"rehabCosts": 30000,
"arv": 290000,
"downPaymentPct": 25,
"interestRate": 6,
"closingCostsPct": 3,
"vacancyRate": 5,
"operatingExpensePct": 30,
"holdingPeriod": 6,
"monthlyHoldingCosts": 400,
"sellingCostsPct": 6,
"refiLTV": 75,
"refiRate": 7,
"assignmentFee": 10000,
"investorProfitPct": 20,
"requiredDscr": 1.25,
"startDate": "2025-01-01",
"horizonYears": 5,
"discountRatePct": 8,
"objective": "npv"
}
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-compare-strategies. 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- compare-strategies-2.0.0
value.horizonStart- 2025-01-01
Result warnings
- Taxes are not inferred; the before-tax and after-tax ledgers are intentionally identical.
- Operations use fixed current cash flow with annual modeled receipts. At the common end, Hold recovers contributed capital and BRRRR recovers net refinance cash. Actual refinance timing, market exit equity, changing debt service, and taxes are not modeled.
How to interpret this result
- Ranks purchase-and-hold, fix and flip, BRRRR and wholesale under a common dated horizon. The objective may be NPV, IRR, equity multiple or balanced. The fixed app cash model discloses each financing convention and assumes the same before- and after-tax cash flows.
Full example response (JSON)
{
"status": "available",
"result": {
"state": "available",
"fieldErrors": {},
"warnings": [
{
"code": "comparison-tax-boundary",
"severity": "warning",
"message": "Taxes are not inferred; the before-tax and after-tax ledgers are intentionally identical."
},
{
"code": "comparison-cash-model-boundary",
"severity": "info",
"message": "Operations use fixed current cash flow with annual modeled receipts. At the common end, Hold recovers contributed capital and BRRRR recovers net refinance cash. Actual refinance timing, market exit equity, changing debt service, and taxes are not modeled."
}
],
"assumptions": [
{
"key": "dayCount",
"value": "ACT/365F",
"source": "default"
},
{
"key": "comparisonCashModelVersion",
"value": "property-comparison-cash-1.1.0",
"source": "default"
},
{
"key": "periodicCashTiming",
"value": "annual anniversaries at fixed current cash flow",
"source": "default"
},
{
"key": "holdTerminalCash",
"value": "contributed capital; market exit equity not modeled",
"source": "default"
},
{
"key": "brrrrTerminalCash",
"value": "net refinance cash at common end; actual refinance timing and residual equity not modeled",
"source": "default"
},
{
"key": "holdDebtTerm",
"value": "30",
"unit": "years",
"source": "default"
},
{
"key": "holdOperatingExpenses",
"value": "30",
"unit": "% of rent (same input as BRRRR)",
"source": "user"
},
{
"key": "flipInterestCarry",
"value": "interest-only",
"unit": "purchase loan × rate ÷ 12 per holding month",
"source": "default"
},
{
"key": "brrrrRefiDebtTerm",
"value": "30",
"unit": "years",
"source": "default"
},
{
"key": "brrrrRefiClosingCosts",
"value": "2",
"unit": "% of ARV",
"source": "default"
},
{
"key": "brrrrRefiSizing",
"value": "min(ARV x LTV, NOI / 1.25 DSCR / debt constant, ARV)",
"source": "user"
},
{
"key": "flipLoanPoints",
"value": "2",
"unit": "% of loan amount",
"source": "default"
},
{
"key": "wholesaleHoldingCosts",
"value": "0",
"unit": "currency",
"source": "default"
},
{
"key": "taxTreatment",
"value": "not modeled",
"source": "default"
}
],
"provenance": [
{
"source": "Microsoft XNPV/XIRR ACT/365F definitions",
"asOf": "2026-08-13"
}
],
"formulaVersion": "compare-strategies-2.0.0",
"ruleVersions": [],
"auditTrail": [
"Compared 4 strategies over 2025-01-01 through 2030-01-01.",
"Discounted every dated before-tax and after-tax ledger at 8% using ACT/365F.",
"Ranked by npv; exposed scores and non-dominated frontier.",
"Built selected-horizon cash scenarios under property-comparison-cash-1.1.0; initial cash and modeled recovery are counted once.",
"Surfaced every fixed compatibility-model input and withheld any suitability recommendation."
],
"value": {
"horizonStart": "2025-01-01",
"horizonEnd": "2030-01-01",
"discountRatePct": "8",
"dayCount": "ACT/365F",
"objective": "npv",
"strategies": [
{
"id": "wholesale",
"label": "Wholesale",
"capitalInvested": "0",
"beforeTaxNpv": "9905.57",
"afterTaxNpv": "9905.57",
"afterTaxIrr": null,
"irrState": "no-root",
"afterTaxEquityMultiple": null,
"afterTaxNetCash": "10000",
"score": 9905.57,
"dominated": false
},
{
"id": "flip",
"label": "Fix & Flip",
"capitalInvested": "89000",
"beforeTaxNpv": "22367.59",
"afterTaxNpv": "22367.59",
"afterTaxIrr": 0.6973651007124894,
"irrState": "available",
"afterTaxEquityMultiple": "1.3",
"afterTaxNetCash": "26700",
"score": 22367.59,
"dominated": false
},
{
"id": "hold",
"label": "Buy & Hold",
"capitalInvested": "86000",
"beforeTaxNpv": "4170.02",
"afterTaxNpv": "4170.02",
"afterTaxIrr": 0.09213917926806449,
"irrState": "available",
"afterTaxEquityMultiple": "1.460935496933185988372093023255813953488",
"afterTaxNetCash": "39640.45",
"score": 4170.02,
"dominated": false
},
{
"id": "brrrr",
"label": "BRRRR",
"capitalInvested": "86000",
"beforeTaxNpv": "-38457.18",
"afterTaxNpv": "-38457.18",
"afterTaxIrr": -0.05673142211253096,
"irrState": "available",
"afterTaxEquityMultiple": "0.7717833782286510697674418604651162790698",
"afterTaxNetCash": "-19626.63",
"score": -38457.18,
"dominated": true
}
],
"ranking": [
"flip",
"wholesale",
"hold",
"brrrr"
],
"frontier": [
"wholesale",
"flip",
"hold"
]
},
"scenarios": [
{
"strategy": "wholesale",
"strategyLabel": "Wholesale",
"totalCashNeeded": 0,
"monthlyCashFlow": 0,
"annualCashFlow": 0,
"totalProjectedProfit": 10000,
"cashOnCashReturn": null,
"cashOnCashStatus": "not-applicable",
"timeHorizon": "30-60 days"
},
{
"strategy": "flip",
"strategyLabel": "Fix & Flip",
"totalCashNeeded": 89000,
"monthlyCashFlow": 0,
"annualCashFlow": 0,
"totalProjectedProfit": 26700,
"cashOnCashReturn": 30,
"cashOnCashStatus": "available",
"timeHorizon": "6 months"
},
{
"strategy": "hold",
"strategyLabel": "Buy & Hold",
"totalCashNeeded": 86000,
"monthlyCashFlow": 660.6742122709,
"annualCashFlow": 7928.090547250799,
"totalProjectedProfit": 39640.452736253996,
"cashOnCashReturn": 9.21870993866372,
"cashOnCashStatus": "available",
"timeHorizon": "5 years"
},
{
"strategy": "brrrr",
"strategyLabel": "BRRRR",
"totalCashNeeded": 86000,
"monthlyCashFlow": 336.00000879439995,
"annualCashFlow": 4032.0001055327994,
"totalProjectedProfit": -19626.629472336008,
"cashOnCashReturn": 10.134057861982276,
"cashOnCashStatus": "available",
"timeHorizon": "5 years"
}
]
},
"formulaVersion": "compare-strategies-2.0.0/property-comparison-cash-1.1.0",
"units": {
"currency": "USD",
"holdingPeriod": "months",
"horizonYears": "years",
"requiredDscr": "ratio",
"interestRate": "annual percent",
"refiRate": "annual percent",
"discountRatePct": "annual percent",
"ratesAndShares": "percent (6 means 6%)",
"afterTaxIrr": "fractional annual return",
"afterTaxEquityMultiple": "multiple of invested cash"
},
"assumptions": [
"Ranks purchase-and-hold, fix and flip, BRRRR and wholesale under a common dated horizon. The objective may be NPV, IRR, equity multiple or balanced. The fixed app cash model discloses each financing convention and assumes the same before- and after-tax cash flows."
],
"warnings": [
"Taxes are not inferred; the before-tax and after-tax ledgers are intentionally identical.",
"Operations use fixed current cash flow with annual modeled receipts. At the common end, Hold recovers contributed capital and BRRRR recovers net refinance cash. Actual refinance timing, market exit equity, changing debt service, and taxes are not modeled."
],
"creditCost": 20
}Request contract
Accepted inputs
Fields for this example. Expand the schema for all supported combinations and limits.
FieldType, units and limits
purchasePriceRequiredAcquisition price, in USD.
Min 0.01 · Max 1000000000monthlyRentRequiredScheduled gross rent, in USD per month before vacancy.
Min 0 · Max 1000000000rehabCostsRequiredTotal rehabilitation budget, in USD.
Min 0 · Max 1000000000arvRequiredCaller-assumed after-repair property value, in USD.
Min 0.01 · Max 1000000000downPaymentPctRequiredDown payment as a percentage of the purchase price (25 means 25%).
Min 0 · Max 100interestRateRequiredNominal annual interest rate on the purchase loan, in percent (6 means 6%).
Min 0 · Max 100closingCostsPctRequiredAcquisition closing costs as a percentage of purchase price.
Min 0 · Max 100vacancyRateRequiredUncollected share of scheduled rent, in percent (5 means 5%).
Min 0 · Max 100operatingExpensePctRequiredOperating expenses as a percentage of gross scheduled monthly rent.
Min 0 · Max 100holdingPeriodRequiredLength of the flip before sale, in whole months.
Min 1 · Max 120monthlyHoldingCostsRequiredFlip carrying expenses before acquisition loan interest, in USD per month.
Min 0 · Max 1000000000sellingCostsPctRequiredFlip disposition costs as a percentage of the assumed sale price (ARV).
Min 0 · Max 100refiLTVRequiredMaximum modeled refinance balance as a percentage of assumed ARV.
Min 0 · Max 100refiRateRequiredAnnual refinance interest rate, in percent.
Min 0 · Max 100assignmentFeeRequiredWholesale assignment fee, in USD.
Min 0 · Max 1000000000investorProfitPctRequiredWholesale end-buyer target profit as a percentage of ARV.
Min 0 · Max 100requiredDscrOptionalMinimum ratio of annual net operating income to annual debt service (1.25 means 1.25×).
Min 0.01 · Max 100startDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10horizonYearsRequiredCommon comparison period after the start date, in whole years.
Min 1 · Max 50discountRatePctRequiredAnnual discount rate for net present value, in percent (8 means 8%).
Min -50 · Max 100objectiveRequiredExample request body (JSON)
{
"purchasePrice": 200000,
"monthlyRent": 2400,
"rehabCosts": 30000,
"arv": 290000,
"downPaymentPct": 25,
"interestRate": 6,
"closingCostsPct": 3,
"vacancyRate": 5,
"operatingExpensePct": 30,
"holdingPeriod": 6,
"monthlyHoldingCosts": 400,
"sellingCostsPct": 6,
"refiLTV": 75,
"refiRate": 7,
"assignmentFee": 10000,
"investorProfitPct": 20,
"requiredDscr": 1.25,
"startDate": "2025-01-01",
"horizonYears": 5,
"discountRatePct": 8,
"objective": "npv"
} Full JSON schema
{
"type": "object",
"properties": {
"purchasePrice": {
"type": "number",
"minimum": 0.01,
"maximum": 1000000000,
"description": "Acquisition price, in USD."
},
"monthlyRent": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Scheduled gross rent, in USD per month before vacancy."
},
"rehabCosts": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Total rehabilitation budget, in USD."
},
"arv": {
"type": "number",
"minimum": 0.01,
"maximum": 1000000000,
"description": "Caller-assumed after-repair property value, in USD."
},
"downPaymentPct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Down payment as a percentage of the purchase price (25 means 25%)."
},
"interestRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Nominal annual interest rate on the purchase loan, in percent (6 means 6%)."
},
"closingCostsPct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Acquisition closing costs as a percentage of purchase price."
},
"vacancyRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Uncollected share of scheduled rent, in percent (5 means 5%)."
},
"operatingExpensePct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Operating expenses as a percentage of gross scheduled monthly rent."
},
"holdingPeriod": {
"type": "integer",
"minimum": 1,
"maximum": 120,
"description": "Length of the flip before sale, in whole months."
},
"monthlyHoldingCosts": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Flip carrying expenses before acquisition loan interest, in USD per month."
},
"sellingCostsPct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Flip disposition costs as a percentage of the assumed sale price (ARV)."
},
"refiLTV": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Maximum modeled refinance balance as a percentage of assumed ARV."
},
"refiRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual refinance interest rate, in percent."
},
"assignmentFee": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Wholesale assignment fee, in USD."
},
"investorProfitPct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Wholesale end-buyer target profit as a percentage of ARV."
},
"requiredDscr": {
"type": "number",
"minimum": 0.01,
"maximum": 100,
"description": "Minimum ratio of annual net operating income to annual debt service (1.25 means 1.25×)."
},
"startDate": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Gregorian calendar date, YYYY-MM-DD."
},
"horizonYears": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"description": "Common comparison period after the start date, in whole years."
},
"discountRatePct": {
"type": "number",
"minimum": -50,
"maximum": 100,
"description": "Annual discount rate for net present value, in percent (8 means 8%)."
},
"objective": {
"enum": [
"npv",
"irr",
"equity-multiple",
"balanced"
]
}
},
"required": [
"purchasePrice",
"monthlyRent",
"rehabCosts",
"arv",
"downPaymentPct",
"interestRate",
"closingCostsPct",
"vacancyRate",
"operatingExpensePct",
"holdingPeriod",
"monthlyHoldingCosts",
"sellingCostsPct",
"refiLTV",
"refiRate",
"assignmentFee",
"investorProfitPct",
"startDate",
"horizonYears",
"discountRatePct",
"objective"
],
"additionalProperties": false,
"description": "Ranks purchase-and-hold, fix and flip, BRRRR and wholesale under a common dated horizon. The objective may be NPV, IRR, equity multiple or balanced. The fixed app cash model discloses each financing convention and assumes the same before- and after-tax cash flows."
}Production endpoint: POST https://calc.hasstechapi.com/v2/calc/investor-compare-strategies
Formula: compare-strategies-2.0.0/property-comparison-cash-1.1.0