Skip to content

Limit Alabama, North Carolina and Hawaii mortgage interest to the amounts their laws allow - #10274

Open
MaxGhenis wants to merge 5 commits into
mainfrom
state-mortgage-interest-federal-cap
Open

MaxGhenis wants to merge 5 commits into
mainfrom
state-mortgage-interest-federal-cap

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Alabama, North Carolina and Hawaii read uncapped mortgage_interest, so they allowed interest on debt above the IRC 163(h)(3) acquisition-debt limits. With $40,000 of interest on $1.5M of 2020 debt, main allows $40,000 in all three states. Federal law allows $20,000.

  • Alabama and North Carolina allow only the interest federal law allows. They now read deductible_mortgage_interest, the amount after the federal limits.
  • Hawaii makes IRC 163(h)(3)(F) inoperative, so it keeps the pre-TCJA limits: $1,000,000 of acquisition debt plus $100,000 of home equity debt. The new hi_mortgage_interest_deduction applies them using the N-11 / 2017 Publication 936 worksheet calculation with a PE federal-floor safeguard.

The US + core hub's round-2 review of #10003 found the defect; it is pre-existing on main. This PR supersedes the unopened branch al-nc-mortgage-interest-federal-cap (2efb58d). That branch's review blockers (mixed-vintage and grandfathered debt) were fixed on main by #10025.

Law

State Provision What it allows
Alabama Code of Alabama 40-18-15(a)(2): interest "limited to the amount allowable as an interest deduction for federal income tax purposes in the corresponding tax year or period pursuant to the provisions of 26 U.S.C. §§ 163, 264, and 265". Act 2026-604 (HB527) restyles the section and keeps this text. Federal amount
2025 Form 40 instructions, Schedule A lines 10a–14, PDF pp. 19–20: "limited in most cases to the same amount as currently allowable for federal purposes". The "in most cases" covers the Mortgage Interest Credit exception, which PE does not model.
North Carolina G.S. 105-153.5(a)(2)b: "the amount allowed as a deduction for interest paid or accrued during the taxable year under section 163(h) of the Code with respect to any qualified residence", plus property taxes, capped at $20,000. Federal amount
2025 Form D-401, Schedule A line 1, PDF p. 20 repeats it. S.L. 2026-31 §12(a), PDF p. 42 moves "Code" (G.S. 105-228.90(b)(7)) to July 5, 2025, effective when it became law. That date includes P.L. 119-21's permanent $750,000 limit, so 2026 matches federal.
Hawaii HRS 235-2.4(j)(3): "Section 163(h)(3)(F) (limiting mortgage interest)" is not operative. Act 35, SLH 2026, PDF p. 21 reletters it (i)(3) for taxable years after 2025 and keeps it. Pre-TCJA limits
2018 N-11 instructions, line 21c, PDF p. 19: Act 27, SLH 2018 does not adopt the lower dollar limit or the home equity suspension. 2025 N-11, line 21c, PDF p. 17: "See the 2017 federal Publication 936 to figure your deduction".
2017 Publication 936, Table 1 (PDF p. 11): $1,000,000 acquisition limit reduced by grandfathered debt (lines 3–6); home equity debt up to $100,000 (line 7); line 11 ratio "rounded to three places". Figure A note 3 (PDF p. 3): amounts over $1,000,000 "may qualify as home equity debt". PDF p. 13: deductible points take the same line 11 ratio.

The limits are halved for married filing separately.

Allocation gap-fill. The checked law does not prescribe decimal rounding. Treas. Reg. 1.163-10T(c)–(g) provides alternative allocation methods without a rounding rule. CCA 201201017, PDF p. 5, a nonprecedential memorandum, discusses reasonable methods and approximations under the later debt limits. Hawaii's HRS 235-2.5(b) authorizes adoption of Treasury regulations by rule; HAR 18-235-2.3(a)(3) adopts federal regulations through January 1, 1979, before that 1987 temporary regulation. N-11's direction to the 2017 Publication 936 worksheet therefore supplies an administrative gap-fill, rather than a statutory rounding requirement. PE retains that three-place worksheet rounding and separately floors the result at its federal deduction. The floor is PE's chosen safeguard; worksheet line 12 only multiplies interest by the rounded fraction. This wording update leaves the arithmetic unchanged.

Before and after

$40,000 of interest. Before = main f9b55fc4dd; after = this head.

