diff --git a/changelog.d/ca-pre-tcja-mortgage-debt-limits.fixed.md b/changelog.d/ca-pre-tcja-mortgage-debt-limits.fixed.md new file mode 100644 index 00000000000..1a5966850c3 --- /dev/null +++ b/changelog.d/ca-pre-tcja-mortgage-debt-limits.fixed.md @@ -0,0 +1 @@ +Apply the pre-TCJA $1,000,000 home acquisition and $100,000 home equity debt limits to California mortgage interest (R&TC 17225(b)). diff --git a/policyengine_us/parameters/gov/states/ca/tax/income/deductions/itemized/interest/home_acquisition_debt_limit.yaml b/policyengine_us/parameters/gov/states/ca/tax/income/deductions/itemized/interest/home_acquisition_debt_limit.yaml new file mode 100644 index 00000000000..4d25d159b9d --- /dev/null +++ b/policyengine_us/parameters/gov/states/ca/tax/income/deductions/itemized/interest/home_acquisition_debt_limit.yaml @@ -0,0 +1,29 @@ +description: California limits the home acquisition debt on which mortgage interest is deductible to this amount, based on filing status. +SINGLE: + 2018-01-01: 1_000_000 +JOINT: + 2018-01-01: 1_000_000 +HEAD_OF_HOUSEHOLD: + 2018-01-01: 1_000_000 +SEPARATE: + 2018-01-01: 500_000 +SURVIVING_SPOUSE: + 2018-01-01: 1_000_000 +metadata: + propagate_metadata_to_children: true + breakdown: + - filing_status + unit: currency-USD + period: year + label: California home acquisition debt limit + reference: + # California does not apply the TCJA limit in IRC 163(h)(3)(F), so the + # pre-TCJA limit in IRC 163(h)(3)(B)(ii) applies whenever the debt arose. + - title: California Revenue and Taxation Code Section 17225(b) + href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17225 + - title: SB 711 (2025) conformity chart, RTC 17225(b) + href: https://srev.senate.ca.gov/media/71#page=14 + - title: 2025 Schedule CA (540) Instructions, Part II line 8 + href: https://www.ftb.ca.gov/forms/2025/2025-540-ca-instructions.html + - title: 2017 IRS Publication 936, Home acquisition debt limit + href: https://www.irs.gov/pub/irs-prior/p936--2017.pdf#page=9 diff --git a/policyengine_us/parameters/gov/states/ca/tax/income/deductions/itemized/interest/home_equity_debt_limit.yaml b/policyengine_us/parameters/gov/states/ca/tax/income/deductions/itemized/interest/home_equity_debt_limit.yaml new file mode 100644 index 00000000000..8f165369091 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ca/tax/income/deductions/itemized/interest/home_equity_debt_limit.yaml @@ -0,0 +1,29 @@ +description: California limits the home equity debt on which mortgage interest is deductible to this amount, based on filing status. +SINGLE: + 2018-01-01: 100_000 +JOINT: + 2018-01-01: 100_000 +HEAD_OF_HOUSEHOLD: + 2018-01-01: 100_000 +SEPARATE: + 2018-01-01: 50_000 +SURVIVING_SPOUSE: + 2018-01-01: 100_000 +metadata: + propagate_metadata_to_children: true + breakdown: + - filing_status + unit: currency-USD + period: year + label: California home equity debt limit + reference: + # California does not apply the TCJA suspension of home equity interest in + # IRC 163(h)(3)(F), so the limit in IRC 163(h)(3)(C)(ii) applies. + - title: California Revenue and Taxation Code Section 17225(b) + href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17225 + - title: SB 711 (2025) conformity chart, RTC 17225(b) + href: https://srev.senate.ca.gov/media/71#page=14 + - title: 2025 Schedule CA (540) Instructions, Part II line 8 + href: https://www.ftb.ca.gov/forms/2025/2025-540-ca-instructions.html + - title: 2017 IRS Publication 936, Home equity debt limit + href: https://www.irs.gov/pub/irs-prior/p936--2017.pdf#page=10 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/itemized/ca_mortgage_interest_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/itemized/ca_mortgage_interest_deduction.yaml new file mode 100644 index 00000000000..e01785b9b6d --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/itemized/ca_mortgage_interest_deduction.yaml @@ -0,0 +1,246 @@ +- name: Case 1, a post-TCJA mortgage under $750,000 is fully deductible in both. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 30_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + first_home_mortgage_balance: 600_000 + first_home_mortgage_origination_year: 2020 + households: + household: + members: [person1] + state_code: CA + output: + deductible_mortgage_interest_tax_unit: 30_000 + ca_mortgage_interest_deduction: 30_000 + +- name: Case 2, a post-TCJA mortgage between $750,000 and $1 million is fully deductible in California. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 45_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + first_home_mortgage_balance: 900_000 + first_home_mortgage_origination_year: 2020 + households: + household: + members: [person1] + state_code: CA + output: + # Federal: $750,000 / $900,000 * $45,000 = $37,500. + deductible_mortgage_interest_tax_unit: 37_500 + ca_mortgage_interest_deduction: 45_000 + +- name: Case 3, debt between $1 million and $1.1 million is fully deductible as acquisition plus home equity debt. + period: 2026 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 52_500 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + first_home_mortgage_balance: 1_050_000 + first_home_mortgage_origination_year: 2024 + households: + household: + members: [person1] + state_code: CA + output: + # Federal: $750,000 / $1,050,000 * $52,500 = $37,500. + deductible_mortgage_interest_tax_unit: 37_500 + # 2017 Pub. 936 Table 1: line 6 $1,000,000, line 7 $50,000, line 8 $1,050,000. + ca_mortgage_interest_deduction: 52_500 + +- name: Case 4, a post-TCJA mortgage over $1.1 million uses the $1.1 million qualified loan limit. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 60_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + first_home_mortgage_balance: 1_500_000 + first_home_mortgage_origination_year: 2020 + households: + household: + members: [person1] + state_code: CA + output: + # Federal: $750,000 / $1,500,000 * $60,000 = $30,000. + deductible_mortgage_interest_tax_unit: 30_000 + # Line 8: $1,000,000 + $100,000. Line 11: round($1,100,000 / $1,500,000, 3) = 0.733. + # 0.733 * $60,000 = $43,980. + ca_mortgage_interest_deduction: 43_980 + +- name: Case 5, a pre-TCJA mortgage over $1.1 million also gets California's home equity allowance. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 60_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + first_home_mortgage_balance: 1_500_000 + first_home_mortgage_origination_year: 2015 + households: + household: + members: [person1] + state_code: CA + output: + # Federal: $1,000,000 / $1,500,000 * $60,000 = $40,000. + deductible_mortgage_interest_tax_unit: 40_000 + ca_mortgage_interest_deduction: 43_980 + +- name: Case 6, married filing separately uses the $500,000 and $50,000 limits. + period: 2022 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 30_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SEPARATE + first_home_mortgage_balance: 600_000 + first_home_mortgage_origination_year: 2019 + households: + household: + members: [person1] + state_code: CA + output: + # Federal: $375,000 / $600,000 * $30,000 = $18,750. + deductible_mortgage_interest_tax_unit: 18_750 + # round($550,000 / $600,000, 3) = 0.917. 0.917 * $30,000 = $27,510. + ca_mortgage_interest_deduction: 27_510 + +- name: Case 7, joint filers with two mortgages apply the limits to the combined balance. + period: 2024 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 40_000 + person2: + age: 45 + home_mortgage_interest: 25_000 + tax_units: + tax_unit: + members: [person1, person2] + filing_status: JOINT + first_home_mortgage_balance: 800_000 + first_home_mortgage_origination_year: 2017 + second_home_mortgage_balance: 500_000 + second_home_mortgage_origination_year: 2020 + households: + household: + members: [person1, person2] + state_code: CA + output: + # Federal: $800,000 / $1,300,000 * $65,000 = $40,000. + deductible_mortgage_interest_tax_unit: 40_000 + # round($1,100,000 / $1,300,000, 3) = 0.846. 0.846 * $65,000 = $54,990. + ca_mortgage_interest_deduction: 54_990 + +- name: Case 8, grandfathered debt over the limits stays fully deductible. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 70 + home_mortgage_interest: 60_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + first_home_mortgage_balance: 1_500_000 + first_home_mortgage_origination_year: 1986 + households: + household: + members: [person1] + state_code: CA + output: + deductible_mortgage_interest_tax_unit: 60_000 + # Lines 4-6: the larger of $1,500,000 and $1,000,000, capped at $1,500,000. + ca_mortgage_interest_deduction: 60_000 + +- name: Case 9, interest with no reported balance is fully deductible. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 20_000 + households: + household: + members: [person1] + state_code: CA + output: + ca_mortgage_interest_deduction: 20_000 + +- name: Case 10, a directly supplied federal deduction carries over when no gross interest is reported. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + deductible_mortgage_interest: 12_000 + households: + household: + members: [person1] + state_code: CA + output: + ca_mortgage_interest_deduction: 12_000 + +- name: Case 11, California itemized deductions replace the federal mortgage interest. + period: 2025 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 45 + home_mortgage_interest: 60_000 + real_estate_taxes: 10_000 + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + first_home_mortgage_balance: 1_500_000 + first_home_mortgage_origination_year: 2020 + households: + household: + members: [person1] + state_code: CA + output: + interest_deduction: 30_000 + # $43,980 mortgage interest + $10,000 real estate taxes. + ca_itemized_deductions_pre_limitation: 53_980 diff --git a/policyengine_us/variables/gov/states/ca/tax/income/deductions/itemized/ca_itemized_deductions_pre_limitation.py b/policyengine_us/variables/gov/states/ca/tax/income/deductions/itemized/ca_itemized_deductions_pre_limitation.py index 091b5150824..8dd4c2bd763 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/deductions/itemized/ca_itemized_deductions_pre_limitation.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/deductions/itemized/ca_itemized_deductions_pre_limitation.py @@ -38,12 +38,16 @@ def formula(tax_unit, period, parameters): ] deductions += [ "ca_investment_interest_expense_deduction", + "ca_mortgage_interest_deduction", "real_estate_taxes", "ca_charitable_deduction", "ca_misc_deduction", "ca_casualty_loss_deduction", ] - # Federal investment interest is nested in interest_deduction. + # Federal investment and mortgage interest are nested in + # interest_deduction; California replaces both (Schedule CA lines 8-9). return add(tax_unit, period, deductions) - add( - tax_unit, period, ["investment_interest_expense"] + tax_unit, + period, + ["investment_interest_expense", "deductible_mortgage_interest"], ) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/deductions/itemized/ca_mortgage_interest_deduction.py b/policyengine_us/variables/gov/states/ca/tax/income/deductions/itemized/ca_mortgage_interest_deduction.py new file mode 100644 index 00000000000..429462ef224 --- /dev/null +++ b/policyengine_us/variables/gov/states/ca/tax/income/deductions/itemized/ca_mortgage_interest_deduction.py @@ -0,0 +1,75 @@ +from policyengine_us.model_api import * +from policyengine_us.variables.household.expense.tax_unit.mortgage_interest_structure import ( + _debt_by_vintage, +) + + +class ca_mortgage_interest_deduction(Variable): + value_type = float + entity = TaxUnit + label = "California home mortgage interest deduction" + unit = USD + documentation = ( + "Home mortgage interest California allows on Schedule CA (540), Part " + "II line 8. California does not apply IRC 163(h)(3)(F), so the " + "pre-TCJA home acquisition and home equity debt limits apply " + "regardless of when the debt was incurred." + ) + reference = ( + "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17225", + "https://www.ftb.ca.gov/forms/2025/2025-540-ca-instructions.html", + # PDF pages 9-11 + "https://www.irs.gov/pub/irs-prior/p936--2017.pdf#page=9", + ) + definition_period = YEAR + defined_for = StateCode.CA + + def formula(tax_unit, period, parameters): + p = parameters(period).gov.states.ca.tax.income.deductions.itemized.interest + p_federal = parameters(period).gov.irs.deductions.itemized.interest.mortgage + filing_status = tax_unit("filing_status", period) + # 2017 Publication 936, Table 1. Only grandfathered debt (line 1) is + # treated differently by vintage; all later debt is line 2. + grandfathered_debt, pre_tcja_debt, post_tcja_debt = _debt_by_vintage( + [ + tax_unit("first_home_mortgage_balance", period), + tax_unit("second_home_mortgage_balance", period), + ], + [ + tax_unit("first_home_mortgage_origination_year", period), + tax_unit("second_home_mortgage_origination_year", period), + ], + p_federal.grandfathered_origination_year, + p_federal.pre_tcja_origination_year, + ) + # Line 9. + debt = grandfathered_debt + pre_tcja_debt + post_tcja_debt + # Lines 3-6. Grandfathered debt has no dollar limit but reduces the + # home acquisition debt limit. + acquisition_debt = min_( + max_(grandfathered_debt, p.home_acquisition_debt_limit[filing_status]), + debt, + ) + # Line 7. Debt over the home acquisition debt limit may qualify as home + # equity debt. The fair market value limit on home equity debt is not + # modeled. + home_equity_debt = min_( + debt - acquisition_debt, p.home_equity_debt_limit[filing_status] + ) + # Lines 8 and 11. Without a reported balance, the interest is treated + # as within the limits, as in the federal calculation. + deductible_share = np.divide( + acquisition_debt + home_equity_debt, + debt, + out=np.ones_like(debt), + where=debt > 0, + ) + deductible_share = np.round(deductible_share, 3) + # Line 10 uses total interest paid, before the federal debt limit. + gross_interest = tax_unit("home_mortgage_interest_tax_unit", period) + # A directly supplied federal deduction has already been limited, so + # keep it when no gross interest is reported. + federal_deduction = add(tax_unit, period, ["deductible_mortgage_interest"]) + return where( + gross_interest > 0, gross_interest * deductible_share, federal_deduction + )