Skip to content

Commit 001c059

Browse files
Uncapp the real estate taxes in the Virginia itmemized deduction logic
Fixes #4505
1 parent d50592e commit 001c059

File tree

7 files changed

+88
-72
lines changed

7 files changed

+88
-72
lines changed

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: patch
2+
changes:
3+
fixed:
4+
- Uncapp the real estate taxes in the Virginia itmemized deduction logic.

policyengine_us/parameters/gov/states/al/tax/income/agi/gross_income_sources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ metadata:
2727
- title: 2021 Alabama Department of Revenue Form 40
2828
href: https://www.revenue.alabama.gov/forms/2021-alabama-individual-income-tax-return-2/
2929
- title: The Code of Alabama 1975 Section 40-18-14 (a)
30-
href: https://casetext.com/statute/code-of-alabama/title-40-revenue-and-taxation/chapter-18-income-taxes/article-1-general-provisions/section-40-18-14-adjusted-gross-income-of-individuals
30+
href: https://casetext.com/statute/code-of-alabama/title-40-revenue-and-taxation/chapter-18-income-taxes/article-1-general-provisions/section-40-18-14-adjusted-gross-income-of-individuals

policyengine_us/parameters/gov/states/va/tax/income/deductions/itemized/reduction/applicable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ description: Virginia sums up the following deductions to compute the itemized d
22
values:
33
2013-01-01:
44
- medical_expense_deduction
5-
- salt_deduction
65
- interest_deduction
76
- charitable_deduction
7+
- real_estate_taxes
88
- casualty_loss_deduction
99
metadata:
1010
unit: list

policyengine_us/tests/policy/baseline/gov/states/va/tax/income/deductions/va_itemized_deductions.yaml

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
period: 2021
1515
input:
1616
filing_status: HEAD_OF_HOUSEHOLD
17-
real_estate_taxes: 50_000
1817
adjusted_gross_income: 800_000 # > $306,300
19-
state_and_local_sales_or_income_tax: 10_000
18+
state_and_local_sales_or_income_tax: 60_000
2019
state_code: VA
2120
output:
2221
va_itemized_deductions: 0
@@ -67,57 +66,3 @@
6766
state_code: VA
6867
output:
6968
va_itemized_deductions: 40_000 #20,000+20,000
70-
71-
- name: Tax unit with taxsimid 7856 in k21.its.csv and k21.ots.csv - Integration test
72-
absolute_error_margin: 2
73-
period: 2021
74-
input:
75-
people:
76-
person1:
77-
age: 63
78-
employment_income: 82010
79-
qualified_dividend_income: 4005.0
80-
taxable_interest_income: 5505.0
81-
short_term_capital_gains: 2005.0
82-
long_term_capital_gains: 2505.0
83-
rental_income: 4505.0
84-
taxable_private_pension_income: 1500.0
85-
social_security_retirement: 5000.0
86-
real_estate_taxes: 24000
87-
mortgage_interest: 36000
88-
self_employment_income: 158010
89-
business_is_qualified: true
90-
business_is_sstb: false
91-
w2_wages_from_qualified_business: 100e6
92-
person2:
93-
age: 63
94-
employment_income: 82010
95-
qualified_dividend_income: 4005
96-
taxable_interest_income: 5505
97-
short_term_capital_gains: 2005
98-
long_term_capital_gains: 2505
99-
rental_income: 4505
100-
taxable_private_pension_income: 1500
101-
social_security_retirement: 5000
102-
person3:
103-
age: 16
104-
person4:
105-
age: 16
106-
person5:
107-
age: 16
108-
tax_units:
109-
tax_unit:
110-
members: [person1, person2, person3, person4, person5]
111-
tax_unit_itemizes: True
112-
state_income_tax: 19956.35
113-
spm_units:
114-
spm_unit:
115-
members: [person1, person2, person3, person4, person5]
116-
snap: 0 # not in TAXSIM35
117-
tanf: 0 # not in TAXSIM35
118-
households:
119-
household:
120-
members: [person1, person2, person3, person4, person5]
121-
state_fips: 51 # VA
122-
output: # expected results from patched TAXSIM35 2024-03-21 version
123-
va_itemized_deductions: 35_282

policyengine_us/tests/policy/baseline/gov/states/va/tax/income/deductions/va_reduced_itemized_deductions.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
period: 2021
1414
input:
1515
filing_status: HEAD_OF_HOUSEHOLD
16-
real_estate_taxes: 50_000
1716
adjusted_gross_income: 800_000 # > $306,300
18-
state_and_local_sales_or_income_tax: 10_000
17+
state_and_local_sales_or_income_tax: 60_000
1918
state_code: VA
2019
output:
2120
va_reduced_itemized_deductions: 0

policyengine_us/tests/policy/baseline/gov/states/va/tax/income/integration.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,63 @@
7878
output: # expected results from patched TAXSIM35 2024-03-01 version
7979
va_income_tax: 1_969.48
8080

