Skip to content

Investment · Calculation

After-repair scenario and manual comparable analysis

Applies the supplied after-repair value or the median price per square foot from three or more supplied sales to the profit, offer-rule and price-drop scenarios. Dated comparable sales with distances support a separate weighted planning range. Licensed appraiser review remains outstanding.

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-arv-comparables.

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

Production request

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-arv-comparables";
const input = {
  "purchasePrice": 150000,
  "repairCosts": 20000,
  "holdingCostsPerMonth": 1000,
  "holdingPeriodMonths": 3,
  "sellingCostsPct": 5,
  "arvRulePercent": 70,
  "subjectSquareFeet": 1000,
  "calculationDate": "2026-04-01",
  "comparables": [
    {
      "squareFeet": 1000,
      "salePrice": 190000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    },
    {
      "squareFeet": 1000,
      "salePrice": 200000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    },
    {
      "squareFeet": 1000,
      "salePrice": 210000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    }
  ]
};
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/investor-arv-comparables' \
    --header "Authorization: Bearer $HT_PRODUCTION_KEY" \
    --header 'Content-Type: application/json' \
    --header "Idempotency-Key: $request_id" \
    --data-binary @- <<'HT_INPUT'
{
  "purchasePrice": 150000,
  "repairCosts": 20000,
  "holdingCostsPerMonth": 1000,
  "holdingPeriodMonths": 3,
  "sellingCostsPct": 5,
  "arvRulePercent": 70,
  "subjectSquareFeet": 1000,
  "calculationDate": "2026-04-01",
  "comparables": [
    {
      "squareFeet": 1000,
      "salePrice": 190000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    },
    {
      "squareFeet": 1000,
      "salePrice": 200000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    },
    {
      "squareFeet": 1000,
      "salePrice": 210000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    }
  ]
}
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 investor-arv-comparables.
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.

state
available
effectiveArv
200000
summary.medianPricePerSqft
200 USD/ft²

Result warnings

  • This is a planning range, not an appraisal. Licensed appraiser review remains required and is not satisfied by this result.
How to interpret this result
  • Applies the supplied after-repair value or the median price per square foot from three or more supplied sales to the profit, offer-rule and price-drop scenarios. Dated comparable sales with distances support a separate weighted planning range. Licensed appraiser review remains outstanding.
