diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a92ee79e..9d2a59461 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.6] - 2023-11-14 17:00:00 + +### Added + +- Updates Montana tax logic. + ## [0.2.5] - 2023-10-24 22:00:00 ### Added @@ -185,7 +191,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - First prototype version based off of openfisca-us and tax-calculator. - +[0.2.6]: https://github.com/TheCGO/fiscalsim-us/compare/v0.2.5...v0.2.6 [0.2.5]: https://github.com/TheCGO/fiscalsim-us/compare/v0.2.4...v0.2.5 [0.2.4]: https://github.com/TheCGO/fiscalsim-us/compare/v0.2.3...v0.2.4 [0.2.3]: https://github.com/TheCGO/fiscalsim-us/compare/v0.2.2...v0.2.3 diff --git a/changelog.yaml b/changelog.yaml index aa9a8c1fa..baf663707 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -169,3 +169,8 @@ - Updated environment.yml and build_and_test.yml to allow for python 3.11 - Updated Virginia tax logic with correct mapping from federal filing status to state filing status. date: 2023-10-24 22:00:00 +- bump: patch + changes: + added: + - Updates Montana tax logic + date: 2023-11-14 17:00:00 diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/itemized_deductions.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/itemized_deductions.yaml new file mode 100644 index 000000000..eb9625433 --- /dev/null +++ b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/itemized_deductions.yaml @@ -0,0 +1,24 @@ +description: Montana deductions from taxable income if itemizing (that are not available if not itemizing). +values: + 2022-01-01: + - mt_medical_and_dental_expenses_deduction + - mt_medical_premiums_deduction + - mt_long_term_care_premiums_deduction + - mt_federal_income_tax_deduction + - mt_state_local_tax_deduction + - mt_light_vehicle_registration_deduction + - mt_per_capita_livestock_deduction + - mt_other_taxes_paid_deduction + - mt_home_mortage_interest_deduction + - mt_investment_interest_deduction + - mt_charitable_cash_deduction + - mt_charitable_noncash_deduction + - mt_charitable_carryover_deduction + - mt_child_care_expense_deduction + - mt_casualty_loss_deduction + - mt_political_contributions_deduction + - mt_gambling_loss_deduction + - mt_other_deduction +metadata: + unit: variable + label: montana itemized deductions diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/medical_dental/rate.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/medical_dental/rate.yaml new file mode 100644 index 000000000..c1fb09bf7 --- /dev/null +++ b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/medical_dental/rate.yaml @@ -0,0 +1,9 @@ +description: Montana percentage of adjusted gross income that your medical and dental expenses are subject to. +values: + 2022-01-01: 0.075 +metadata: + unit: year + label: Montana itemized medical and dental rate + reference: + title: Montana Individual Tax Return Form 2 | Itemized Deductions Scedule | Line 1c + href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/misc/political_contributions_cap.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/misc/political_contributions_cap.yaml new file mode 100644 index 000000000..bbaa6eb2f --- /dev/null +++ b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/misc/political_contributions_cap.yaml @@ -0,0 +1,9 @@ +description: Montana cap that the political contributions and limited by per taxpayer +values: + 2022-01-01: 100 +metadata: + unit: year + label: Montana political contributions cap + reference: + title: Montana Individual Tax Return Form 2 | Itemized Deductions Scedule | Line 16 + href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/misc/salt_cap.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/misc/salt_cap.yaml new file mode 100644 index 000000000..f27723800 --- /dev/null +++ b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/itemized/misc/salt_cap.yaml @@ -0,0 +1,21 @@ +description: Maximum amount of state and local income, sales and real estate tax deductions allowed in montana. +metadata: + unit: currency-USD + period: year + name: mt_salt_cap + label: Montana SALT cap +HEAD_OF_HOUSEHOLD: + values: + 2022-01-01: 10_000 +JOINT: + values: + 2022-01-01: 10_000 +SEPARATE: + values: + 2022-01-01: 5_000 +SINGLE: + values: + 2022-01-01: 10000 +WIDOW: + values: + 2022-01-01: 10000 diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/max.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/max.yaml index 1025c46b4..abff2c2d5 100644 --- a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/max.yaml +++ b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/max.yaml @@ -1,4 +1,5 @@ description: Montana provides this maximum standard deduction amount, based on filing status. + metadata: label: Montana standard deduction max amount period: year @@ -8,7 +9,7 @@ metadata: reference: - title: MT Code, Income Tax - Deductions, § 42-15-523 (2) href: https://rules.mt.gov/gateway/RuleNo.asp?RN=42%2E15%2E523 - - title: Montana Tax Form 2022 | Standard Deduction | Line 3 + - title: This refers to line 3 of the standard deduction worksheet on Montana tax form 2. | Montana Tax Form 2022 | Standard Deduction | Line 3 href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf#page=7 - title: Montana Tax Form 2021 | Standard Deduction | Line 3 href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021.pdf#page=7 diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/min.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/min.yaml index 619a2f39c..97aca3e3f 100644 --- a/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/min.yaml +++ b/fiscalsim_us/parameters/gov/states/mt/tax/income/deductions/standard/min.yaml @@ -1,4 +1,5 @@ description: Montana provides a minimum standard deduction of this amount, based on filing status. + metadata: label: Montana minimum standard deduction period: year @@ -6,9 +7,13 @@ metadata: breakdown: - filing_status reference: + - title: Increase each year with inflation (repealed effective January 1, 2024) + href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0320/0150-0300-0210-0320.html + - title: Title 15 Chapter 30 Individual Income Tax Part 21. Rate and General Provisions, Standard Deduction Rule 15-30-2132 + href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0320/0150-0300-0210-0320.html - title: MT Code, Income Tax - Deductions, § 42-15-523 (2) href: https://rules.mt.gov/gateway/RuleNo.asp?RN=42%2E15%2E523 - - title: Montana Tax Form 2022 | Standard Deduction | Line 5 + - title: This refers to line 5 of the standard deduction worksheet on Montana tax form 2 | Montana Tax Form 2022 | Standard Deduction | Line 5 href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf#page=7 - title: Montana Tax Form 2021 | Standard Deduction | Line 5 href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021.pdf#page=7 diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml index 282cb22bc..1186d658b 100644 --- a/fiscalsim_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml +++ b/fiscalsim_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml @@ -4,6 +4,8 @@ values: 2022-01-01: 2_710 metadata: reference: + - title: Defined in the law as $1900 beginning after December 31, 2004, indexed by inflation. (Repealed effective January 1, 2024) + href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0140/0150-0300-0210-0140.html - title: "Montana Tax Form 2021 | Exemptions | Line 16" href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021.pdf#page=1 - title: "Montana Tax Form 2022 | Exemptions | Line 16" diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/rates/head_of_household.yaml similarity index 100% rename from fiscalsim_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml rename to fiscalsim_us/parameters/gov/states/mt/tax/income/rates/head_of_household.yaml diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/main/joint.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/rates/joint.yaml similarity index 100% rename from fiscalsim_us/parameters/gov/states/mt/tax/income/main/joint.yaml rename to fiscalsim_us/parameters/gov/states/mt/tax/income/rates/joint.yaml diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/main/separate.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/rates/separate.yaml similarity index 100% rename from fiscalsim_us/parameters/gov/states/mt/tax/income/main/separate.yaml rename to fiscalsim_us/parameters/gov/states/mt/tax/income/rates/separate.yaml diff --git a/fiscalsim_us/parameters/gov/states/mt/tax/income/main/single.yaml b/fiscalsim_us/parameters/gov/states/mt/tax/income/rates/single.yaml similarity index 100% rename from fiscalsim_us/parameters/gov/states/mt/tax/income/main/single.yaml rename to fiscalsim_us/parameters/gov/states/mt/tax/income/rates/single.yaml diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/additions_subtractions/mt_income_additions.py b/fiscalsim_us/variables/gov/states/mt/tax/income/additions_subtractions/mt_income_additions.py new file mode 100644 index 000000000..46cd65290 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/additions_subtractions/mt_income_additions.py @@ -0,0 +1,16 @@ +from fiscalsim_us.model_api import * + + +class mt_additions_to_income(Variable): + """ + Line 12 on Montana 2022 Individual Income Tax return form 2. These + additions to income include the categories that are listed + in Montana Additions Schedule on page 4 of Montana 2022 Individual Income Tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "MT additions to income" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/additions_subtractions/mt_income_subtractions.py b/fiscalsim_us/variables/gov/states/mt/tax/income/additions_subtractions/mt_income_subtractions.py new file mode 100644 index 000000000..ad16d3fe8 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/additions_subtractions/mt_income_subtractions.py @@ -0,0 +1,16 @@ +from fiscalsim_us.model_api import * + + +class mt_subtractions_to_income(Variable): + """ + Line 13 on Montana 2022 Individual Income Tax return form 2. These + subtractions to income include the categories that are listed + in Montana Subtractions Schedule on page 5 of Montana 2022 Individual Income Tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "MT subtractions to income" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_eitc.py b/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_eitc.py similarity index 100% rename from fiscalsim_us/variables/gov/states/mt/tax/income/mt_eitc.py rename to fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_eitc.py diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_nonrefundable_credits.py b/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_nonrefundable_credits.py new file mode 100644 index 000000000..801072b0f --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_nonrefundable_credits.py @@ -0,0 +1,16 @@ +from fiscalsim_us.model_api import * + + +class mt_nonrefundable_credits(Variable): + """ + Line 19 of Montana state individual tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "Montana refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + adds = "gov.states.mt.tax.income.credits.non_refundable" diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_refundable_credits.py b/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_refundable_credits.py similarity index 77% rename from fiscalsim_us/variables/gov/states/mt/tax/income/mt_refundable_credits.py rename to fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_refundable_credits.py index a0f13f36d..7f6edae61 100644 --- a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_refundable_credits.py +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_refundable_credits.py @@ -2,6 +2,10 @@ class mt_refundable_credits(Variable): + """ + Line 22 on Montana individual tax return form 2 + """ + value_type = float entity = TaxUnit label = "Montana refundable credits" diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_tax_after_nonrefundable_credits.py b/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_tax_after_nonrefundable_credits.py new file mode 100644 index 000000000..b79db07a1 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/credits/mt_tax_after_nonrefundable_credits.py @@ -0,0 +1,21 @@ +from fiscalsim_us.model_api import * + + +class mt_tax_after_nonrefundable_credits(Variable): + """ + Line 20 on Montana individual tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "Montana refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameter): + nonrefundable = tax_unit("mt_nonrefundable_credits") + incometaxbeforecredits = tax_unit( + "mt_income_tax_before_refundable_credits" + ) + return incometaxbeforecredits - nonrefundable diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_casualty_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_casualty_deduction.py new file mode 100644 index 000000000..43528bfb9 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_casualty_deduction.py @@ -0,0 +1,19 @@ +from fiscalsim_us.model_api import * + + +class mt_casualty_loss_deduction(Variable): + """ + Line 15 on Montana itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana casualty and theft losses" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + deduction = (tax_unit, period, ["casualty_loss_deduction"]) + + return deduction diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_carryover_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_carryover_deduction.py new file mode 100644 index 000000000..0deba83f6 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_carryover_deduction.py @@ -0,0 +1,16 @@ +from fiscalsim_us.model_api import * + + +class mt_charitable_carryover_deduction(Variable): + """ + Line 13 on Montana itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = ( + "Montana charitable carryover donation from previous year deduction" + ) + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_cash_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_cash_deduction.py new file mode 100644 index 000000000..6416b5470 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_cash_deduction.py @@ -0,0 +1,22 @@ +from fiscalsim_us.model_api import * + + +class mt_charitable_cash_deduction(Variable): + """ + Line 11 on Montana itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana charitable cash donation deduction" + unit = USD + documentation = ( + "Montana deduction from taxable income for charitable cash donations." + ) + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + cash_donations = add(tax_unit, period, ["charitable_cash_donations"]) + + return cash_donations diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_noncash_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_noncash_deduction.py new file mode 100644 index 000000000..f6e3e89b9 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_charitable_noncash_deduction.py @@ -0,0 +1,19 @@ +from fiscalsim_us.model_api import * + + +class mt_charitable_noncash_deduction(Variable): + """ + Line 12 on Montana itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana charitable non-cash donation deduction" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + noncash_donations = tax_unit(period, ["charitable_non_cash_donations"]) + + return noncash_donations diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_child_care_expenses_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_child_care_expenses_deduction.py new file mode 100644 index 000000000..109a535ff --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_child_care_expenses_deduction.py @@ -0,0 +1,14 @@ +from fiscalsim_us.model_api import * + + +class mt_child_care_expense_deduction(Variable): + """ + Line 14 on Montana itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana child and dependent care expenses" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction.py new file mode 100644 index 000000000..645ea5643 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction.py @@ -0,0 +1,22 @@ +from fiscalsim_us.model_api import * + + +class mt_federal_income_tax_deduction(Variable): + """ + Line 4 on itemized deductions schedule + Includes the following + *Federal income tax withheld + *Federal estimated tax payments + *Prior year federal income taxes + *Other back year federal income taxes + Add each of those together but not more then $5,000 if you are single, + head of household, or married filing sperarately; or $10,000 if you + are married filing jointly + """ + + value_type = float + entity = TaxUnit + label = "Montana federal tax paid/withheld in prior year" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_gambling_loss_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_gambling_loss_deduction.py new file mode 100644 index 000000000..d1ccc1324 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_gambling_loss_deduction.py @@ -0,0 +1,15 @@ +from fiscalsim_us.model_api import * + + +class mt_gambling_loss_deduction(Variable): + """ + Line 17 on itemized deductions schedule + Limited to what it allowed under federal law + """ + + value_type = float + entity = TaxUnit + label = "Montana gambling loss deduction" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_home_mortage_interest_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_home_mortage_interest_deduction.py new file mode 100644 index 000000000..41da10f56 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_home_mortage_interest_deduction.py @@ -0,0 +1,15 @@ +from fiscalsim_us.model_api import * + + +class mt_home_mortage_interest_deduction(Variable): + """ + Line 9 on itemized deductions schedule + Home mortgage interst and points + """ + + value_type = float + entity = TaxUnit + label = "Montana home mortage interest deduction" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_investment_interest_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_investment_interest_deduction.py new file mode 100644 index 000000000..cc603cf7d --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_investment_interest_deduction.py @@ -0,0 +1,19 @@ +from fiscalsim_us.model_api import * + + +class mt_investment_interest_deduction(Variable): + """ + Line 10 on itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana investment interest deduction" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + contributions = tax_unit("investment_income_form_4952") + + return contributions diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_itemized_deductions.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_itemized_deductions.py new file mode 100644 index 000000000..4edc58fa2 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_itemized_deductions.py @@ -0,0 +1,22 @@ +from fiscalsim_us.model_api import * + + +class mt_itemized_deduction(Variable): + """ + See itemized deduction schedule on page 7 of the Montana individual tax return form 2 for how to calculate + Line 15 on Montana individual tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "MT itemized deduction" + unit = USD + definition_period = YEAR + documentation = "Montana itemized deduction" + reference = ( + "https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf" + "https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2022/12/Form-2-2022-Instructions.pdf" + ) + defined_for = StateCode.MT + + adds = "gov.states.mt.tax.income.deductions.itemized.itemized_deductions" diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_light_vehicle_registration_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_light_vehicle_registration_deduction.py new file mode 100644 index 000000000..48d2c9cee --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_light_vehicle_registration_deduction.py @@ -0,0 +1,14 @@ +from fiscalsim_us.model_api import * + + +class mt_light_vehicle_registration_deduction(Variable): + """ + Line 6 on itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana light vehicle registration fees" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_long_term_care_premiums.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_long_term_care_premiums.py new file mode 100644 index 000000000..76d704bee --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_long_term_care_premiums.py @@ -0,0 +1,15 @@ +from fiscalsim_us.model_api import * + + +class mt_long_term_care_premiums_deduction(Variable): + """ + Line 3 on itemized deductions schedule + Long-term core insurance premiums not deducted elsewhere on your return + """ + + value_type = float + entity = TaxUnit + label = "Montana long-term care insurance premiums deduction" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_dental_expense.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_dental_expense.py new file mode 100644 index 000000000..a9d664784 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_dental_expense.py @@ -0,0 +1,14 @@ +from fiscalsim_us.model_api import * + + +class mt_medical_dental_expense(Variable): + """ + Line 1a on itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana medical and dental expense" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_dental_expenses_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_dental_expenses_deduction.py new file mode 100644 index 000000000..01bce8d9b --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_dental_expenses_deduction.py @@ -0,0 +1,24 @@ +from fiscalsim_us.model_api import * + + +class mt_medical_dental_expenses_deduction(Variable): + """ + Line 1 on itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana medical and dental expense deduction" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + p = parameters( + period + ).gov.states.mt.tax.income.deductions.itemized.medical_dental + line1a = tax_unit("mt_medical_dental_expense", period) + line1b = tax_unit("mt_agi", period) + line1c = line1b * p.rate + + return max_(line1c - line1a, 0) diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_premiums_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_premiums_deduction.py new file mode 100644 index 000000000..2befc6cce --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_medical_premiums_deduction.py @@ -0,0 +1,15 @@ +from fiscalsim_us.model_api import * + + +class mt_medical_premiums_deduction(Variable): + """ + Line 2 on itemized deductions schedule + Medical insurance premiums not deducted elsewhere on the return + """ + + value_type = float + entity = TaxUnit + label = "Montana medical insurance premiums" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_taxable_income.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_other_deduction.py similarity index 53% rename from fiscalsim_us/variables/gov/states/mt/tax/income/mt_taxable_income.py rename to fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_other_deduction.py index 11d03ff6e..9a3699b9c 100644 --- a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_taxable_income.py +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_other_deduction.py @@ -1,10 +1,14 @@ from fiscalsim_us.model_api import * -class mt_taxable_income(Variable): +class mt_other_deduction(Variable): + """ + Line 18 on itemized deductions schedule + """ + value_type = float entity = TaxUnit - label = "Montana taxable income" + label = "Montana other deductions" unit = USD definition_period = YEAR defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_other_taxes_paid_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_other_taxes_paid_deduction.py new file mode 100644 index 000000000..f7a342306 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_other_taxes_paid_deduction.py @@ -0,0 +1,14 @@ +from fiscalsim_us.model_api import * + + +class mt_other_taxes_paid_deduction(Variable): + """ + Line 8 on itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana other deductible taxes paid" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_per_capita_livestock_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_per_capita_livestock_deduction.py new file mode 100644 index 000000000..746687329 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_per_capita_livestock_deduction.py @@ -0,0 +1,14 @@ +from fiscalsim_us.model_api import * + + +class mt_per_capita_livestock_deduction(Variable): + """ + Line 7 on itemized deductions schedule + """ + + value_type = float + entity = TaxUnit + label = "Montana per capita livestock fees" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_agi.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_political_contributions.py similarity index 63% rename from fiscalsim_us/variables/gov/states/mt/tax/income/mt_agi.py rename to fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_political_contributions.py index 5b6ed8601..13ee64bda 100644 --- a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_agi.py +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_political_contributions.py @@ -1,10 +1,10 @@ from fiscalsim_us.model_api import * -class mt_agi(Variable): +class mt_political_contributions(Variable): value_type = float entity = TaxUnit - label = "Montana Adjusted Gross Income" + label = "Montana political contributions" unit = USD definition_period = YEAR defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_political_contributions_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_political_contributions_deduction.py new file mode 100644 index 000000000..74fbc3d28 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_political_contributions_deduction.py @@ -0,0 +1,24 @@ +from fiscalsim_us.model_api import * + + +class mt_political_contributions_deduction(Variable): + """ + Line 16 on itemized deductions schedule + Limited to $100 per taxpayer + """ + + value_type = float + entity = TaxUnit + label = "Montana political contributions deduction" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + p = parameters( + period + ).gov.states.mt.tax.income.deductions.itemized.misc + cap = p.political_contribution_cap + contributions = tax_unit("mt_political_contributions") + + return min_(cap, contributions) diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_state_local_tax_deduction.py b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_state_local_tax_deduction.py new file mode 100644 index 000000000..7fe46addc --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/deductions/itemized/mt_state_local_tax_deduction.py @@ -0,0 +1,37 @@ +from fiscalsim_us.model_api import * + + +class mt_state_local_tax_deduction(Variable): + """ + Line 5 on itemized deductions schedule + Includes the following + *General state and local sales taxes + *Local income taxes + *Real estate taxes paid + *Value-based personal property taxes + Add each of those together but not more than $10,000 if you are single, + head of household, or married filing jointly; or $5,000 if you + are married filing separately + """ + + value_type = float + entity = TaxUnit + label = "Montana state and local taxes in prior year" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + salt_amount = add( + tax_unit, + period, + [ + "statelocal_sales_or_prior_inctax", + "real_estate_taxes", + ], + ) + salt = parameters( + period + ).gov.state.mt.tax.income.deductions.itemized.misc + cap = salt.salt_cap[tax_unit("filing_status", period)] + return min(cap, salt_amount) diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_agi.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_agi.py new file mode 100644 index 000000000..6475c34b6 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_agi.py @@ -0,0 +1,18 @@ +from fiscalsim_us.model_api import * + + +class mt_agi(Variable): + """ + Montana adjusted gross income. Line 14 on Montana individual income tax + return form 2 + """ + + value_type = float + entity = TaxUnit + label = "MT adjusted gross income" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + adds = ["adjusted_gross_income", "mt_income_additions"] + subtracts = ["mt_income_subtractions"] diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_contributions_penalties_interest.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_contributions_penalties_interest.py new file mode 100644 index 000000000..96877a7ce --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_contributions_penalties_interest.py @@ -0,0 +1,14 @@ +from fiscalsim_us.model_api import * + + +class mt_contributions_penalties_interest(Variable): + """ + Line 24 on Montana individual income tax retrun form 2 + """ + + value_type = float + entity = TaxUnit + label = "Montana contributions penatlites and interest" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_income_tax.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_income_tax.py similarity index 100% rename from fiscalsim_us/variables/gov/states/mt/tax/income/mt_income_tax.py rename to fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_income_tax.py diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_income_tax_before_refundable_credits.py similarity index 87% rename from fiscalsim_us/variables/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.py rename to fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_income_tax_before_refundable_credits.py index 5f2bbf932..dfdcca9a3 100644 --- a/fiscalsim_us/variables/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.py +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_income_tax_before_refundable_credits.py @@ -2,6 +2,10 @@ class mt_income_tax_before_refundable_credits(Variable): + """ + Line 18 of Montana state individual tax return form 2 + """ + value_type = float entity = TaxUnit label = "Montana income tax before refundable credits" @@ -11,7 +15,7 @@ class mt_income_tax_before_refundable_credits(Variable): def formula(tax_unit, period, parameters): income = tax_unit("mt_taxable_income", period) - p = parameters(period).gov.states.mt.tax.income.main + p = parameters(period).gov.states.mt.tax.income.rates filing_status = tax_unit("filing_status", period) status = filing_status.possible_values return select( diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_tax_due.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_tax_due.py new file mode 100644 index 000000000..7a63d0727 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_tax_due.py @@ -0,0 +1,21 @@ +from fiscalsim_us.model_api import * + + +class mt_tax_due(Variable): + """ + Line 26 on Montana state individual tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "Montana tax due" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + +def formula(tax_unit, period, parameters): + line20 = tax_unit("mt_tax_after_nonrefundable_credits") + line25 = tax_unit("mt_total_payments") + + return where(line25 < line20, line20 - line25, 0) diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_tax_overpaid.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_tax_overpaid.py new file mode 100644 index 000000000..0af757b01 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_tax_overpaid.py @@ -0,0 +1,21 @@ +from fiscalsim_us.model_api import * + + +class mt_tax_overpaid(Variable): + """ + Line 27 on Montana state individual tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "Montana tax overpaid" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + +def formula(tax_unit, period, parameters): + line20 = tax_unit("mt_tax_after_nonrefundable_credits") + line25 = tax_unit("mt_total_payments") + + return where(line25 > line20, line25 - line20, 0) diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_taxable_income.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_taxable_income.py new file mode 100644 index 000000000..5ff513a2a --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_taxable_income.py @@ -0,0 +1,25 @@ +from fiscalsim_us.model_api import * + + +class mt_taxable_income(Variable): + """ + Line 17 on Montana state individual tax return form 2 + """ + + value_type = float + entity = TaxUnit + label = "Montana taxable income" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + +def formula(tax_unit, period, parameters): + std_ded = tax_unit("mt_standard_deduction", period) + itm_ded = tax_unit("mt_itemized_deductions", period) + deductions = where(itm_ded > std_ded, itm_ded, std_ded) + exemptions = tax_unit("mt_exemptions", period) + return max( + 0, + tax_unit("mt_agi", period) - deductions - exemptions, + ) diff --git a/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_total_payments.py b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_total_payments.py new file mode 100644 index 000000000..c35280c58 --- /dev/null +++ b/fiscalsim_us/variables/gov/states/mt/tax/income/main/mt_total_payments.py @@ -0,0 +1,17 @@ +from fiscalsim_us.model_api import * + + +class mt_total_payments(Variable): + """ + Line 25 on Montana individual income tax retrun form 2 + """ + + value_type = float + entity = TaxUnit + label = "Montana total payments" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + adds = ["mt_refundable_credits", "mt_eitc"] + subtracts = ["mt_contributions_penalties_interest"] diff --git a/fiscalsim_us/variables/gov/states/va/tax/income/va_tax_credit_for_low_income_individuals.py b/fiscalsim_us/variables/gov/states/va/tax/income/va_tax_credit_for_low_income_individuals.py index 6001872c2..49deff764 100644 --- a/fiscalsim_us/variables/gov/states/va/tax/income/va_tax_credit_for_low_income_individuals.py +++ b/fiscalsim_us/variables/gov/states/va/tax/income/va_tax_credit_for_low_income_individuals.py @@ -38,6 +38,6 @@ def formula(tax_unit, period, parameters): line_14 = fed_eitc line_15 = line_14 * eitc_rate line_16 = where(line_15 > line_13, line_15, line_13) - line_17 = where(net_tax > line_16, line_16, 0) + line_17 = where(net_tax > line_16, line_16, net_tax) - return line_17 + return where(total_agi < threshold, line_17, 0) diff --git a/setup.py b/setup.py index 0e2f3e663..622ee9994 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="fiscalsim-us", - version="0.2.5", + version="0.2.6", author="Center for Growth and Opportunity at Utah State University (CGO)", author_email="fiscalsim@thecgo.org", long_description=readme,