Skip to content

Commit

Permalink
Apply the TCJA mortgage interest deduction limits
Browse files Browse the repository at this point in the history
Fixes #5128
  • Loading branch information
PavelMakarchuk committed Sep 25, 2024
1 parent 937df46 commit 61e26f6
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Apply the TCJA mortgage interest deduction limits.
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
description: IRS limits the total home mortgage interest deduction to this amount, based on filing status.
SINGLE:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
JOINT:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
SEPARATE:
2018-01-01: 500_000
2017-01-01: 500_000
2018-01-01: 375_000
2026-01-01: 500_000
HEAD_OF_HOUSEHOLD:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
SURVIVING_SPOUSE:
2018-01-01: 1_000_000
2017-01-01: 1_000_000
2018-01-01: 750_000
2026-01-01: 1_000_000
metadata:
breakdown: filing_status
unit: currency-USD
period: year
label: IRS home mortgage interest deduction amount cap
reference:
# Hawaii applies this AGI threshold in the state itemized deductions computation
- title: Hawaii Income Tax Law, Chapter 235, Section 235-2.4, (j)(3)
href: https://files.hawaii.gov/tax/legal/hrs/hrs_235.pdf#page=10
- title: 26 U.S. Code § 163 - Interest, (h)(3)(F)
# TCJA adjustemnts described in (h)(3)(F)(i)(II)
- title: 26 U.S. Code § 163 - Interest, (h)(3)(b)(ii)
href: https://www.law.cornell.edu/uscode/text/26/163
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- name: Capped mortageg interest, joint
absolute_error_margin: 0.01
period: 2021
input:
mortgage_interest: 1_200_000
filing_status: JOINT
non_mortgage_interest: 0
output:
interest_expense: 750_000

- name: Uncapped mortageg interest, joint
absolute_error_margin: 0.01
period: 2021
input:
mortgage_interest: 700_000
filing_status: JOINT
non_mortgage_interest: 100_000
output:
interest_expense: 800_000
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ class interest_expense(Variable):
label = "Interest paid on all loans"
unit = USD
definition_period = YEAR
adds = ["mortgage_interest", "non_mortgage_interest"]

def formula(person, period, parameters):
p = parameters(period).gov.irs.deductions.itemized.interest.mortgage
mortgage_interest = person("mortgage_interest", period)
filing_status = person.tax_unit("filing_status", period)
cap = p.cap[filing_status]
capped_mortgage_interest = min_(mortgage_interest, cap)
non_mortgage_interest = person("non_mortgage_interest", period)
return capped_mortgage_interest + non_mortgage_interest

0 comments on commit 61e26f6

Please sign in to comment.