Case Federal AL before → after NC line 1 before → after HI before → after
Single, $1.5M from 2020 (the witness) $20,000 $40,000 → $20,000 $40,000 → $20,000 $40,000 → $29,320
Same, 2026 $20,000 $40,000 → $20,000 $40,000 → $20,000 $40,000 → $29,320
Separate, $1.5M from 2020 $10,000 $40,000 → $14,680
Joint, $1.5M from 2016 $26,666.67 $40,000 → $26,666.67
Joint, $1.5M from 1986 (grandfathered) $40,000 $40,000 → $40,000 $40,000 → $40,000
Joint, $1.2M from 1985 + $300k from 2020 $32,000 $40,000 → $34,680
Single, $900k from 2020, $36,000 interest $30,000 $36,000 → $36,000

Hawaii's figures: $1,100,000 / $1,500,000 rounds to .733 (× $40,000 = $29,320). The $900k row is the control for Hawaii's own limit: it is above the federal $750,000 limit but below Hawaii's $1,000,000, so the full $36,000 stays deductible.

Rounding conventions. The federal, Alabama and North Carolina amounts follow PE's existing federal calculation, which uses the exact ratio. The 2025 Table 1 (line 14) rounds it to three places, which can move an amount by up to about 0.05% of the interest: $26,680 rather than $26,666.67 for the 2016 row. This PR doesn't change that convention. Hawaii uses the N-11 / 2017 worksheet as a gap-fill: line 11 rounds to three places, and PE uses half-up rounding at ties. The federal-floor safeguard is separate from worksheet line 12. The worksheet rounding matches rulespec-us#1556.

North Carolina's $20,000 cap hides line 1 in some cases, so the deduction tests use smaller amounts. Single, $15,000 interest on $1.5M from 2020, $5,000 property tax: line 5 goes from $20,000 to $12,500. Separate spouses, one with $30,000 on $1.2M from 2020 and the other with $10,000 and no balance: before, the $40,000 total was prorated to $15,000 and $5,000. After, it is $9,375 and $10,000, under the shared cap.

Changes

  • al_investment_interest.py (al_interest_deduction) adds deductible_mortgage_interest instead of mortgage_interest. The label is now "Alabama interest deduction", and the references cite Form 40 (they said Form 1040) with PDF pages.

  • nc_mortgage_and_property_tax_before_limitation reads deductible_mortgage_interest on line 1.

  • New hi_mortgage_interest_deduction and two parameters, gov.states.hi.tax.income.deductions.itemized.interest.home_acquisition_debt_limit and .home_equity_debt_limit. They take effect 2018-01-01, when Hawaii's itemized sources start. The formula has three helpers:

    • _hi_qualified_loan_limit computes Table 1 lines 1–8. Grandfathered debt reuses main's _debt_by_vintage.
    • _hi_deductible_share computes line 11, rounded half up to three places in double precision.
    • _hi_allowed_interest uses the worksheet calculation with a PE federal-floor safeguard: line 12 multiplies interest paid (the federally deductible and non-deductible parts together) by line 11, then PE floors the result at its federal deduction. When federal law disallows none of the interest, it keeps the federal amount, so a directly supplied deduction is not limited a second time. The floor is PE's chosen approximation and is not prescribed by line 12.

    hi_interest_deduction adds the new variable instead of mortgage_interest, and cites its 2022 N-11 source once.

  • Tests: nine existing NC cases that put the uncapped mortgage_interest in as an input now use the canonical home_mortgage_interest. Their expected values are unchanged, and the renamed cases pass on main too.

