Investment · Calculation
Cost segregation depreciation scenario
Allocate supplied basis to land, residential or commercial building, and 5/7/15-year property. Models first-year depreciation, bonus election, fiscal-year and mid-quarter conventions, passive loss limits, optional state scenario and disposition recapture.
Example result · formulaVersion: rules-workflows-1.1.0 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-cost-segregation.
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-cost-segregation";
const input = {
"asOfDate": "2026-10-01",
"acquisitionDate": "2026-02-01",
"placedInServiceDate": "2026-03-15",
"taxYearStartDate": "2026-01-01",
"taxYearEndDate": "2026-12-31",
"acquisitionPath": "purchase",
"usedInTradeOrBusinessOrForIncome": true,
"relatedPartyAcquisition": false,
"totalBasis": 500000,
"allocations": [
{
"recoveryClass": "land",
"basis": 100000
},
{
"recoveryClass": "building-27.5",
"basis": 300000
},
{
"recoveryClass": "5-year",
"basis": 60000
},
{
"recoveryClass": "15-year",
"basis": 40000
}
],
"otherAssetsPlacedThisTaxYear": [],
"bonusElection": "automatic",
"passiveActivity": true,
"passiveIncomeAvailable": 25000,
"specialAllowanceAvailable": 0,
"federalMarginalTaxRatePct": 24
};
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-cost-segregation' \
--header "Authorization: Bearer $HT_PRODUCTION_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $request_id" \
--data-binary @- <<'HT_INPUT'
{
"asOfDate": "2026-10-01",
"acquisitionDate": "2026-02-01",
"placedInServiceDate": "2026-03-15",
"taxYearStartDate": "2026-01-01",
"taxYearEndDate": "2026-12-31",
"acquisitionPath": "purchase",
"usedInTradeOrBusinessOrForIncome": true,
"relatedPartyAcquisition": false,
"totalBasis": 500000,
"allocations": [
{
"recoveryClass": "land",
"basis": 100000
},
{
"recoveryClass": "building-27.5",
"basis": 300000
},
{
"recoveryClass": "5-year",
"basis": 60000
},
{
"recoveryClass": "15-year",
"basis": 40000
}
],
"otherAssetsPlacedThisTaxYear": [],
"bonusElection": "automatic",
"passiveActivity": true,
"passiveIncomeAvailable": 25000,
"specialAllowanceAvailable": 0,
"federalMarginalTaxRatePct": 24
}
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-cost-segregation. 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.
formulaVersion- rules-workflows-1.1.0
status- requires-professional-review
basisDifference- 0
Result warnings
- A versioned jurisdiction source is required; no generic rule is substituted.
How to interpret this result
- The caller supplies asset classes, basis and facts for a full 12-month tax year. Omit otherAssetsPlacedThisTaxYear when unknown, or send [] to affirm there are none. State results require a supplied dated public rule. Asset classification and filing require an engineering study and tax professional review.
Full example response (JSON)
{
"status": "available",
"result": {
"formulaVersion": "rules-workflows-1.1.0",
"status": "requires-professional-review",
"basisConserved": true,
"basisDifference": 0,
"landBasis": 100000,
"depreciableBasis": 400000,
"federalBonusPct": 100,
"federalBonusBasis": 100000,
"federalBonusDeduction": 100000,
"midQuarterStatus": "does-not-apply",
"q4PersonalPropertyPct": 0,
"convention": "half-year",
"firstYearFederalDepreciation": 108636.36,
"deductiblePassiveLoss": 25000,
"suspendedPassiveLoss": 83636.36,
"federalFirstYearTaxEffect": 6000,
"stateStatus": "unavailable",
"stateBonusPct": null,
"firstYearStateDepreciation": null,
"section1245Recapture": null,
"unrecapturedSection1250Gain": null,
"professionalHandoff": {
"engineerStudyRequired": true,
"cpaOrEaReviewRequired": true,
"federalAuthority": "IRC 168(k), Pub. 946, and IRS Notice 2026-11",
"stateAuthority": null
},
"issues": [
{
"code": "state-authority-missing",
"severity": "warning",
"message": "A versioned jurisdiction source is required; no generic rule is substituted."
}
],
"warnings": [
{
"code": "state-authority-missing",
"severity": "warning",
"message": "A versioned jurisdiction source is required; no generic rule is substituted."
}
]
},
"formulaVersion": "rules-workflows-1.1.0",
"units": {
"amounts": "USD",
"dates": "YYYY-MM-DD calendar dates",
"rates": "percent points (25 = 25%)"
},
"assumptions": [
"The caller supplies asset classes, basis and facts for a full 12-month tax year. Omit otherAssetsPlacedThisTaxYear when unknown, or send [] to affirm there are none. State results require a supplied dated public rule. Asset classification and filing require an engineering study and tax professional review."
],
"warnings": [
"A versioned jurisdiction source is required; no generic rule is substituted."
],
"creditCost": 20
}Request contract
Accepted inputs
Fields for this example. Expand the schema for all supported combinations and limits.
FieldType, units and limits
asOfDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10acquisitionDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10bindingContractDateOptionalGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10placedInServiceDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10taxYearStartDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10taxYearEndDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10acquisitionPathRequiredusedInTradeOrBusinessOrForIncomeRequiredrelatedPartyAcquisitionRequiredtotalBasisRequiredTotal property tax basis in USD that all recovery-class allocations must reconcile to, including land.
Min 0 · Max 1000000000allocationsRequiredallocations[].recoveryClassRequiredallocations[].basisRequiredUSD of this property’s total basis assigned to the selected recovery class.
Min 0 · Max 1000000000otherAssetsPlacedThisTaxYearOptionalotherAssetsPlacedThisTaxYear[].recoveryClassRequiredotherAssetsPlacedThisTaxYear[].basisRequiredBasis in USD of this additional placed-in-service asset for the convention test, separate from the subject property allocation.
Min 0 · Max 1000000000otherAssetsPlacedThisTaxYear[].placedInServiceDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10bonusElectionRequiredpassiveActivityRequiredpassiveIncomeAvailableRequiredUSD of passive income available to absorb the modeled first-year deduction.
Min 0 · Max 1000000000specialAllowanceAvailableRequiredAdditional USD of caller-determined special allowance available against passive losses.
Min 0 · Max 1000000000federalMarginalTaxRatePctRequiredEntered federal marginal tax rate in percent used to estimate the effect of the first-year deductible amount.
Min 0 · Max 100stateRuleOptionalstateRule.jurisdictionRequiredstateRule.versionRequiredstateRule.sourceUrlRequiredstateRule.effectiveDateRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10stateRule.expiresOnRequiredGregorian calendar date, YYYY-MM-DD.
Format: date · Min length 10 · Max length 10stateRule.conformsToFederalBonusRequiredstateRule.stateBonusPctOptionalEntered state bonus deduction as a percent of eligible basis when the supplied state rule does not conform to the federal percentage.
Min 0 · Max 100dispositionOptionaldisposition.amountRealizedRequiredTotal amount realized on the modeled disposition in USD.
Min 0 · Max 1000000000disposition.allocatedGainFiveYearRequiredUSD of disposition gain allocated to the 5-year class.
Min 0 · Max 1000000000disposition.allocatedGainSevenYearRequiredUSD of disposition gain allocated to the 7-year class.
Min 0 · Max 1000000000disposition.allocatedGainFifteenYearRequiredUSD of disposition gain allocated to the 15-year class.
Min 0 · Max 1000000000disposition.allocatedGainBuildingRequiredUSD of disposition gain allocated to the building.
Min 0 · Max 1000000000disposition.depreciationTakenFiveYearRequiredUSD of prior depreciation taken on the disposed 5-year property.
Min 0 · Max 1000000000disposition.depreciationTakenSevenYearRequiredUSD of prior depreciation taken on the disposed 7-year property.
Min 0 · Max 1000000000disposition.depreciationTakenFifteenYearRequiredUSD of prior depreciation taken on the disposed 15-year property.
Min 0 · Max 1000000000disposition.depreciationTakenBuildingRequiredUSD of prior depreciation taken on the disposed building.
Min 0 · Max 1000000000Example request body (JSON)
{
"asOfDate": "2026-10-01",
"acquisitionDate": "2026-02-01",
"placedInServiceDate": "2026-03-15",
"taxYearStartDate": "2026-01-01",
"taxYearEndDate": "2026-12-31",
"acquisitionPath": "purchase",
"usedInTradeOrBusinessOrForIncome": true,
"relatedPartyAcquisition": false,
"totalBasis": 500000,
"allocations": [
{
"recoveryClass": "land",
"basis": 100000
},
{
"recoveryClass": "building-27.5",
"basis": 300000
},
{
"recoveryClass": "5-year",
"basis": 60000
},
{
"recoveryClass": "15-year",
"basis": 40000
}
],
"otherAssetsPlacedThisTaxYear": [],
"bonusElection": "automatic",
"passiveActivity": true,
"passiveIncomeAvailable": 25000,
"specialAllowanceAvailable": 0,
"federalMarginalTaxRatePct": 24
} Full JSON schema
{
"type": "object",
"properties": {
"asOfDate": {
"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."
},
"acquisitionDate": {
"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."
},
"bindingContractDate": {
"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."
},
"placedInServiceDate": {
"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."
},
"taxYearStartDate": {
"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."
},
"taxYearEndDate": {
"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."
},
"acquisitionPath": {
"enum": [
"purchase",
"construction",
"like-kind",
"gift",
"inheritance"
]
},
"usedInTradeOrBusinessOrForIncome": {
"type": "boolean"
},
"relatedPartyAcquisition": {
"type": "boolean"
},
"totalBasis": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Total property tax basis in USD that all recovery-class allocations must reconcile to, including land."
},
"allocations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"recoveryClass": {
"enum": [
"land",
"building-27.5",
"building-39",
"5-year",
"7-year",
"15-year"
]
},
"basis": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of this property’s total basis assigned to the selected recovery class."
}
},
"required": [
"recoveryClass",
"basis"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 48
},
"otherAssetsPlacedThisTaxYear": {
"type": "array",
"items": {
"type": "object",
"properties": {
"recoveryClass": {
"enum": [
"land",
"building-27.5",
"building-39",
"5-year",
"7-year",
"15-year"
]
},
"basis": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Basis in USD of this additional placed-in-service asset for the convention test, separate from the subject property allocation."
},
"placedInServiceDate": {
"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."
}
},
"required": [
"recoveryClass",
"basis",
"placedInServiceDate"
],
"additionalProperties": false
},
"minItems": 0,
"maxItems": 72
},
"bonusElection": {
"enum": [
"automatic",
"section-168-k-10-40",
"opt-out"
]
},
"passiveActivity": {
"type": "boolean"
},
"passiveIncomeAvailable": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of passive income available to absorb the modeled first-year deduction."
},
"specialAllowanceAvailable": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Additional USD of caller-determined special allowance available against passive losses."
},
"federalMarginalTaxRatePct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Entered federal marginal tax rate in percent used to estimate the effect of the first-year deductible amount."
},
"stateRule": {
"type": "object",
"properties": {
"jurisdiction": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"pattern": "^[A-Z]{2}$"
},
"version": {
"type": "string",
"minLength": 1,
"maxLength": 16,
"pattern": "^[0-9][0-9.-]{0,15}$"
},
"sourceUrl": {
"type": "string",
"minLength": 14,
"maxLength": 240,
"pattern": "^https://[a-z0-9.-]+[.]gov(?:/[a-zA-Z0-9._~/-]*)?$"
},
"effectiveDate": {
"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."
},
"expiresOn": {
"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."
},
"conformsToFederalBonus": {
"type": "boolean"
},
"stateBonusPct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Entered state bonus deduction as a percent of eligible basis when the supplied state rule does not conform to the federal percentage."
}
},
"required": [
"jurisdiction",
"version",
"sourceUrl",
"effectiveDate",
"expiresOn",
"conformsToFederalBonus"
],
"additionalProperties": false
},
"disposition": {
"type": "object",
"properties": {
"amountRealized": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Total amount realized on the modeled disposition in USD."
},
"allocatedGainFiveYear": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of disposition gain allocated to the 5-year class."
},
"allocatedGainSevenYear": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of disposition gain allocated to the 7-year class."
},
"allocatedGainFifteenYear": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of disposition gain allocated to the 15-year class."
},
"allocatedGainBuilding": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of disposition gain allocated to the building."
},
"depreciationTakenFiveYear": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of prior depreciation taken on the disposed 5-year property."
},
"depreciationTakenSevenYear": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of prior depreciation taken on the disposed 7-year property."
},
"depreciationTakenFifteenYear": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of prior depreciation taken on the disposed 15-year property."
},
"depreciationTakenBuilding": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "USD of prior depreciation taken on the disposed building."
}
},
"required": [
"amountRealized",
"allocatedGainFiveYear",
"allocatedGainSevenYear",
"allocatedGainFifteenYear",
"allocatedGainBuilding",
"depreciationTakenFiveYear",
"depreciationTakenSevenYear",
"depreciationTakenFifteenYear",
"depreciationTakenBuilding"
],
"additionalProperties": false
}
},
"required": [
"asOfDate",
"acquisitionDate",
"placedInServiceDate",
"taxYearStartDate",
"taxYearEndDate",
"acquisitionPath",
"usedInTradeOrBusinessOrForIncome",
"relatedPartyAcquisition",
"totalBasis",
"allocations",
"bonusElection",
"passiveActivity",
"passiveIncomeAvailable",
"specialAllowanceAvailable",
"federalMarginalTaxRatePct"
],
"additionalProperties": false,
"description": "Allocate supplied basis to land, residential or commercial building, and 5/7/15-year property. Models first-year depreciation, bonus election, fiscal-year and mid-quarter conventions, passive loss limits, optional state scenario and disposition recapture."
}Production endpoint: POST https://calc.hasstechapi.com/v2/calc/investor-cost-segregation
Formula: rules-workflows-1.1.0