Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the Iowa state tax model starting in 2023 #5531

Merged
merged 5 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
fixed:
- Iowa income tax structure on and after 2023.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description: Iowa has a alternate tax with this deduction against modified income for tax units without an elderly head or spouse.
values:
2021-01-01: 13_500


metadata:
label: Iowa deduction used in tax alternate tax calculations for nonelderly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description: Iowa allows an alternate tax for non-single filing units that has this flat tax rate.
values:
2021-01-01: 0.0853
2023-01-01: 0.06

metadata:
label: Iowa alternate tax rate
Expand All @@ -15,3 +16,5 @@ metadata:
href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=1
- title: 2022 IA1040 Income Tax Return instructions
href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=54
- title: 2023 Iowa Alternate Tax Worksheet
href: https://revenue.iowa.gov/media/2754/download?inline
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ values:
- ia_net_income
- ia_pension_exclusion
- ia_reportable_social_security
2023-01-01:
- ia_taxable_income_consolidated
- taxable_income_deductions
- qualified_business_income_deduction


metadata:
unit: list
Expand All @@ -17,4 +22,5 @@ metadata:
href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=1
- title: 2022 IA1040 Income Tax Return instructions
href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=37

- title: 2023 Iowa Alternate Tax Worksheet
href: https://revenue.iowa.gov/media/2754/download?inline
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Iowa adds these sources to taxable income on and after 2023.
values:
2021-01-01: []
# Interest from state and municipal securities
# Dividends from state and municipal bonds
# Bonus Depreciation
# Net operating loss


metadata:
unit: list
period: year
label: Iowa taxable income additions
reference:
- title: 2023 IA1040 Iowa Income Tax Return
href: https://revenue.iowa.gov/media/2746/download?inline
- title: Iowa income tax law, 422.7
href: https://www.legis.iowa.gov/docs/code/422.7.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
description: Iowa subtracts these sources from taxable income on and after 2023.
values:
2021-01-01:
# Line 1B
- us_govt_interest
# Dividends from federal securitites
# Line 5B
- taxable_social_security
# Line 6B
- military_service_income
# Line 7B
- ia_pension_exclusion
# Railroad unemployment income
# Bonus Depreciation
# Iowa Health Insurance Deduction
# Iowa capital gains deduction

metadata:
unit: list
period: year
label: Iowa taxable income subtractions
reference:
- title: 2023 IA1040 Iowa Income Tax Return
href: https://revenue.iowa.gov/media/2746/download?inline
- title: Iowa income tax law, 422.7
href: https://www.legis.iowa.gov/docs/code/422.7.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- name: Elderly present
absolute_error_margin: 0.01
period: 2023
input:
ia_modified_income: 100_000
greater_age_head_spouse: 65
state_code: IA
output: # from hand calculation following IA 6251 form
ia_alternate_tax_consolidated: 4_080

- name: Elderly not present
absolute_error_margin: 0.01
period: 2023
input:
ia_modified_income: 100_000
greater_age_head_spouse: 64
state_code: IA
output: # from hand calculation following IA 6251 form
ia_alternate_tax_consolidated: 5_190
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
- name: Eligible, regular tax is lower than alternate tax
absolute_error_margin: 0.01
period: 2023
input:
ia_regular_tax_consolidated: 10_000
ia_alternate_tax_eligible: true
ia_alternate_tax_consolidated: 12_000
state_code: IA
output: # from hand calculation following IA 6251 form
ia_income_tax_consolidated: 10_000

- name: Eligible, alternate tax is lower than regular tax
absolute_error_margin: 0.01
period: 2023
input:
ia_regular_tax_consolidated: 12_000
ia_alternate_tax_eligible: true
ia_alternate_tax_consolidated: 10_000
state_code: IA
output: # from hand calculation following IA 6251 form
ia_income_tax_consolidated: 10_000

- name: Ineligible, regular tax is lower than alternate tax
absolute_error_margin: 0.01
period: 2023
input:
ia_regular_tax_consolidated: 12_000
ia_alternate_tax_eligible: false
ia_alternate_tax_consolidated: 10_000
state_code: IA
output: # from hand calculation following IA 6251 form
ia_income_tax_consolidated: 12_000
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- name: Single person with $40,000 of employment income
absolute_error_margin: 0.01
period: 2023
input:
ia_taxable_income_consolidated: 40_000
filing_status: SINGLE
state_code: IA
output: # from hand calculation following IA 6251 form
ia_regular_tax_consolidated: 1_990.8

- name: Joint person with $40,000 of employment income
absolute_error_margin: 0.01
period: 2023
input:
ia_taxable_income_consolidated: 40_000
filing_status: JOINT
state_code: IA
output: # from hand calculation following IA 6251 form
ia_regular_tax_consolidated: 1_877.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- name: Taxable income with subtractions
absolute_error_margin: 0.01
period: 2023
input:
taxable_income: 1_000
ia_taxable_income_modifications_consolidated: -3_000
state_code: IA
output: # from hand calculation following IA 6251 form
ia_taxable_income_consolidated: 0

- name: Taxable income with additions
absolute_error_margin: 0.01
period: 2023
input:
taxable_income: 1_000
ia_taxable_income_modifications_consolidated: 100
state_code: IA
output: # from hand calculation following IA 6251 form
ia_taxable_income_consolidated: 1_100
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,30 @@
state_code: IA
output:
ia_income_tax_before_credits: 1_500