Invariants

  1. AL and NC never exceed the federal amount. Alabama's mortgage component and North Carolina's line 1 equal the federal deductible mortgage interest for every household, by construction: they add deductible_mortgage_interest. The YAML covers the cases where they differ from main: above the limit, a pre-2018 vintage, mixed vintages, separate filers, 2026, and spouses filing separately under the shared cap. It also covers the controls where they don't: within the limit, no balance, grandfathered debt.
  2. Hawaii lies between federal and gross. For every pair of loans, filing status and vintage: grandfathered debt ≤ Hawaii qualified loan limit ≤ total debt, and the Hawaii limit is at least the federal limit. The rounded share lies in [0, 1], within .0005 of the exact ratio, and at or above the federal share for the drawn balances (each loan up to $3M). PE's separate federal-floor safeguard ensures federal deductible ≤ Hawaii deduction ≤ interest paid, including when rounded Hawaii interest would fall below the unrounded federal amount. One limit applies after October 13, 1987: moving a loan between 2017 and 2018 never changes Hawaii's limit, and moving it into the grandfathered years never lowers it. The limit is order-invariant and monotone in balances. It matches two independent restatements, one line by line from 2017 Table 1 and one in the statute's order ((B)(ii), (C)(ii), (D) without (F)). test_hi_mortgage_debt_limit_invariants.py checks all of this with Hypothesis (400 examples), plus half-up rounding at .3125.
  3. No balance means no limit, as in the federal calculation. A tax unit that reports interest but no balance keeps all of it in all three states.
  4. A supplied deduction is not limited twice. For every deductible, non-deductible and line 11 value, PE's worksheet-based approximation lies between the federal deduction and the interest paid. It equals the federal deduction when nothing is federally disallowed. Otherwise it equals interest paid times line 11, floored at the federal amount. The property test checks this. In YAML, $20,000 supplied as deductible_mortgage_interest with $1.5M of debt stays $20,000 (it was $14,660 before review r1). hi/tax/income/integration.yaml (supplied deduction, no balance) is unchanged.
  5. Precision. Line 11 is divided and rounded in double precision, so stored balances give the same line 11 whether they arrive as single- or double-precision arrays. $1,100,000 / $1,128,784 = .97449999 gives .974, or $38,960 on $40,000; single-precision division gave .975 and $39,000. Core still stores inputs in single precision, which this PR doesn't change. A balance that single precision can't hold exactly is rounded before Hawaii sees it. Review r2's examples: $1,128,783.99 is stored as $1,128,784 and gives $38,960 where the worksheet gives $39,000; $17,054,263 gives $2,560 where it gives $2,600.

Mutation checks on the Hawaii helpers, all reverted:

  • Dropping line 7 (home equity) fails the property test, falsified by a $550,000 separate-filer loan.
  • Scaling the acquisition limit by 0.75 (as if the federal $750,000 limit applied) fails it too, falsified by a $500,000 separate-filer loan.
  • Removing the double-precision cast fails 2 tests.
  • Removing the pass-through fails 1 test.

Tests

Current verification at e81b3eaec0, after merging upstream/main 11951ba4d3 with a merge commit:

File Passed
al/.../itemized/al_interest_deduction.yaml 10
nc/.../nc_mortgage_and_property_tax_before_limitation.yaml 9
nc/.../nc_mortgage_and_property_tax_deduction.yaml 12
hi/.../itemized/hi_mortgage_interest_deduction.yaml 17
tests/core/test_hi_mortgage_debt_limit_invariants.py 3

Each file ran separately in the foreground, one process at a time, with all requested thread caps set to 4 and OMP_WAIT_POLICY=PASSIVE: 51 passed. make format (Ruff 0.15.5 format and lint) passed. The PR diff against merged main passes git diff --check.

Historical verification below is from the original reviewed head 6dadd9973d; each file ran alone with thread caps of 4.

File Main f9b55fc4dd Reviewed head 6dadd9973d
al/.../itemized/al_interest_deduction.yaml (new) 7 failed, 3 passed 10 passed
nc/.../nc_mortgage_and_property_tax_before_limitation.yaml 4 failed, 5 passed 9 passed
nc/.../nc_mortgage_and_property_tax_deduction.yaml 2 failed, 10 passed 12 passed
nc/.../nc_itemized_deductions.yaml (inputs renamed) 6 passed 6 passed
nc/.../itemized/nc_claim_of_right_deduction.yaml (input renamed) 17 passed 17 passed
hi/.../itemized/hi_mortgage_interest_deduction.yaml (new; on main the same cases assert hi_interest_deduction) 10 failed, 6 passed 16 passed
tests/core/test_hi_mortgage_debt_limit_invariants.py (new) helpers absent 3 passed

The cases that pass on main are the controls: within the limit, no balance, grandfathered debt, Hawaii's $900k and $1.05M rows, a supplied Hawaii deduction, and the renamed inputs. At the previous head 9fde8b6eae, review r1 reproduced Hawaii's supplied-deduction case at $14,660 and the $1,128,784 case at $39,000; both now pass.

Folder runs, one subdirectory per process (test_batched.py --mode per-subdir --workers 1):

  • Hawaii passes at 6dadd9973d: 74 files and 602 cases.
  • Alabama (60 files, 448 cases) and North Carolina (51 files, 374 cases) passed at 9fde8b6eae. Neither state's code changed after that, and their changed YAML files were rerun at 6dadd9973d above.

Other suites:

  • test_mortgage_debt_limit_invariants.py and test_nc_mortgage_and_property_tax_limitation_invariants.py pass.
  • The federal deductible_mortgage_interest.yaml (11) and deductible_mortgage_interest_tax_unit.yaml (18) pass.
  • In the code-health tests on references, parameters and test routing, 204 pass. Two fail for lack of the coverage module in the local venv, and they fail the same way on main.
  • uvx ruff@0.15.5 format --check, check and git diff --check pass.

