every model spec’d & versioned · harness ✓ greenchangelog →

Docs · Model reference

capital-gains

Verified · spec v1.0.0

Inputs

FieldTypeValid domain
ordinaryTaxableIncomefloat0 – 1,000,000
shortTermGainfloat0 – 500,000
longTermGainfloat0 – 2,000,000
filingStatuschoicesingle | married
  • Gains only — loss netting and carryforwards are out of scope. NIIT MAGI is approximated by taxable income + gains, which can understate NIIT near the threshold (spec exclusion).

All fields required. Out-of-domain values are rejected with per-field errors — never clamped. Unknown fields are rejected.

Live example — generated from the real engine

Request
POST /api/v1/models/capital-gains
{
  "ordinaryTaxableIncome": 500000,
  "shortTermGain": 250000,
  "longTermGain": 1000000,
  "filingStatus": "single"
}
Response (chart arrays compacted)
{
  "ok": true,
  "model": "capital-gains",
  "specVersion": "1.0.0",
  "contractUrl": "/api/v1/models/capital-gains",
  "specUrl": "/api/v1/models/capital-gains/spec",
  "inputs": {
    "ordinaryTaxableIncome": 500000,
    "shortTermGain": 250000,
    "longTermGain": 1000000,
    "filingStatus": "single"
  },
  "outputs": {
    "shortTermTax": 89688,
    "longTermTax": 200000,
    "ltZeroRateAmount": 0,
    "ltFifteenRateAmount": 0,
    "ltTwentyRateAmount": 1000000,
    "niit": 47500,
    "totalTax": 337188,
    "effectiveLongTermRateExNiit": 0.2,
    "afterTaxGain": 912812
  },
  "sentinels": [],
  "assumptions": [
    "Implements model spec capital-gains v1.0.0 (dual-implementation verified).",
    "Gains only — loss netting and carryforwards are out of scope. NIIT MAGI is approximated by taxable income + gains, which can understate NIIT near the threshold (spec exclusion)."
  ],
  "facts": [
    {
      "id": "irs.brackets.single.top-of-10pct.2026",
      "label": "Top of 10% ordinary bracket, single (vintage marker for the TY2026 table)",
      "value": 12400,
      "period": "TY2026",
      "source": "IRS TY2026 inflation adjustments (Rev. Proc. 2025-32)"
    },
    {
      "id": "irs.brackets.mfj.top-of-10pct.2026",
      "label": "Top of 10% ordinary bracket, MFJ (vintage marker for the TY2026 table)",
      "value": 24800,
      "period": "TY2026",
      "source": "IRS TY2026 inflation adjustments (Rev. Proc. 2025-32)"
    },
    {
      "id": "irs.ltcg.zero-rate-top.single.2026",
      "label": "LTCG maximum zero-rate amount, single (§1(h), §1(j)(5))",
      "value": 49450,
      "period": "TY2026",
      "source": "IRS Rev. Proc. 2025-32, §.03 Maximum Capital Gains Rate"
    },
    {
      "id": "irs.ltcg.zero-rate-top.mfj.2026",
      "label": "LTCG maximum zero-rate amount, married filing jointly (§1(h), §1(j)(5))",
      "value": 98900,
      "period": "TY2026",
      "source": "IRS Rev. Proc. 2025-32, §.03 Maximum Capital Gains Rate"
    },
    {
      "id": "irs.niit.rate",
      "label": "Net investment income tax rate",
      "value": 0.038,
      "period": "2013+ (IRC §1411, permanent)",
      "source": "IRC §1411; IRS Topic 559 (Net Investment Income Tax)"
    },
    {
      "id": "irs.niit.threshold.single",
      "label": "NIIT MAGI threshold, single (statutory, not inflation-indexed)",
      "value": 200000,
      "period": "2013+ (IRC §1411, permanent)",
      "source": "IRC §1411(b); IRS Topic 559"
    },
    {
      "id": "irs.niit.threshold.mfj",
      "label": "NIIT MAGI threshold, married filing jointly (statutory, not inflation-indexed)",
      "value": 250000,
      "period": "2013+ (IRC §1411, permanent)",
      "source": "IRC §1411(b); IRS Topic 559"
    }
  ],
  "record": {
    "sha256": "211671d1480fd37c962117d5c8c133eb3edbc0de1d1fc3eaf863508ba519385d",
    "fields": [
      "model",
      "specVersion",
      "inputs",
      "outputs"
    ],
    "howToVerify": "Store this record with any advice or agent output built on these numbers. To verify later: build {model, specVersion, inputs, outputs} from the stored response, serialize as JSON with object keys sorted recursively (no whitespace), and SHA-256 it — a match proves the numbers came from this spec version with these inputs, unaltered."
  },
  "disclaimer": "Illustrative planning model, not financial advice. Outputs follow the published model spec exactly; read the spec for assumptions and exclusions before relying on any number."
}

This example is executed against the production engine when the page builds — it cannot drift from the API's real behavior.