- name: Post 2023, only the consolidated structure applies
period: 2023
input:
people:
person1:
is_tax_unit_head: true
ia_base_tax_indiv: 700
ia_amt_indiv: 100
ia_base_tax_joint: 1_500
ia_amt_joint: 50
person2:
is_tax_unit_spouse: true
ia_base_tax_indiv: 600
ia_amt_indiv: 100
ia_base_tax_joint: 0
ia_amt_joint: 0
tax_units:
tax_unit:
members: [person1, person2]
ia_income_tax_consolidated: 4_000
households:
household:
members: [person1, person2]
state_code: IA
output:
ia_income_tax_before_credits: 4_000
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,31 @@
state_code: IA
output: # expected ia_income_tax from patched TAXSIM35 2023-06-23 version
ia_income_tax: 14_590.43

- name: Single person with $40,000 of employment income
absolute_error_margin: 1
period: 2023
input:
people:
person1:
employment_income: 40_000
households:
household:
members: [person1]
state_code: IA
output:
ia_income_tax: 1_195

- name: Single person with $40,000 of employment income
absolute_error_margin: 1
period: 2024
input:
people:
person1:
taxable_interest_income: 100_000
households:
household:
members: [person1]
state_code: IA
output:
ia_taxable_income_consolidated: 85_400
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,21 @@
state_code: IA
output:
ia_pension_exclusion_eligible: [true, true]

- name: Only person who meets the age requirement is not a head or spouse
period: 2023
input:
people:
person1:
age: 54
person2:
age: 54
person3:
age: 70
is_tax_unit_head_or_spouse: false
households:
household:
members: [person1, person2, person3]
state_code: IA
output:
ia_pension_exclusion_eligible: [false, false, false]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from policyengine_us.model_api import *


class ia_alternate_tax_consolidated(Variable):
value_type = float
entity = TaxUnit
label = "Iowa alternate tax for years on or after 2023"
unit = USD
definition_period = YEAR
reference = "https://revenue.iowa.gov/media/2754/download?inline"
defined_for = StateCode.IA

def formula(tax_unit, period, parameters):
modified_income = tax_unit("ia_modified_income", period)
# compute alternate tax following worksheet in the instructions
p = parameters(period).gov.states.ia.tax.income.alternate_tax
# ... determine alternate tax deduction
elderly_head_or_spouse = (
tax_unit("greater_age_head_spouse", period) >= p.elderly_age
)
alt_ded = where(
elderly_head_or_spouse, p.deduction.elderly, p.deduction.nonelderly
)
# ... determine alternate tax amount
alt_taxinc = max_(0, modified_income - alt_ded)
return alt_taxinc * p.rate
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from policyengine_us.model_api import *


class ia_income_tax_consolidated(Variable):
value_type = float
entity = TaxUnit
label = "Iowa income tax for years on or after 2023"
unit = USD
definition_period = YEAR
reference = (
"https://revenue.iowa.gov/media/2746/download?inline",
"https://www.legis.iowa.gov/docs/code/422.7.pdf",
)
defined_for = StateCode.IA

def formula(tax_unit, period, parameters):
reg_tax = tax_unit("ia_regular_tax_consolidated", period)
alt_tax_eligible = tax_unit("ia_alternate_tax_eligible", period)
alt_tax = tax_unit("ia_alternate_tax_consolidated", period)
smaller_tax = min_(reg_tax, alt_tax)
return where(alt_tax_eligible, smaller_tax, reg_tax)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from policyengine_us.model_api import *


class ia_regular_tax_consolidated(Variable):
value_type = float
entity = TaxUnit
label = "Iowa regular tax for years on or after 2023"
unit = USD
definition_period = YEAR
reference = "https://revenue.iowa.gov/media/2748/download?inline"
defined_for = StateCode.IA

def formula(tax_unit, period, parameters):
taxable_income = tax_unit("ia_taxable_income_consolidated", period)
p = parameters(period).gov.states.ia.tax.income.rates
filing_status = tax_unit("filing_status", period)
joint = filing_status == filing_status.possible_values.JOINT
return where(
joint,
p.by_filing_status.joint.calc(taxable_income),
p.by_filing_status.other.calc(taxable_income),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_us.model_api import *


class ia_additions_consolidated(Variable):
value_type = float
entity = TaxUnit
label = "Iowa additions to taxable income for years on or after 2023"
unit = USD
definition_period = YEAR
reference = "https://www.legis.iowa.gov/docs/code/422.7.pdf"
defined_for = StateCode.IA

adds = "gov.states.ia.tax.income.taxable_income.additions"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_us.model_api import *


class ia_subtractions_consolidated(Variable):
value_type = float
entity = TaxUnit
label = "Iowa subtractions from taxable income for years on or after 2023"
unit = USD
definition_period = YEAR
reference = "https://www.legis.iowa.gov/docs/code/422.7.pdf"
defined_for = StateCode.IA

adds = "gov.states.ia.tax.income.taxable_income.subtractions"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from policyengine_us.model_api import *


class ia_taxable_income_consolidated(Variable):
value_type = float
entity = TaxUnit
label = "Iowa taxable income for years on or after 2023"
unit = USD
definition_period = YEAR
reference = (
"https://revenue.iowa.gov/media/2746/download?inline",
"https://www.legis.iowa.gov/docs/code/422.7.pdf",
)
defined_for = StateCode.IA

def formula(tax_unit, period, parameters):
fed_taxable_income = tax_unit("taxable_income", period)
modifications = tax_unit(
"ia_taxable_income_modifications_consolidated", period
)
# Modifications include additions and subtractions
return max_(0, fed_taxable_income + modifications)
Loading