Skip to content

Commit

Permalink
Updates Michigan Tax Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
finpaul committed Nov 28, 2023
1 parent 6de2829 commit 648620b
Show file tree
Hide file tree
Showing 25 changed files with 350 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ values:
2008-01-01: 0.1
2009-01-01: 0.2
2012-01-01: 0.06
# Reflected starting with 2023 tax form.
# In 2022, Michigan enacted a supplemental 24% match after tax filing season.
2022-01-01: 0.3


Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from fiscalsim_us.model_api import *


class mi_additions(Variable):
"""
Line 11 on Michigan 2022 Individual Income Tax return form MI-1040.
These additions to income include the categories that are listed
in Michigan Line 9 of Schedule 1 found in the instructions
"""

value_type = float
entity = TaxUnit
label = "MI additions to income"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from fiscalsim_us.model_api import *


class mi_subtractions(Variable):
"""
Line 13 on Michigan 2022 Individual Income Tax return form MI-1040.
These subtractions to income include the categories that are listed
in Michigan Line 30 of Schedule 1 found in the instructions
"""

value_type = float
entity = TaxUnit
label = "MI subtractions to income"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from fiscalsim_us.model_api import *


class mi_historic_preservation_amount(Variable):
"""
Line 19a on Michigan 2022 Individual Income Tax return form MI-1040.
If you are including Form 3581, enter the amount
from line 9. If you are including Form 5803, enter the amount from line 7.
"""

value_type = float
entity = TaxUnit
label = "MI amount of Historic Preservation Tax Credit"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from fiscalsim_us.model_api import *


class mi_historic_preservation_credit(Variable):
"""
Line 19b on Michigan 2022 Individual Income Tax return form MI-1040.
If you are including Form 3581, enter the amount
from line 14. If you are including Form 5803, enter the amount from line 12.
"""

value_type = float
entity = TaxUnit
label = "MI Credit of Historic Preservation Tax Credit"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from fiscalsim_us.model_api import *


class mi_income_tax(Variable):
"""
Line 20 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI income tax"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI

def formula(tax_unit, period, parameters):
imposed = tax_unit("mi_income_tax_imposed_by_other_gov_credit", period)
historic = tax_unit("mi_historic_preservation_amount", period)
tax = tax_unit("mi_income_tax_before_credits", period)
credit = imposed + historic
return max(0, credit - tax)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from fiscalsim_us.model_api import *


class mi_income_tax_imposed_by_other_gov_amount(Variable):
"""
Line 18a on Michigan 2022 Individual Income Tax return form MI-1040.
This non-refundable credit includes the amount of income tax paid to:
- A nonreciprocal state
- A local government unit outside Michigan, including tax
paid to local units located in reciprocal states
- The District of Columbia
-A Canadian province.
"""

value_type = float
entity = TaxUnit
label = "MI income tax amount imposed by goverment units outside of michigan"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_income_tax_imposed_by_other_gov_credit(Variable):
"""
Line 18b on Michigan 2022 Individual Income Tax return form MI-1040.
"""

value_type = float
entity = TaxUnit
label = "MI income tax credit imposed by goverment units outside of michigan"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from fiscalsim_us.model_api import *


class mi_total_tax_liability(Variable):
"""
Line 24 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MT total tax liability"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI

adds = ["mi_income_tax", "mi_voluntary_contributions","mi_use_tax"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_use_tax(Variable):
"""
Line 23 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI use tax"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_voluntary_contributions(Variable):
"""
Line 22 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI volentary contributions"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_electing_flow_through_credit(Variable):
"""
Line 29 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI allocated share of tax paid by an electing flow-through entity credit"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_estimated_tax(Variable):
"""
Line 31 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI Estimated Tax, Extension Payments, and Credit Forward"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_farmland_preservation_tax_credit(Variable):
"""
Line 26 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI Farmland Preservation Tax Credit"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_historic_preservation_refundable(Variable):
"""
Line 28 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI Historic Preservation Tax Credit Refundable"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_property_tax_credit(Variable):
"""
Line 25 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI Property Tax Credit"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from fiscalsim_us.model_api import *


class mi_total_refundable_credits(Variable):
"""
Line 33 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MT total refundable credits"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI

adds = ["mi_property_tax_credit","mi_farmland_preservation_tax_credit","mi_eitc",
"mi_historic_preservation_refundable","mi_electing_flow_through_credit",
"mi_withheld","mi_estimated_tax"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fiscalsim_us.model_api import *


class mi_withheld(Variable):
"""
Line 30 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI tax withheld"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from fiscalsim_us.model_api import *


class mi_income_subject_to_tax(Variable):
"""
Line 14 on Michigan individual income tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "MI income subject to tax"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI

def formula(tax_unit, period, parameters):
total = tax_unit("mi_total_agi", period)
subtractions = tax_unit("mi_subtractions", period)

return max(0, subtractions - total)
21 changes: 21 additions & 0 deletions fiscalsim_us/variables/gov/states/mi/tax/income/main/mi_tax_due.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from fiscalsim_us.model_api import *


class mi_tax_due(Variable):
"""
Line 34 on Michigan tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "Michigan Tax Due"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI


def formula(tax_unit, period, parameters):
line33 = tax_unit("mi_total_refundable_credits")
line24 = tax_unit("mi_total_tax_liability")

return where(line33 < line24, line33 - line24, 0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from fiscalsim_us.model_api import *


class mi_tax_overpaid(Variable):
"""
Line 35 on Michigan tax form MI-1040
"""

value_type = float
entity = TaxUnit
label = "Michigan Tax Overpayed"
unit = USD
definition_period = YEAR
defined_for = StateCode.MI


def formula(tax_unit, period, parameters):
line33 = tax_unit("mi_total_refundable_credits")
line24 = tax_unit("mi_total_tax_liability")

return where(line33 > line24, line24 - line33, 0)
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ class mi_taxable_income(Variable):
defined_for = StateCode.MI
unit = USD
definition_period = YEAR

def formula(tax_unit, period, parameters):
income = tax_unit("mi_income_subject_to_tax", period)
exemption = tax_unit("mi_exemptions", period)
return max(0,exemption-income)
Loading

0 comments on commit 648620b

Please sign in to comment.