Skip to content

Commit da73725

Browse files
Uncap the real estate taxes in the Virginia itemized deduction logic (#4534)
* Uncapp the real estate taxes in the Virginia itmemized deduction logic Fixes #4505 * format * add va_capped_state_and_local_sales_or_income_tax variable
1 parent d50592e commit da73725

File tree

9 files changed

+128
-70
lines changed

9 files changed

+128
-70
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+
- Uncap real estate taxes in the Virginia itemized 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ 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
9+
- va_capped_state_and_local_sales_or_income_tax
910
metadata:
1011
unit: list
1112
period: year
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
- name: State and local tax capped at $10,000
2+
period: 2021
3+
input:
4+
filing_status: SINGLE
5+
real_estate_taxes: 0
6+
state_and_local_sales_or_income_tax: 11_000
7+
state_code: VA
8+
output:
9+
va_capped_state_and_local_sales_or_income_tax: 10_000
10+
11+
- name: Cap reduced by the amount of real estate taxes
12+
period: 2021
13+
input:
14+
filing_status: SINGLE
15+
real_estate_taxes: 3_000
16+
state_and_local_sales_or_income_tax: 11_000
17+
state_code: VA
18+
output:
19+
va_capped_state_and_local_sales_or_income_tax: 7_000
20+
21+
- name: Cap fully reduced by the amount of real estate taxes
22+
period: 2021
23+
input:
24+
filing_status: SINGLE
25+
real_estate_taxes: 13_000
26+
state_and_local_sales_or_income_tax: 11_000
27+
state_code: VA
28+
output:
29+
va_capped_state_and_local_sales_or_income_tax: 0

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: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,62 @@
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+
va_income_tax: 18433.05
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from policyengine_us.model_api import *
2+
3+
4+
class va_capped_state_and_local_sales_or_income_tax(Variable):
5+
value_type = float
6+
entity = TaxUnit
7+
definition_period = YEAR
8+
label = "Capped state and local sales or income tax for Virginia itemized deductions purposes"
9+
unit = USD
10+
11+
def formula(tax_unit, period, parameters):
12+
uncapped_state_and_local_tax = tax_unit(
13+
"state_and_local_sales_or_income_tax", period
14+
)
15+
p_salt = parameters(
16+
period
17+
).gov.irs.deductions.itemized.salt_and_real_estate
18+
filing_status = tax_unit("filing_status", period)
19+
real_estate_tax = add(tax_unit, period, ["real_estate_taxes"])
20+
state_and_local_tax_cap = p_salt.cap[filing_status]
21+
cap_reduced_by_real_estate_tax = max_(
22+
state_and_local_tax_cap - real_estate_tax, 0
23+
)
24+
return min_(
25+
uncapped_state_and_local_tax, cap_reduced_by_real_estate_tax
26+
)

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ class va_reduced_itemized_deductions(Variable):
1313
def formula(tax_unit, period, parameters):
1414
p_va = parameters(period).gov.states.va.tax.income.deductions.itemized
1515

16-
uncapped_state_and_local_tax = tax_unit(
17-
"state_and_local_sales_or_income_tax", period
18-
)
19-
2016
# Part A: If AGI from federal return is over a certain amount, then
2117
# limitations to the itemized deduction are applied
2218
# Line 1 - sum of medical exepens ded., capped state and local tax,
@@ -68,13 +64,12 @@ def formula(tax_unit, period, parameters):
6864
va_itm_deds_adjustment[mask] / excess_ded[mask]
6965
)
7066
# 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-
)
67+
7768
# Line 14 - Multiply line 11 by line 13
69+
capped_state_and_local_tax = tax_unit(
70+
"va_capped_state_and_local_sales_or_income_tax", period
71+
)
72+
7873
state_and_local_tax_adj = (
7974
capped_state_and_local_tax * adjustment_fraction
8075
)

0 commit comments

Comments
 (0)