81+
- name: Tax unit with taxsimid 5034 in k21.its.csv and k21.ots.csv
82+
absolute_error_margin: 1
83+
period: 2021
84+
input:
85+
people:
86+
person1:
87+
age: 54
88+
employment_income: 137010
89+
qualified_dividend_income: 3505.0
90+
taxable_interest_income: 5505.0
91+
long_term_capital_gains: 1005.0
92+
rental_income: 2505.0
93+
real_estate_taxes: 24000
94+
mortgage_interest: 14000
95+
self_employment_income: 141010
96+
business_is_qualified: true
97+
business_is_sstb: false
98+
w2_wages_from_qualified_business: 100e6
99+
person2:
100+
age: 54
101+
employment_income: 65010
102+
qualified_dividend_income: 3505.0
103+
taxable_interest_income: 5505.0
104+
long_term_capital_gains: 1005.0
105+
rental_income: 2505.0
106+
ssi: 0 # not in TAXSIM35
107+
state_supplement: 0 # not in TAXSIM35
108+
wic: 0 # not in TAXSIM35
109+
ma_covid_19_essential_employee_premium_pay_program: 0 # not in TAXSIM35
110+
person3:
111+
age: 11
112+
ssi: 0 # not in TAXSIM35
113+
state_supplement: 0 # not in TAXSIM35
114+
wic: 0 # not in TAXSIM35
115+
ma_covid_19_essential_employee_premium_pay_program: 0 # not in TAXSIM35
116+
person4:
117+
age: 11
118+
ssi: 0 # not in TAXSIM35
119+
state_supplement: 0 # not in TAXSIM35
120+
wic: 0 # not in TAXSIM35
121+
ma_covid_19_essential_employee_premium_pay_program: 0 # not in TAXSIM35
122+
tax_units:
123+
tax_unit:
124+
members: [person1, person2, person3, person4]
125+
tax_unit_itemizes: True
126+
state_income_tax: 20045.91
127+
spm_units:
128+
spm_unit:
129+
members: [person1, person2, person3, person4]
130+
snap: 0 # not in TAXSIM35
131+
tanf: 0 # not in TAXSIM35
132+
households:
133+
household:
134+
members: [person1, person2, person3, person4]
135+
state_fips: 51 # VA
136+
output: # expected results from patched TAXSIM35 2024-05-07 version
137+
# va_reduced_itemized_deductions: 37_049.81
138+
# va_itemized_deductions: 37_049.81
139+
tax_unit_itemizes: true
140+
va_income_tax: 18433.05

policyengine_us/variables/gov/states/va/tax/income/deductions/va_reduced_itemized_deductions.py

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,29 @@ def formula(tax_unit, period, parameters):
1616
uncapped_state_and_local_tax = tax_unit(
1717
"state_and_local_sales_or_income_tax", period
1818
)
19-
19+
p_salt = parameters(
20+
period
21+
).gov.irs.deductions.itemized.salt_and_real_estate
22+
filing_status = tax_unit("filing_status", period)
23+
real_estate_tax = add(tax_unit, period, ["real_estate_taxes"])
24+
state_and_local_tax_cap = p_salt.cap[filing_status]
25+
cap_reduced_by_real_estate_tax = max_(
26+
state_and_local_tax_cap - real_estate_tax, 0
27+
)
28+
capped_state_and_local_tax = min_(
29+
uncapped_state_and_local_tax, cap_reduced_by_real_estate_tax
30+
)
2031
# Part A: If AGI from federal return is over a certain amount, then
2132
# limitations to the itemized deduction are applied
2233
# Line 1 - sum of medical exepens ded., capped state and local tax,
2334
# interest ded., charitable ded., and casualty loss ded.
24-
applicable_ded = add(
25-
tax_unit,
26-
period,
27-
p_va.reduction.applicable,
35+
applicable_ded = (
36+
add(
37+
tax_unit,
38+
period,
39+
p_va.reduction.applicable,
40+
)
41+
+ capped_state_and_local_tax
2842
)
2943
# Line 2 medical expense ded., interest ded., casualty loss ded., and gambling losses
3044
reducible_ded = add(
@@ -48,7 +62,6 @@ def formula(tax_unit, period, parameters):
4862
# Line 5 Federal AGI
4963
federal_agi = tax_unit("adjusted_gross_income", period)
5064
# Line 6 - applicable amount
51-
filing_status = tax_unit("filing_status", period)
5265
applicable_amount = p_va.applicable_amount[filing_status]
5366
# Line 7 - excess
5467
excess = max_(federal_agi - applicable_amount, 0)
@@ -68,12 +81,7 @@ def formula(tax_unit, period, parameters):
6881
va_itm_deds_adjustment[mask] / excess_ded[mask]
6982
)
7083
# Part B Line 13 - capped state and local income tax
71-
p_salt = parameters(
72-
period
73-
).gov.irs.deductions.itemized.salt_and_real_estate
74-
capped_state_and_local_tax = min_(
75-
uncapped_state_and_local_tax, p_salt.cap[filing_status]
76-
)
84+
7785
# Line 14 - Multiply line 11 by line 13
7886
state_and_local_tax_adj = (
7987
capped_state_and_local_tax * adjustment_fraction

0 commit comments

Comments
 (0)