Full example response (JSON)
{
  "status": "available",
  "result": {
    "state": "available",
    "warnings": [
      {
        "code": "appraiser-review-required",
        "severity": "critical",
        "message": "This is a planning range, not an appraisal. Licensed appraiser review remains required and is not satisfied by this result."
      }
    ],
    "effectiveArv": 200000,
    "summary": {
      "medianPricePerSqft": 200,
      "minPricePerSqft": 190,
      "maxPricePerSqft": 210,
      "suggestedArv": 200000,
      "validCompCount": 3
    },
    "analysis": {
      "totalHoldingCosts": 3000,
      "totalInvestment": 173000,
      "sellingCostsAmt": 10000,
      "netSaleProceeds": 190000,
      "profit": 17000,
      "roi": 9.826589595375722,
      "roiStatus": "available",
      "maxPurchase70": 117000,
      "passes70": false,
      "sensitivity": [
        {
          "pctDrop": 5,
          "adjARV": 190000,
          "adjProfit": 7500,
          "adjROI": 4.335260115606936
        },
        {
          "pctDrop": 10,
          "adjARV": 180000,
          "adjProfit": -2000,
          "adjROI": -1.1560693641618496
        },
        {
          "pctDrop": 15,
          "adjARV": 170000,
          "adjProfit": -11500,
          "adjROI": -6.6473988439306355
        }
      ]
    },
    "weighted": {
      "state": "available",
      "fieldErrors": {},
      "warnings": [
        {
          "code": "appraiser-review-required",
          "severity": "critical",
          "message": "This is a planning range, not an appraisal. Licensed appraiser review remains required and is not satisfied by this result."
        }
      ],
      "assumptions": [
        {
          "key": "comparables[0].conditionAdjustment",
          "value": "0",
          "source": "default"
        },
        {
          "key": "comparables[0].featureAdjustment",
          "value": "0",
          "source": "default"
        },
        {
          "key": "comparables[0].confidencePct",
          "value": "75",
          "source": "default"
        },
        {
          "key": "comparables[1].conditionAdjustment",
          "value": "0",
          "source": "default"
        },
        {
          "key": "comparables[1].featureAdjustment",
          "value": "0",
          "source": "default"
        },
        {
          "key": "comparables[1].confidencePct",
          "value": "75",
          "source": "default"
        },
        {
          "key": "comparables[2].conditionAdjustment",
          "value": "0",
          "source": "default"
        },
        {
          "key": "comparables[2].featureAdjustment",
          "value": "0",
          "source": "default"
        },
        {
          "key": "comparables[2].confidencePct",
          "value": "75",
          "source": "default"
        }
      ],
      "provenance": [],
      "formulaVersion": "arv-weighted-evidence-2.1.0",
      "ruleVersions": [],
      "auditTrail": [
        "3 adjusted comparable indications were normalized to weights summing to 1.",
        "Reported range is the observed adjusted indication range 190000.00 through 210000.00.",
        "Confidence factors: completeness 62.50%, distance 50.00%, size 100.00%, recency 92.17%, effective sample 3.000 (75.00%).",
        "Licensed appraiser review remains required-not-completed; no appraisal conclusion is issued."
      ],
      "value": {
        "estimate": "200000",
        "low": "190000",
        "high": "210000",
        "confidencePct": "62.97",
        "confidenceFactors": {
          "completenessPct": "62.5",
          "distanceQualityPct": "50",
          "sizeSimilarityPct": "100",
          "recencyPct": "92.17",
          "effectiveSampleSize": "3",
          "effectiveSamplePct": "75"
        },
        "appraiserReviewStatus": "required-not-completed",
        "comparables": [
          {
            "id": "comp-1",
            "adjustedSalePrice": "190000",
            "indicatedSubjectValue": "190000",
            "normalizedWeight": "0.3333333333333333333333333333333333333334",
            "ageDays": 31,
            "stale": false
          },
          {
            "id": "comp-2",
            "adjustedSalePrice": "200000",
            "indicatedSubjectValue": "200000",
            "normalizedWeight": "0.3333333333333333333333333333333333333334",
            "ageDays": 31,
            "stale": false
          },
          {
            "id": "comp-3",
            "adjustedSalePrice": "210000",
            "indicatedSubjectValue": "210000",
            "normalizedWeight": "0.3333333333333333333333333333333333333334",
            "ageDays": 31,
            "stale": false
          }
        ]
      }
    }
  },
  "formulaVersion": "investor-arv-comparables-1.0.0",
  "units": {
    "monetaryAmounts": "USD",
    "calendarDates": "YYYY-MM-DD",
    "squareFeet": "ft²",
    "subjectSquareFeet": "ft²",
    "distanceMiles": "miles",
    "conditionAdjustment": "signed USD",
    "featureAdjustment": "signed USD",
    "holdingCostsPerMonth": "USD/month",
    "arvRulePercent": "percent",
    "medianPricePerSqft": "USD/ft²"
  },
  "assumptions": [
    "Applies the supplied after-repair value or the median price per square foot from three or more supplied sales to the profit, offer-rule and price-drop scenarios. Dated comparable sales with distances support a separate weighted planning range. Licensed appraiser review remains outstanding."
  ],
  "warnings": [
    "This is a planning range, not an appraisal. Licensed appraiser review remains required and is not satisfied by this result."
  ],
  "creditCost": 20
}

Request contract

Accepted inputs

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

FieldType, units and limits

purchasePriceRequired
number

Acquisition price, USD.

Min 0 · Max 1000000000
repairCostsRequired
number

Upfront repair budget, USD.

Min 0 · Max 1000000000
afterRepairValueOptional
number

Assumed post-repair value overriding the median estimate, USD.

Min 0.01 · Max 1000000000
holdingCostsPerMonthRequired
number

Carrying cost, USD/month.

Min 0 · Max 1000000000
holdingPeriodMonthsRequired
integer

Hold length, whole months.

Min 0 · Max 120
sellingCostsPctRequired
number

Sale expenses as a percent of assumed ARV.

Min 0 · Max 100
arvRulePercentRequired
number

ARV share in the maximum purchase rule, percentage points.

Min 0 · Max 100
subjectSquareFeetRequired
number

Subject floor area, square feet.

Min 0 · Max 1000000
calculationDateRequired
string

Gregorian calendar date, YYYY-MM-DD.

Format: date · Min length 10 · Max length 10
comparablesRequired
arrayMin items 0 · Max items 25
comparables[].squareFeetRequired
number

Comparable floor area, square feet.

Min 0.01 · Max 1000000000
comparables[].salePriceRequired
number

Comparable transaction price, USD.