The Python invariant test is pure NumPy over the helpers and builds no model. Measured at reviewed head 6dadd9973d locally on macOS, not in CI: under 1 s for the three tests, about 3.5 s for pytest, and 17 s and 1.0 GB peak footprint for the whole process. Almost all of that is import policyengine_us, which the core group's process already pays for test_mortgage_debt_limit_invariants.py. The test lands in the existing Rest Python core group by directory. No CI job, matrix entry or runner changes.

Independent review

GPT-6.1 Sol (subfleet run --task review --tier hard -s workspace-write), on the hub host under ~/reviews/us-hub/reviews-gen/us-10274/:

  • Round 1 (review-r1.md, head 9fde8b6eae): REQUEST_CHANGES. A supplied Hawaii deduction was limited twice, line 11 was rounded in single precision, Axiom parity was incomplete, the exact-ratio convention was unlabelled, and an assertion was missing. Everything is fixed in 6dadd9973d.
  • Round 2 (review-r2.md, head 6dadd9973d): APPROVE. It ran 94 single-file cases, all passing. Its two documentation nits are addressed in this description: the precision claim is narrowed, and the partly supplied components and the federal floor are now listed under known gaps. The subsequent statute-first update changes documentation and references, adds the floor-binding YAML witness, and merges upstream/main; it preserves the formula arithmetic.

Merge order with open PRs