Min 0.01 · Max 1000000000
comparables[].distanceMilesOptional
number

Distance between subject and comparable, miles.

Min 0 · Max 200
comparables[].saleDateOptional
string

Gregorian calendar date, YYYY-MM-DD.

Format: date · Min length 10 · Max length 10
comparables[].conditionAdjustmentOptional
number

Condition adjustment to sale price, signed USD.

Min -1000000000 · Max 1000000000
comparables[].featureAdjustmentOptional
number

Feature adjustment to sale price, signed USD.

Min -1000000000 · Max 1000000000
comparables[].confidencePctOptional
number

Assumed confidence weight for this comparable, percentage points.

Min 0 · Max 100
Example request body (JSON)
{
  "purchasePrice": 150000,
  "repairCosts": 20000,
  "holdingCostsPerMonth": 1000,
  "holdingPeriodMonths": 3,
  "sellingCostsPct": 5,
  "arvRulePercent": 70,
  "subjectSquareFeet": 1000,
  "calculationDate": "2026-04-01",
  "comparables": [
    {
      "squareFeet": 1000,
      "salePrice": 190000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    },
    {
      "squareFeet": 1000,
      "salePrice": 200000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    },
    {
      "squareFeet": 1000,
      "salePrice": 210000,
      "distanceMiles": 1,
      "saleDate": "2026-03-01"
    }
  ]
}
Full JSON schema
{
  "type": "object",
  "properties": {
    "purchasePrice": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000,
      "description": "Acquisition price, USD."
    },
    "repairCosts": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000,
      "description": "Upfront repair budget, USD."
    },
    "afterRepairValue": {
      "type": "number",
      "minimum": 0.01,
      "maximum": 1000000000,
      "description": "Assumed post-repair value overriding the median estimate, USD."
    },
    "holdingCostsPerMonth": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000,
      "description": "Carrying cost, USD/month."
    },
    "holdingPeriodMonths": {
      "type": "integer",
      "minimum": 0,
      "maximum": 120,
      "description": "Hold length, whole months."
    },
    "sellingCostsPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Sale expenses as a percent of assumed ARV."
    },
    "arvRulePercent": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "ARV share in the maximum purchase rule, percentage points."
    },
    "subjectSquareFeet": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000,
      "description": "Subject floor area, square feet."
    },
    "calculationDate": {
      "type": "string",
      "format": "date",
      "minLength": 10,
      "maxLength": 10,
      "pattern": "^(?!00)\\d{4}-\\d{2}-\\d{2}$",
      "description": "Gregorian calendar date, YYYY-MM-DD."
    },
    "comparables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "squareFeet": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000000,
            "description": "Comparable floor area, square feet."
          },
          "salePrice": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000000,
            "description": "Comparable transaction price, USD."
          },
          "distanceMiles": {
            "type": "number",
            "minimum": 0,
            "maximum": 200,
            "description": "Distance between subject and comparable, miles."
          },
          "saleDate": {
            "type": "string",
            "format": "date",
            "minLength": 10,
            "maxLength": 10,
            "pattern": "^(?!00)\\d{4}-\\d{2}-\\d{2}$",
            "description": "Gregorian calendar date, YYYY-MM-DD."
          },
          "conditionAdjustment": {
            "type": "number",
            "minimum": -1000000000,
            "maximum": 1000000000,
            "description": "Condition adjustment to sale price, signed USD."
          },
          "featureAdjustment": {
            "type": "number",
            "minimum": -1000000000,
            "maximum": 1000000000,
            "description": "Feature adjustment to sale price, signed USD."
          },
          "confidencePct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Assumed confidence weight for this comparable, percentage points."
          }
        },
        "required": [
          "squareFeet",
          "salePrice"
        ],
        "additionalProperties": false
      },
      "minItems": 0,
      "maxItems": 25
    }
  },
  "required": [
    "purchasePrice",
    "repairCosts",
    "holdingCostsPerMonth",
    "holdingPeriodMonths",
    "sellingCostsPct",
    "arvRulePercent",
    "subjectSquareFeet",
    "calculationDate",
    "comparables"
  ],
  "additionalProperties": false,
  "description": "Applies the supplied after-repair value or the median price per square foot from three or more supplied sales to the profit, offer-rule and price-drop scenarios. Dated comparable sales with distances support a separate weighted planning range. Licensed appraiser review remains outstanding."
}

Production endpoint: POST https://calc.hasstechapi.com/v2/calc/investor-arv-comparables
Formula: investor-arv-comparables-1.0.0

Related PDF reports