Known gaps

  • Fair-market-value limit. Hawaii's home equity debt is also limited by each home's FMV less its acquisition debt. PE has no home-value input, so every home is treated as worth at least its mortgages, as in Apply Hawaii's pre-TCJA mortgage debt limits to the interest deduction #9950 and rulespec-us#1556's fixtures.
  • Partly supplied components. Line 10, interest paid, is the federally deductible plus non-deductible amounts. When a test supplies only one of them, the other is computed from home_mortgage_interest, so the sum is a reconstruction. Review r2's example: $40,000 paid on $940,000 of debt, with only the federal deduction ($31,920) supplied, gives $40,005.11 in Hawaii instead of $40,000. Supplying both, or neither, gives $40,000. This input precedence predates this PR.
  • PE federal-floor safeguard. PE separately floors Hawaii's worksheet calculation at its federal deduction; this is a chosen approximation, not worksheet line 12. With canonical inputs the floor binds when line 11's rounding undercuts PE's unrounded federal aggregate calculation. The new YAML witness uses $497,550,016 of grandfathered debt plus $2,449,984 of 2020 debt and $40,000 of interest: Hawaii's $497,650,016 limit gives a .995300032 ratio, rounded to .995, and worksheet interest of $39,800. The federal amount is $39,804.00128, so PE allows about $39,804 (one-cent test tolerance).
  • Home equity debt not used to buy or improve the home. PE has no such input. Federally after 2017 that interest isn't deductible, and in Hawaii it is, up to $100,000. Only debt above the acquisition limit reaches Hawaii's line 7 here.
  • Investment interest. It enters Alabama and Hawaii unchanged, with no IRC 163(d) limit (Limit investment interest deductions under §163(d) and Form 4952 #9977, held under d1054).
  • Alabama vehicle loan interest (2025–2028) is not modeled. A separate hub lane has drafted it (~/reviews/us-hub/al-vehicle-loan-interest, review requested changes, no PR yet).
  • States that decouple from 163(h)(3)(F) but read the capped federal amount under-allow; that is the opposite error. New York is one: its 2025 itemized deduction instructions say the federal changes to home mortgage and home equity interest "do not apply" (Form IT-196 lines 10 and 11) and point to the 2017 Publication 936. Yet PE's New York reads federal interest_deduction; review r1 computed $20,000 where New York allows $29,320 on the witness. Arkansas and others are unchecked. This PR doesn't change them; a follow-up audits every such state.

Impact

Real microsimulations on the default dataset, main f9b55fc4dd against 9fde8b6eae (2025 and 2026), one at a time under the shared heavy lock. All four runs exited 0 with a 14.3 GB peak footprint. Sums are weighted; records are tax units. 2025 was rerun at 6dadd9973d, the review-r1 fix. Every tax and net-income output is identical record by record; hi_interest_deduction differs by at most $0.004 per record, from the switch to double-precision arithmetic. 2026 was not rerun at 6dadd9973d because of disk pause #9. The hub runs the final impact at landing.

Output 2025 2026
state_income_tax +$67.96M (15 AL records; 18,456 weighted) +$72.79M (16 AL records; 18,588 weighted)
al_interest_deduction −$1.359bn −$1.456bn
household_net_income −$67.96M −$72.79M
nc_mortgage_and_property_tax_deduction −$40 (1 record, weight 0.019) −$52 (same record)
nc_income_tax $0 +$0.69
hi_interest_deduction (unweighted: 7 records, −$157,888 / −$178,194) −$67 (weights sum to 0.006) −$82
hi_income_tax +$5.65 +$7.01
federal income_tax, deductible_mortgage_interest_tax_unit unchanged unchanged
  • Alabama carries all but a few dollars of the change. Each changed record has a balance above its federal limit: $750,000, or $375,000 for one separate filer with $504,400 of debt. The tax change is 5.0% of the lower interest deduction, Alabama's top bracket rate (gov.states.al.tax.income.rates).
  • North Carolina: line 3 falls for 29 records in 2025 (31 in 2026), for example from $92,964 to $54,435. All but one were above $20,000 before and after, so their line 5 stays at $20,000. The exception is a separate filer with $439,646 of debt and weight 0.019, whose line 5 falls from $18,166 to $16,058.
  • Hawaii: the dataset's 7 Hawaii records above $1.1M carry a combined weight of 0.006. Their deduction falls by $157,888 in total (2025), but the population result rounds to dollars. The YAML shows the household effect.
  • nc_mortgage_and_property_tax_before_limitation changes for records in every state. It is computed everywhere so that a separately filing spouse in another state counts toward the shared cap, but it reaches tax only in North Carolina. No tax or deduction output changes for any record outside Alabama, North Carolina and Hawaii, and federal tax is unchanged.

Comparison script and per-year JSON: ~/reviews/us-hub/state-mortgage-federal-cap/ (compare.py, impact-2025.json, impact-2026.json) on the hub host.

axiom: HRS 235-2.4(j)(3)/(i)(3) TheAxiomFoundation/rulespec-us#1556 queued (updated 2026-10-19 to point here and add grandfathered debt, the supplied-deduction pass-through and seven companion cases) | Ala. Code 40-18-15(a)(2), N.C. Gen. Stat. 105-153.5(a)(2)b TheAxiomFoundation/rulespec-us#1815 queued (filed under d1142; composes 26 U.S.C. 163(h)(3), #1413 and #1673)

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 19, 2026 08:44
…unts their laws allow

Alabama (Code 40-18-15(a)(2)) and North Carolina (G.S. 105-153.5(a)(2)b)
allow only the mortgage interest federal law allows, so they now read
deductible_mortgage_interest, after the 26 U.S.C. 163(h)(3) acquisition-debt
limits, instead of uncapped mortgage_interest.

Hawaii makes IRC 163(h)(3)(F) inoperative (HRS 235-2.4(j)(3), (i)(3) from
2026 under Act 35), so it keeps the pre-TCJA limits for debt incurred at any
time: $1,000,000 of acquisition debt plus up to $100,000 of home equity debt
($500,000 / $50,000 separate), per 2017 Publication 936 Table 1. The new
hi_mortgage_interest_deduction applies them to gross interest, reusing the
federal vintage split for grandfathered debt.

With $40,000 of interest on $1.5M of 2020 debt, main allowed $40,000 in all
three states; now AL and NC allow the federal $20,000 and HI $29,333.33.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…36 Table 1 requires

The 2025 N-11 instructions (line 21c) send Hawaii filers to the 2017
Publication 936 worksheet, whose line 11 rounds the qualified-loan-limit
ratio to three places. TheAxiomFoundation/rulespec-us#1556 encodes the same
rounding, so PE and Axiom agree. Its three companion cases are added to the
Hawaii YAML, and the property test now covers the rounded share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 (GPT-6.1 Sol) findings:
- Hawaii multiplied a directly supplied deductible_mortgage_interest by the
  worksheet share again ($20,000 supplied on $1.5M of debt gave $14,660).
  Hawaii now starts from interest paid as the federally deductible plus
  non-deductible parts, keeps the federal amount when federal law disallows
  nothing, and never goes below it (_hi_allowed_interest).
- In single precision $1,100,000 / $1,128,784 = .97449999 became .9745 and
  rounded up; the ratio is now computed in double precision.
- Alabama and North Carolina YAML headers say the expectations follow PE's
  exact federal ratio, not the worksheet's three-place rounding.
- Alabama's spouse case now asserts al_itemized_deductions.
- hi_interest_deduction cites the 2022 N-11 once, with both pages.

The property test now covers single-precision inputs and line 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Hand-off to the US + core hub (session local_46e50d89-c1b5-4986-bd4e-7ada4b70bf0e)

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant