diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e39e64490e..31145eb56ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,78 @@ 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.329.3] - 2023-05-29 00:20:03 + +### Fixed + +- A bug causing itemization to be too frequently chosen. + +## [0.329.2] - 2023-05-28 17:06:47 + +### Fixed + +- Divide by zero in NYC CDCC. + +## [0.329.1] - 2023-05-27 18:05:33 + +### Fixed + +- Divide-by-zero error in ia_prorate_fraction. + +## [0.329.0] - 2023-05-27 16:33:26 + +### Added + +- New Hampshire income tax schedule. + +## [0.328.0] - 2023-05-27 15:54:35 + +### Added + +- Iowa state income tax. + +## [0.327.0] - 2023-05-27 05:42:06 + +### Added + +- Montana personal income tax schedule. + +## [0.326.0] - 2023-05-27 05:39:37 + +### Added + +- North Carolina income tax schedule. + +## [0.325.0] - 2023-05-27 05:06:06 + +### Added + +- Adjust New Jersey property tax deduction/credit for separate but cohabitating. + +## [0.324.0] - 2023-05-27 04:37:24 + +### Added + +- Python 3.10 support. + +## [0.323.0] - 2023-05-26 02:04:07 + +### Added + +- New Jersey income tax formula. + +## [0.322.0] - 2023-05-25 19:14:24 + +### Added + +- Colorado SSI State Supplement + +## [0.321.0] - 2023-05-25 05:21:32 + +### Added + +- Kentucky income tax rate. + ## [0.320.1] - 2023-05-23 07:48:13 ### Changed @@ -3855,6 +3927,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.329.3]: https://github.com/PolicyEngine/policyengine-us/compare/0.329.2...0.329.3 +[0.329.2]: https://github.com/PolicyEngine/policyengine-us/compare/0.329.1...0.329.2 +[0.329.1]: https://github.com/PolicyEngine/policyengine-us/compare/0.329.0...0.329.1 +[0.329.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.328.0...0.329.0 +[0.328.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.327.0...0.328.0 +[0.327.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.326.0...0.327.0 +[0.326.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.325.0...0.326.0 +[0.325.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.324.0...0.325.0 +[0.324.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.323.0...0.324.0 +[0.323.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.322.0...0.323.0 +[0.322.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.321.0...0.322.0 +[0.321.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.320.1...0.321.0 [0.320.1]: https://github.com/PolicyEngine/policyengine-us/compare/0.320.0...0.320.1 [0.320.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.319.0...0.320.0 [0.319.0]: https://github.com/PolicyEngine/policyengine-us/compare/0.318.0...0.319.0 diff --git a/changelog.yaml b/changelog.yaml index 757743ed2a8..59ee01c862f 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -3241,3 +3241,63 @@ changed: - Core bump. date: 2023-05-23 07:48:13 +- bump: minor + changes: + added: + - Kentucky income tax rate. + date: 2023-05-25 05:21:32 +- bump: minor + changes: + added: + - Colorado SSI State Supplement + date: 2023-05-25 19:14:24 +- bump: minor + changes: + added: + - New Jersey income tax formula. + date: 2023-05-26 02:04:07 +- bump: minor + changes: + added: + - Python 3.10 support. + date: 2023-05-27 04:37:24 +- bump: minor + changes: + added: + - Adjust New Jersey property tax deduction/credit for separate but cohabitating. + date: 2023-05-27 05:06:06 +- bump: minor + changes: + added: + - North Carolina income tax schedule. + date: 2023-05-27 05:39:37 +- bump: minor + changes: + added: + - Montana personal income tax schedule. + date: 2023-05-27 05:42:06 +- bump: minor + changes: + added: + - Iowa state income tax. + date: 2023-05-27 15:54:35 +- bump: minor + changes: + added: + - New Hampshire income tax schedule. + date: 2023-05-27 16:33:26 +- bump: patch + changes: + fixed: + - Divide-by-zero error in ia_prorate_fraction. + date: 2023-05-27 18:05:33 +- bump: patch + changes: + fixed: + - Divide by zero in NYC CDCC. + date: 2023-05-28 17:06:47 +- bump: patch + changes: + fixed: + - A bug causing itemization to be too frequently chosen. + date: 2023-05-29 00:20:03 diff --git a/policyengine_us/parameters/gov/states/co/ssa/state_supplement/age_range.yaml b/policyengine_us/parameters/gov/states/co/ssa/state_supplement/age_range.yaml new file mode 100644 index 00000000000..17cdca2957f --- /dev/null +++ b/policyengine_us/parameters/gov/states/co/ssa/state_supplement/age_range.yaml @@ -0,0 +1,18 @@ +description: Age range defining someone eligible for Colorado SSI State Supplement +brackets: + - threshold: + 2023-01-01: 0 + amount: + 2023-01-01: true + - threshold: + 2023-01-01: 60 + amount: + 2023-01-01: false +metadata: + type: single_amount + rate_unit: bool + threshold_unit: year + label: "Colorado State Supplement age range" + reference: + - title: ADULT FINANCIAL PROGRAMS | Income Maintenance (Volume 3) + href: https://www.coloradosos.gov/CCR/GenerateRulePdf.do?ruleVersionId=10694#page=25 diff --git a/policyengine_us/parameters/gov/states/co/ssa/state_supplement/grant_standard.yaml b/policyengine_us/parameters/gov/states/co/ssa/state_supplement/grant_standard.yaml new file mode 100644 index 00000000000..4d3e072b645 --- /dev/null +++ b/policyengine_us/parameters/gov/states/co/ssa/state_supplement/grant_standard.yaml @@ -0,0 +1,12 @@ +description: Grant Standard for Colorado State Supplement + +values: + 2023-01-01: 914 + +metadata: + unit: currency-USD + period: month + label: "Colorado State Supplement grant standard" + reference: + - title: ADULT FINANCIAL PROGRAMS | Income Maintenance (Volume 3) + href: https://www.coloradosos.gov/CCR/GenerateRulePdf.do?ruleVersionId=10694#page=73 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/deduction/elderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/deduction/elderly.yaml new file mode 100644 index 00000000000..bffa146bfdf --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/deduction/elderly.yaml @@ -0,0 +1,17 @@ +description: Iowa has a alternate tax with this deduction against modified income for tax units with elderly head or spouse. +values: + 2021-01-01: 32_000 + +metadata: + label: Iowa deduction used in tax alternate tax calculations for elderly + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 39 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=54 + - title: 2022 IA1040 Iowa Income Tax Return, Line 39 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/deduction/nonelderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/deduction/nonelderly.yaml new file mode 100644 index 00000000000..7fc0e0f199e --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/deduction/nonelderly.yaml @@ -0,0 +1,17 @@ +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 + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 39 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=54 + - title: 2022 IA1040 Iowa Income Tax Return, Line 39 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/elderly_age.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/elderly_age.yaml new file mode 100644 index 00000000000..4bc63d0bfb9 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/elderly_age.yaml @@ -0,0 +1,17 @@ +description: Iowa allows an alternate tax for non-single filing units where the deduction varies depending on whether head or spouse age is at least this age. +values: + 2021-01-01: 65 + +metadata: + label: Iowa alternate tax age threshold that determines deduction amount + period: year + unit: year + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 39 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=54 + - title: 2022 IA1040 Iowa Income Tax Return, Line 39 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/rate.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/rate.yaml new file mode 100644 index 00000000000..fb91ce22049 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternate_tax/rate.yaml @@ -0,0 +1,17 @@ +description: Iowa allows an alternate tax for non-single filing units that has this flat tax rate. +values: + 2021-01-01: 0.0853 + +metadata: + label: Iowa alternate tax rate + period: year + unit: /1 + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 39 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=54 + - title: 2022 IA1040 Iowa Income Tax Return, Line 39 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/exemption.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/exemption.yaml new file mode 100644 index 00000000000..89ce06e65ae --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/exemption.yaml @@ -0,0 +1,23 @@ +description: Iowa imposes an alternative minimum tax in which the AMT taxable income exemption is this amount. +metadata: + label: Iowa alternative minimum tax exemption amount + period: year + unit: currency-USD + breakdown: + - filing_status + reference: + - title: 2021 IA 6251 Form, Line 24 + href: https://tax.iowa.gov/sites/default/files/2021-12/IA6251%2841131%29.pdf#page=2 + - title: 2022 IA 6251 Form, Line 24 + href: https://tax.iowa.gov/sites/default/files/2023-01/IA6251%2841131%29.pdf#page=2 + +JOINT: + 2021-01-01: 150_000 +HEAD_OF_HOUSEHOLD: + 2021-01-01: 112_500 +WIDOW: + 2021-01-01: 112_500 +SINGLE: + 2021-01-01: 112_500 +SEPARATE: + 2021-01-01: 75_000 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/fraction.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/fraction.yaml new file mode 100644 index 00000000000..7450d61f7ae --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/fraction.yaml @@ -0,0 +1,13 @@ +description: Iowa imposes an alternative minimum tax that uses this fraction. +values: + 2021-01-01: 0.25 + +metadata: + label: Iowa alternative minimum tax fraction + period: year + unit: /1 + reference: + - title: 2021 IA 6251 Form, Line 26 + href: https://tax.iowa.gov/sites/default/files/2021-12/IA6251%2841131%29.pdf#page=2 + - title: 2022 IA 6251 Form, Line 26 + href: https://tax.iowa.gov/sites/default/files/2023-01/IA6251%2841131%29.pdf#page=2 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/rate.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/rate.yaml new file mode 100644 index 00000000000..3ead4019ab3 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/rate.yaml @@ -0,0 +1,13 @@ +description: Iowa imposes an alternative minimum tax with this rate. +values: + 2021-01-01: 0.064 + +metadata: + label: Iowa alternative minimum tax rate + period: year + unit: /1 + reference: + - title: 2021 IA 6251 Form, Line 29 + href: https://tax.iowa.gov/sites/default/files/2021-12/IA6251%2841131%29.pdf#page=2 + - title: 2022 IA 6251 Form, Line 29 + href: https://tax.iowa.gov/sites/default/files/2023-01/IA6251%2841131%29.pdf#page=2 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/threshold.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/threshold.yaml new file mode 100644 index 00000000000..431cb49e641 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/alternative_minimum_tax/threshold.yaml @@ -0,0 +1,23 @@ +description: Iowa imposes an alternative minimum tax in which the AMT taxable income threshold is this amount. +metadata: + label: Iowa alternative minimum tax threshold amount + period: year + unit: currency-USD + breakdown: + - filing_status + reference: + - title: 2021 IA 6251 Form, Line 23 + href: https://tax.iowa.gov/sites/default/files/2021-12/IA6251%2841131%29.pdf#page=2 + - title: 2022 IA 6251 Form, Line 23 + href: https://tax.iowa.gov/sites/default/files/2023-01/IA6251%2841131%29.pdf#page=2 + +JOINT: + 2021-01-01: 35_000 +HEAD_OF_HOUSEHOLD: + 2021-01-01: 26_000 +WIDOW: + 2021-01-01: 26_000 +SINGLE: + 2021-01-01: 26_000 +SEPARATE: + 2021-01-01: 17_500 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/child_care/fraction.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/child_care/fraction.yaml new file mode 100644 index 00000000000..5743673d05b --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/child_care/fraction.yaml @@ -0,0 +1,46 @@ +description: Iowa has a child/dependent care credit that is a net-income-based fraction of the federal credit. +metadata: + period: year + type: single_amount + threshold_unit: currency-USD + amount_unit: /1 + label: Iowa CDCC fraction + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 60 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=86 + - title: 2022 IA1040 Iowa Income Tax Return, Line 60 + href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=86 + +brackets: + - threshold: + 2021-01-01: -.inf + amount: + 2021-01-01: 0.75 + - threshold: + 2021-01-01: 10_000 + amount: + 2021-01-01: 0.65 + - threshold: + 2021-01-01: 20_000 + amount: + 2021-01-01: 0.55 + - threshold: + 2021-01-01: 25_000 + amount: + 2021-01-01: 0.50 + - threshold: + 2021-01-01: 35_000 + amount: + 2021-01-01: 0.40 + - threshold: + 2021-01-01: 40_000 + amount: + 2021-01-01: 0.30 + - threshold: + 2021-01-01: 90_000 + amount: + 2021-01-01: 0.0 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/earned_income/fraction.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/earned_income/fraction.yaml new file mode 100644 index 00000000000..7c050dbb31c --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/earned_income/fraction.yaml @@ -0,0 +1,17 @@ +description: Iowa provides an earned income tax credit (EITC) that is this fraction of the federal EITC amount. +values: + 2021-01-01: 0.15 + +metadata: + label: Iowa EITC fraction + period: year + unit: /1 + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 61 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=87 + - title: 2022 IA1040 Iowa Income Tax Return, Line 61 + href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=87 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/additional.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/additional.yaml new file mode 100644 index 00000000000..b11cdf3bc0e --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/additional.yaml @@ -0,0 +1,17 @@ +description: Iowa has an nonrefundable exemption credit in which each elderly and/blind head and spouse receive this additional exemption amount for each condition. +values: + 2021-01-01: 20 + +metadata: + label: Iowa additional (elderly and/or blind) exemption amount + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Step 3 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=9 + - title: 2022 IA1040 Iowa Income Tax Return, Step 3 + 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=8 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/dependent.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/dependent.yaml new file mode 100644 index 00000000000..b75c0826adf --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/dependent.yaml @@ -0,0 +1,17 @@ +description: Iowa has an nonrefundable exemption credit in which each tax unit dependent receives this dependent exemption amount. +values: + 2021-01-01: 40 + +metadata: + label: Iowa dependent exemption amount + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Step 3 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=9 + - title: 2022 IA1040 Iowa Income Tax Return, Step 3 + 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=8 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/elderly_age.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/elderly_age.yaml new file mode 100644 index 00000000000..b7dd5a25611 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/elderly_age.yaml @@ -0,0 +1,18 @@ +description: Iowa gives an additional exemption credit to a head or spouse who is at least this age. + +values: + 2021-01-01: 65 + +metadata: + label: Iowa elderly age threshold used in additional exemption credit calculations + period: year + unit: year + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Step 3 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=9 + - title: 2022 IA1040 Iowa Income Tax Return, Step 3 + 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=8 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/personal.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/personal.yaml new file mode 100644 index 00000000000..1a248832ae4 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/exemption/personal.yaml @@ -0,0 +1,17 @@ +description: Iowa has an nonrefundable exemption credit in which each tax unit head and spouse receive this personal exemption amount. +values: + 2021-01-01: 40 + +metadata: + label: Iowa personal exemption amount + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Step 3 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=9 + - title: 2022 IA1040 Iowa Income Tax Return, Step 3 + 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=8 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/nonrefundable.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/nonrefundable.yaml new file mode 100644 index 00000000000..2bb03c4915e --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/nonrefundable.yaml @@ -0,0 +1,17 @@ +description: Iowa provides these nonrefundable tax credits. +values: + 2021-01-01: + - ia_exemption_credit + +metadata: + unit: variable + label: Iowa nonrefundable tax credits + reference: + - title: 2021 IA1040 Iowa Income Tax Return + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf + - title: 2022 IA1040 Iowa Income Tax Return + href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/credits/refundable.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/credits/refundable.yaml new file mode 100644 index 00000000000..fc4d590b06d --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/credits/refundable.yaml @@ -0,0 +1,18 @@ +description: Iowa provides these refundable tax credits. +values: + 2021-01-01: + - ia_cdcc + - ia_eitc + +metadata: + unit: variable + label: Iowa refundable tax credits + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Lines 60 and 61 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=86 + - title: 2022 IA1040 Iowa Income Tax Return, Lines 60 and 61 + href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=86 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/deductions/qualified_business_income/fraction.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/deductions/qualified_business_income/fraction.yaml new file mode 100644 index 00000000000..68f1a28c09d --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/deductions/qualified_business_income/fraction.yaml @@ -0,0 +1,18 @@ +description: Iowa allows a deduction of this fraction of the federal qualified buiness income deduction (QBID). +values: + 2021-01-01: 0.5 + 2022-01-01: 0.75 + +metadata: + label: Iowa federal QBID fraction + period: year + unit: /1 + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 32 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=45 + - title: 2022 IA1040 Iowa Income Tax Return, Line 32 + 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=45 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/deductions/sources.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/deductions/sources.yaml new file mode 100644 index 00000000000..811cab1b4f6 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/deductions/sources.yaml @@ -0,0 +1,19 @@ +description: Iowa allows these deductions against net income to reach taxable income. +values: + 2021-01-01: + - ia_fedtax_deduction # deduction of selected federal taxes + - ia_qbi_deduction # deduction of a fraction of federal QBID + - ia_basic_deduction # deduction of Iowa standard or itemized deductions + +metadata: + unit: variable + label: Iowa deductions against net income to reach taxable income + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Lines 28, 31, 32, 37 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=40 + - title: 2022 IA1040 Iowa Income Tax Return, Lines 28, 31, 32, 37 + 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=38 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/deductions/standard.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/deductions/standard.yaml new file mode 100644 index 00000000000..c610ad72f07 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/deductions/standard.yaml @@ -0,0 +1,28 @@ +description: Iowa allows this standard deduction amount. +metadata: + label: Iowa standard deduction amount + period: year + unit: currency-USD + breakdown: + - filing_status + reference: + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=46 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=46 + +JOINT: + 2021-01-01: 5_240 + 2022-01-01: 5_450 +HEAD_OF_HOUSEHOLD: + 2021-01-01: 5_240 + 2022-01-01: 5_450 +WIDOW: + 2021-01-01: 5_240 + 2022-01-01: 5_450 +SINGLE: + 2021-01-01: 2_130 + 2022-01-01: 2_210 +SEPARATE: + 2021-01-01: 2_130 + 2022-01-01: 2_210 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml new file mode 100644 index 00000000000..3e205ca6b3b --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/gross_income/sources.yaml @@ -0,0 +1,27 @@ +description: Iowa gross income sources. +values: + 2021-01-01: + - employment_income + - taxable_interest_income + - dividend_income + - alimony_income + - self_employment_income + - capital_gains + - taxable_pension_income + - partnership_s_corp_income + - farm_income + - taxable_unemployment_compensation + - miscellaneous_income + +metadata: + unit: variable + label: Iowa gross income sources + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Lines 1-14 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=12 + - title: 2022 IA1040 Iowa Income Tax Return, Lines 1-14 + 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=11 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/income_adjustments/sources.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/income_adjustments/sources.yaml new file mode 100644 index 00000000000..00393ca11f8 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/income_adjustments/sources.yaml @@ -0,0 +1,20 @@ +description: Iowa gross income adjustments sources. +values: + 2021-01-01: + - pension_contributions + - self_employment_tax_ald_person + - alimony_expense + - ia_pension_exclusion + +metadata: + unit: variable + label: Iowa gross income adjustments sources + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Lines 16-24 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=23 + - title: 2022 IA1040 Iowa Income Tax Return, Lines 16-24 + 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=23 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/modified_income/sources.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/modified_income/sources.yaml new file mode 100644 index 00000000000..2a7d9bf0e07 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/modified_income/sources.yaml @@ -0,0 +1,20 @@ +description: Iowa modified income sources. +values: + 2021-01-01: + - ia_net_income + - ia_pension_exclusion + - ia_reportable_social_security + +metadata: + unit: variable + label: Iowa modified income sources + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Lines 1-25 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=37 + - title: 2022 IA1040 Iowa Income Tax Return, Lines 1-25 + 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 + diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/pension_exclusion/maximum_amount.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/pension_exclusion/maximum_amount.yaml new file mode 100644 index 00000000000..0b8df2c3bfd --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/pension_exclusion/maximum_amount.yaml @@ -0,0 +1,23 @@ +description: Iowa allows an exclusion of taxable pension income to get its net income that is capped at this amount. +metadata: + label: Iowa maximum pension exclusion amount + period: year + unit: currency-USD + breakdown: + - filing_status + reference: + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=26 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=26 + +JOINT: + 2021-01-01: 12_000 +HEAD_OF_HOUSEHOLD: + 2021-01-01: 6_000 +WIDOW: + 2021-01-01: 6_000 +SINGLE: + 2021-01-01: 6_000 +SEPARATE: + 2021-01-01: 6_000 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/pension_exclusion/minimum_age.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/pension_exclusion/minimum_age.yaml new file mode 100644 index 00000000000..ce988458081 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/pension_exclusion/minimum_age.yaml @@ -0,0 +1,13 @@ +description: Iowa allows an exclusion of taxable pension income to get its net income that is available to elderly or disabled heads or spouses where elderly is defined as being at least this minimum age. +values: + 2021-01-01: 55 + +metadata: + period: year + unit: year + label: Iowa pension exclusion minimum age for age eligibility + reference: + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=26 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=26 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/rates/all.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/rates/all.yaml new file mode 100644 index 00000000000..b980285673e --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/rates/all.yaml @@ -0,0 +1,58 @@ +description: Iowa levies income taxes at these rates for all filers. +brackets: + - threshold: + 2021-01-01: 0 + rate: + 2021-01-01: 0.0033 + - threshold: + 2021-01-01: 1_676 + 2022-01-01: 1_743 + rate: + 2021-01-01: 0.0067 + - threshold: + 2021-01-01: 3_352 + 2022-01-01: 3_486 + rate: + 2021-01-01: 0.0225 + - threshold: + 2021-01-01: 6_704 + 2022-01-01: 6_972 + rate: + 2021-01-01: 0.0414 + - threshold: + 2021-01-01: 15_084 + 2022-01-01: 15_687 + rate: + 2021-01-01: 0.0563 + - threshold: + 2021-01-01: 25_140 + 2022-01-01: 26_145 + rate: + 2021-01-01: 0.0596 + - threshold: + 2021-01-01: 33_520 + 2022-01-01: 34_860 + rate: + 2021-01-01: 0.0625 + - threshold: + 2021-01-01: 50_280 + 2022-01-01: 52_290 + rate: + 2021-01-01: 0.0744 + - threshold: + 2021-01-01: 75_420 + 2022-01-01: 78_435 + rate: + 2021-01-01: 0.0853 + +metadata: + type: marginal_rate + threshold_unit: currency-USD + rate_unit: /1 + threshold_period: year + label: Iowa income tax rates and brackets for all filers + reference: + - title: IDR Announces 2021 Interest Rates, Deductions, Income Tax Brackets + href: https://tax.iowa.gov/idr-announces-2021-interest-rates-deductions-income-tax-brackets + - title: IDR Announces 2022 Interest Rates, Deductions, Income Tax Brackets + href: https://tax.iowa.gov/idr-announces-2022-interest-rates-deductions-income-tax-brackets diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/reportable_social_security/deduction.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/reportable_social_security/deduction.yaml new file mode 100644 index 00000000000..e9f9a35e0cb --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/reportable_social_security/deduction.yaml @@ -0,0 +1,23 @@ +description: Iowa calculates reportable social security using this income deduction. +metadata: + label: Iowa reportable social security income deduction + period: year + unit: currency-USD + breakdown: + - filing_status + reference: + - title: 2021 IA1040 Income Tax Return instructions, Step 4 + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=11 + - title: 2022 IA1040 Income Tax Return instructions, Step 4 + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=10 + +JOINT: + 2021-01-01: 32_000 +HEAD_OF_HOUSEHOLD: + 2021-01-01: 25_000 +WIDOW: + 2021-01-01: 25_000 +SINGLE: + 2021-01-01: 25_000 +SEPARATE: + 2021-01-01: 25_000 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/reportable_social_security/fraction.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/reportable_social_security/fraction.yaml new file mode 100644 index 00000000000..4390161798e --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/reportable_social_security/fraction.yaml @@ -0,0 +1,14 @@ +description: Iowa calculates reportable social security using this fraction. + +values: + 2021-01-01: 0.5 + +metadata: + label: Iowa reportable social security fraction + period: year + unit: /1 + reference: + - title: 2021 IA1040 Income Tax Return instructions, Step 4 + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=11 + - title: 2022 IA1040 Income Tax Return instructions, Step 4 + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=10 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/elderly_age.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/elderly_age.yaml new file mode 100644 index 00000000000..96467c4e206 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/elderly_age.yaml @@ -0,0 +1,17 @@ +description: Iowa considers tax units with head or spouse this age or older to be elderly in exempt from income taxation calculations. +values: + 2021-01-01: 65 + +metadata: + label: Iowa elderly age threshold used in tax exemption calculations + period: year + unit: year + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 26 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=37 + - title: 2022 IA1040 Iowa Income Tax Return, Line 26 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/other_elderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/other_elderly.yaml new file mode 100644 index 00000000000..bebb975c997 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/other_elderly.yaml @@ -0,0 +1,17 @@ +description: Iowa considers tax units other than singles with modified net income no greater than this limit to be exempt from income taxation. +values: + 2021-01-01: 32_000 + +metadata: + label: Iowa tax exemption income limit for elderly nonsingle tax units + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 26 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=37 + - title: 2022 IA1040 Iowa Income Tax Return, Line 26 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/other_nonelderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/other_nonelderly.yaml new file mode 100644 index 00000000000..4e5f905c8e6 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/other_nonelderly.yaml @@ -0,0 +1,17 @@ +description: Iowa considers tax units other than singles with modified net income no greater than this limit to be exempt from income taxation. +values: + 2021-01-01: 13_500 + +metadata: + label: Iowa tax exemption income limit for nonelderly nonsingle tax units + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 26 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=37 + - title: 2022 IA1040 Iowa Income Tax Return, Line 26 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/single_elderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/single_elderly.yaml new file mode 100644 index 00000000000..2dab94dcbd4 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/single_elderly.yaml @@ -0,0 +1,17 @@ +description: Iowa considers single tax units with modified net income no greater than this limit to be exempt from income taxation. +values: + 2021-01-01: 24_000 + +metadata: + label: Iowa tax exemption income limit for nonelderly single tax units + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 26 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=37 + - title: 2022 IA1040 Iowa Income Tax Return, Line 26 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/single_nonelderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/single_nonelderly.yaml new file mode 100644 index 00000000000..f8b4ec877f2 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_exempt/income_limit/single_nonelderly.yaml @@ -0,0 +1,17 @@ +description: Iowa considers single tax units with modified net income no greater than this limit to be exempt from income taxation. +values: + 2021-01-01: 9_000 + +metadata: + label: Iowa tax exemption income limit for nonelderly single tax units + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 26 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=1 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=37 + - title: 2022 IA1040 Iowa Income Tax Return, Line 26 + 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 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/elderly_age.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/elderly_age.yaml new file mode 100644 index 00000000000..19d20ad4d32 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/elderly_age.yaml @@ -0,0 +1,17 @@ +description: Iowa considers single tax units with head this age or older to be elderly in tax reduction worksheet calculations. +values: + 2021-01-01: 65 + +metadata: + label: Iowa elderly age threshold used in tax reduction worksheet + period: year + unit: year + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 47 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=60 + - title: 2022 IA1040 Iowa Income Tax Return, Line 47 + href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=60 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/threshold/elderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/threshold/elderly.yaml new file mode 100644 index 00000000000..ba062231c43 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/threshold/elderly.yaml @@ -0,0 +1,17 @@ +description: Iowa has a tax reduction worksheet for single tax units that uses this modified income threshold for the elderly. +values: + 2021-01-01: 24_000 + +metadata: + label: Iowa tax reduction worksheet modified income threshold for elderly + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 47 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=60 + - title: 2022 IA1040 Iowa Income Tax Return, Line 47 + href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=60 diff --git a/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/threshold/nonelderly.yaml b/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/threshold/nonelderly.yaml new file mode 100644 index 00000000000..8380d979edb --- /dev/null +++ b/policyengine_us/parameters/gov/states/ia/tax/income/tax_reduction/threshold/nonelderly.yaml @@ -0,0 +1,17 @@ +description: Iowa has a tax reduction worksheet for single tax units that uses this modified income threshold for the nonelderly. +values: + 2021-01-01: 9_000 + +metadata: + label: Iowa tax reduction worksheet modified income threshold for nonelderly + period: year + unit: currency-USD + reference: + - title: 2021 IA1040 Iowa Income Tax Return, Line 47 + href: https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2 + - title: 2021 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=60 + - title: 2022 IA1040 Iowa Income Tax Return, Line 47 + href: https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2 + - title: 2022 IA1040 Income Tax Return instructions + href: https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=60 diff --git a/policyengine_us/parameters/gov/states/ky/tax/income/rate.yaml b/policyengine_us/parameters/gov/states/ky/tax/income/rate.yaml new file mode 100644 index 00000000000..57b0288c4d1 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ky/tax/income/rate.yaml @@ -0,0 +1,15 @@ +description: Kentucky provides this flat personal income tax rate. +values: + 2022-01-01: 0.05 + 2023-01-01: 0.045 +metadata: + unit: /1 + label: Kentucky income tax rate + reference: + - title: Kentucky Department of Revenue + href: https://revenue.ky.gov/News/Pages/DOR-Announces-Updates-to-Individual-Income-Tax-for-2023-Tax-Year.aspx + - title: Kentucky Individual Income Tax Return Residents Only - From 740 + href: https://revenue.ky.gov/Forms/Form%20740%205-9-23.pdf + - title: Kentucky Estimated Tax Voucher Instructions + href: https://revenue.ky.gov/Forms/740-ES%20Instructions%203-21-23.pdf + diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml new file mode 100644 index 00000000000..d0a9934a2c7 --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml @@ -0,0 +1,59 @@ +description: Montana taxes head of household filers at this rate structure. +metadata: + type: marginal_rate + threshold_unit: currency-USD + rate_unit: /1 + label: Montana income tax rates for head of household filers + reference: + - title: Montana Code Annotated 2021 Title 15, Chapter 30, Part 21, 15-30-2103 + href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0030/0150-0300-0210-0030.html +# Before 2024 Montana has a consistent tax rate for each filing status +# After 2024 the tax rate depends on the filing status +brackets: + - threshold: + 2021-01-01: 0 + rate: + 2021-01-01: 0.01 + 2024-01-01: 0.047 + - threshold: + 2021-01-01: 2_900 + 2022-01-01: 3_300 + 2024-01-01: 30_750 + rate: + 2021-01-01: 0.02 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 5_100 + 2022-01-01: 5_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.03 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 7_800 + 2022-01-01: 8_900 + 2024-01-01: .inf + rate: + 2021-01-01: 0.04 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 10_500 + 2022-01-01: 12_000 + 2024-01-01: .inf + rate: + 2021-01-01: 0.05 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 13_500 + 2022-01-01: 15_400 + 2024-01-01: .inf + rate: + 2021-01-01: 0.06 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 17_400 + 2022-01-01: 19_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.0675 + 2024-01-01: 0.065 diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/joint.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/joint.yaml new file mode 100644 index 00000000000..d6f1668ff68 --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/joint.yaml @@ -0,0 +1,59 @@ +description: Montana taxes joint filers at this rate structure. +metadata: + type: marginal_rate + threshold_unit: currency-USD + rate_unit: /1 + label: Montana income tax rate joint filers + reference: + - title: Montana Code Annotated 2021 Title 15, Chapter 30, Part 21, 15-30-2103 + href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0030/0150-0300-0210-0030.html +# Before 2024 Montana has a consistent tax rate for each filing status +# After 2024 the tax rate depends on the filing status +brackets: + - threshold: + 2021-01-01: 0 + rate: + 2021-01-01: 0.01 + 2024-01-01: 0.047 + - threshold: + 2021-01-01: 2_900 + 2022-01-01: 3_300 + 2024-01-01: 41_000 + rate: + 2021-01-01: 0.02 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 5_100 + 2022-01-01: 5_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.03 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 7_800 + 2022-01-01: 8_900 + 2024-01-01: .inf + rate: + 2021-01-01: 0.04 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 10_500 + 2022-01-01: 12_000 + 2024-01-01: .inf + rate: + 2021-01-01: 0.05 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 13_500 + 2022-01-01: 15_400 + 2024-01-01: .inf + rate: + 2021-01-01: 0.06 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 17_400 + 2022-01-01: 19_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.0675 + 2024-01-01: 0.065 diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/separate.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/separate.yaml new file mode 100644 index 00000000000..015ed621762 --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/separate.yaml @@ -0,0 +1,59 @@ +description: Montana taxes separate filers at this rate structure. +metadata: + type: marginal_rate + threshold_unit: currency-USD + rate_unit: /1 + label: Montana income tax rate separate filers + reference: + - title: Montana Code Annotated 2021 Title 15, Chapter 30, Part 21, 15-30-2103 + href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0030/0150-0300-0210-0030.html +# Before 2024 Montana has a consistent tax rate for each filing status +# After 2024 the tax rate depends on the filing status +brackets: + - threshold: + 2021-01-01: 0 + rate: + 2021-01-01: 0.01 + 2024-01-01: 0.047 + - threshold: + 2021-01-01: 2_900 + 2022-01-01: 3_300 + 2024-01-01: 20_500 + rate: + 2021-01-01: 0.02 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 5_100 + 2022-01-01: 5_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.03 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 7_800 + 2022-01-01: 8_900 + 2024-01-01: .inf + rate: + 2021-01-01: 0.04 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 10_500 + 2022-01-01: 12_000 + 2024-01-01: .inf + rate: + 2021-01-01: 0.05 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 13_500 + 2022-01-01: 15_400 + 2024-01-01: .inf + rate: + 2021-01-01: 0.06 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 17_400 + 2022-01-01: 19_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.0675 + 2024-01-01: 0.065 diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/single.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/single.yaml new file mode 100644 index 00000000000..03dd376a1e5 --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/single.yaml @@ -0,0 +1,59 @@ +description: Montana taxes single filers at this rate structure. +metadata: + type: marginal_rate + threshold_unit: currency-USD + rate_unit: /1 + label: Montana income tax rate single filers + reference: + - title: Montana Code Annotated 2021 Title 15, Chapter 30, Part 21, 15-30-2103 + href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0030/0150-0300-0210-0030.html +# Before 2024 Montana has a consistent tax rate for each filing status +# After 2024 the tax rate depends on the filing status +brackets: + - threshold: + 2021-01-01: 0 + rate: + 2021-01-01: 0.01 + 2024-01-01: 0.047 + - threshold: + 2021-01-01: 2_900 + 2022-01-01: 3_300 + 2024-01-01: 20_500 + rate: + 2021-01-01: 0.02 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 5_100 + 2022-01-01: 5_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.03 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 7_800 + 2022-01-01: 8_900 + 2024-01-01: .inf + rate: + 2021-01-01: 0.04 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 10_500 + 2022-01-01: 12_000 + 2024-01-01: .inf + rate: + 2021-01-01: 0.05 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 13_500 + 2022-01-01: 15_400 + 2024-01-01: .inf + rate: + 2021-01-01: 0.06 + 2024-01-01: 0.065 + - threshold: + 2021-01-01: 17_400 + 2022-01-01: 19_800 + 2024-01-01: .inf + rate: + 2021-01-01: 0.0675 + 2024-01-01: 0.065 diff --git a/policyengine_us/parameters/gov/states/nc/tax/income/rate.yaml b/policyengine_us/parameters/gov/states/nc/tax/income/rate.yaml new file mode 100644 index 00000000000..7ef24071bac --- /dev/null +++ b/policyengine_us/parameters/gov/states/nc/tax/income/rate.yaml @@ -0,0 +1,15 @@ +description: North Carolina taxes the personal income at this rate. +values: + 2019-01-01: 0.0525 + 2023-01-01: 0.0475 + 2024-01-01: 0.046 + 2025-01-01: 0.045 + 2026-01-01: 0.0425 + 2027-01-01: 0.0399 +metadata: + unit: /1 + period: year + label: North Carolina income tax rate + reference: + - title: North Carolina Department of Revenue - Tax Rate Schedules + href: https://www.ncdor.gov/taxes-forms/tax-rate-schedules#:~:text=For%20Tax%20Year%202023%2C%20the,is%205.25%25%20(0.0525) diff --git a/policyengine_us/parameters/gov/states/nh/tax/income/main.yaml b/policyengine_us/parameters/gov/states/nh/tax/income/main.yaml new file mode 100644 index 00000000000..469e041a0d5 --- /dev/null +++ b/policyengine_us/parameters/gov/states/nh/tax/income/main.yaml @@ -0,0 +1,16 @@ +description: New Hampshire taxes bonds, notes, and money at interest at this rate. +values: + 2022-01-01: 0.05 + 2023-01-01: 0.04 + 2024-01-01: 0.03 + 2025-01-01: 0.02 + 2026-01-01: 0.01 +metadata: + unit: /1 + period: year + label: New Hampshire tax rate + reference: + - title: New Hampshire Statutes - TITLE V - CHAPTER 77 - Section 77:1 + href: https://www.gencourt.state.nh.us/rsa/html/V/77/77-1.htm + - title: New Hampshire Statutes - TITLE V - CHAPTER 77 - Section 77:4 + href: https://www.gencourt.state.nh.us/rsa/html/V/77/77-4.htm diff --git a/policyengine_us/parameters/gov/states/nj/tax/income/credits/property_tax/senior_qualifying_age.yaml b/policyengine_us/parameters/gov/states/nj/tax/income/credits/property_tax/senior_qualifying_age.yaml new file mode 100644 index 00000000000..7e76dea3223 --- /dev/null +++ b/policyengine_us/parameters/gov/states/nj/tax/income/credits/property_tax/senior_qualifying_age.yaml @@ -0,0 +1,9 @@ +description: Filers at or above this age are considered seniors for the NJ property tax credit. +metadata: + unit: year + label: NJ property tax credit senior age + reference: + - title: 2022 New Jersey Revised Statutes Title 54A - New Jersey Gross Income Tax Act Section 54A:3A-20 - Credit instead of deduction + href: https://law.justia.com/codes/new-jersey/2022/title-54a/section-54a-3a-20/ +values: + 2022-01-01: 65 diff --git a/policyengine_us/tests/policy/baseline/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.yaml b/policyengine_us/tests/policy/baseline/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.yaml index 9295eb5b368..57e9fadf95c 100644 --- a/policyengine_us/tests/policy/baseline/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.yaml +++ b/policyengine_us/tests/policy/baseline/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.yaml @@ -20,3 +20,10 @@ in_nyc: true output: nyc_cdcc_age_restricted_expenses: 4_000 + +- name: If no childcare expenses, should be zero. + period: 2022 + input: + in_nyc: true + output: + nyc_cdcc_age_restricted_expenses: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/co/ssa/state_supplement/co_state_supplement.yaml b/policyengine_us/tests/policy/baseline/gov/states/co/ssa/state_supplement/co_state_supplement.yaml new file mode 100644 index 00000000000..f424ce881e3 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/co/ssa/state_supplement/co_state_supplement.yaml @@ -0,0 +1,26 @@ +- name: Countable Income + period: 2023 + input: + co_state_supplement_eligible: true + ssi_countable_income: 1_000 + ssi: 0 + output: + co_state_supplement: 9_968 + +- name: Has some SSI + period: 2023 + input: + co_state_supplement_eligible: true + ssi_countable_income: 0 + ssi: 2_000 + output: + co_state_supplement: 8_968 + +- name: More total income than grant standard + period: 2023 + input: + co_state_supplement_eligible: true + ssi_countable_income: 6_000 + ssi: 6_000 + output: + co_state_supplement: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/co/ssa/state_supplement/co_state_supplement_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/co/ssa/state_supplement/co_state_supplement_eligible.yaml new file mode 100644 index 00000000000..b32415c1a6c --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/co/ssa/state_supplement/co_state_supplement_eligible.yaml @@ -0,0 +1,54 @@ +- name: Ineligible senior + period: 2023 + input: + is_ssi_eligible_individual: false + age: 60 + is_blind: true + is_ssi_disabled: true + state_code: CO + output: + co_state_supplement_eligible: false + +- name: Not blind or disabled + period: 2023 + input: + is_ssi_eligible_individual: false + age: 59 + is_blind: false + is_ssi_disabled: false + state_code: CO + output: + co_state_supplement_eligible: false + +- name: Not SSI eligible + period: 2023 + input: + is_ssi_eligible_individual: false + age: 19 + is_blind: true + is_ssi_disabled: true + state_code: CO + output: + co_state_supplement_eligible: false + +- name: SSI eligible and blind + period: 2023 + input: + is_ssi_eligible_individual: true + age: 59 + is_blind: true + is_ssi_disabled: false + state_code: CO + output: + co_state_supplement_eligible: true + +- name: SSI eligible and disabled + period: 2023 + input: + is_ssi_eligible_individual: true + age: 0 + is_blind: false + is_ssi_disabled: true + state_code: CO + output: + co_state_supplement_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_indiv.yaml new file mode 100644 index 00000000000..940c4185804 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_indiv.yaml @@ -0,0 +1,20 @@ +- name: IA alternate tax indiv unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + ia_net_income: 6_000 + person2: + is_tax_unit_spouse: true + ia_net_income: 3_000 + tax_units: + tax_unit: + members: [person1, person2] + ia_alternate_tax_unit: 300 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_alternate_tax_indiv: [200, 100] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_joint.yaml new file mode 100644 index 00000000000..c0ba45976fb --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_joint.yaml @@ -0,0 +1,20 @@ +- name: IA alternate tax joint unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + ia_net_income: 6_000 + person2: + is_tax_unit_spouse: true + ia_net_income: 3_000 + tax_units: + tax_unit: + members: [person1, person2] + ia_alternate_tax_unit: 300 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_alternate_tax_joint: [300, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_unit.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_unit.yaml new file mode 100644 index 00000000000..ddaa54c3772 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_alternate_tax_unit.yaml @@ -0,0 +1,24 @@ +- name: IA alternate tax for tax unit unit test 1 + absolute_error_margin: 0.01 + period: 2021 + input: + filing_status: JOINT + is_tax_unit_head: true + age: 64 + ia_modified_income: 13_400 + state_code: IA + output: + # ia_regular_tax: 0 + ia_alternate_tax_unit: 0 # alternate deduction exceeds modified income + +- name: IA alternate tax for tax unit unit test 2 + absolute_error_margin: 0.01 + period: 2022 + input: + filing_status: JOINT + is_tax_unit_head: true + age: 65 + ia_modified_income: 33_000 + state_code: IA + output: + ia_alternate_tax_unit: 85.30 # = (33_000 - 32_000) * 0.0853 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_amt_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_amt_indiv.yaml new file mode 100644 index 00000000000..b2ae567c030 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_amt_indiv.yaml @@ -0,0 +1,13 @@ +- name: IA AMT indiv unit test 1 + absolute_error_margin: 0.01 + period: 2021 + input: + filing_status: JOINT + ia_standard_deduction_indiv: 5_240 + ia_itemized_deductions_indiv: 40_000 + real_estate_taxes: 20_000 + ia_taxable_income_indiv: 210_000 + ia_base_tax_indiv: 10_000 + state_code: IA + output: # from hand calculation following IA 6251 form + ia_amt_indiv: 4_720 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_amt_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_amt_joint.yaml new file mode 100644 index 00000000000..4d9e0cb405e --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_amt_joint.yaml @@ -0,0 +1,13 @@ +- name: IA AMT joint unit test 1 + absolute_error_margin: 0.01 + period: 2021 + input: + filing_status: JOINT + ia_standard_deduction_joint: 5_240 + ia_itemized_deductions_joint: 40_000 + real_estate_taxes: 20_000 + ia_taxable_income_joint: 210_000 + ia_base_tax_joint: 10_000 + state_code: IA + output: # from hand calculation following IA 6251 form + ia_amt_joint: 3_760 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_base_tax_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_base_tax_indiv.yaml new file mode 100644 index 00000000000..7e927d0573e --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_base_tax_indiv.yaml @@ -0,0 +1,18 @@ +- name: IA base tax indiv unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + ia_regular_tax_indiv: 600 + ia_alternate_tax_indiv: 700 + person2: + is_tax_unit_spouse: true + ia_regular_tax_indiv: 500 + ia_alternate_tax_indiv: 400 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_base_tax_indiv: [600, 400] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_base_tax_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_base_tax_joint.yaml new file mode 100644 index 00000000000..56e17f3982d --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_base_tax_joint.yaml @@ -0,0 +1,17 @@ +- name: IA base tax joint unit test 1 + period: 2021 + input: + ia_regular_tax_joint: 600 + ia_alternate_tax_joint: 700 + state_code: IA + output: + ia_base_tax_joint: 600 + +- name: IA base tax joint unit test 2 + period: 2022 + input: + ia_regular_tax_joint: 800 + ia_alternate_tax_joint: 700 + state_code: IA + output: + ia_base_tax_joint: 700 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_basic_deduction_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_basic_deduction_indiv.yaml new file mode 100644 index 00000000000..1ab281e4441 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_basic_deduction_indiv.yaml @@ -0,0 +1,17 @@ +- name: IA basic deduction indiv unit test 1 + period: 2021 + input: + ia_standard_deduction_indiv: 10_000 + ia_itemized_deductions_indiv: 9_000 + state_code: IA + output: + ia_basic_deduction_indiv: 10_000 + +- name: IA basic deduction indiv unit test 2 + period: 2022 + input: + ia_standard_deduction_indiv: 10_000 + ia_itemized_deductions_indiv: 11_000 + state_code: IA + output: + ia_basic_deduction_indiv: 11_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_basic_deduction_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_basic_deduction_joint.yaml new file mode 100644 index 00000000000..5549bea651b --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_basic_deduction_joint.yaml @@ -0,0 +1,17 @@ +- name: IA basic deduction joint unit test 1 + period: 2021 + input: + ia_standard_deduction_joint: 10_000 + ia_itemized_deductions_joint: 9_000 + state_code: IA + output: + ia_basic_deduction_joint: 10_000 + +- name: IA basic deduction joint unit test 2 + period: 2022 + input: + ia_standard_deduction_joint: 10_000 + ia_itemized_deductions_joint: 11_000 + state_code: IA + output: + ia_basic_deduction_joint: 11_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_cdcc.yaml new file mode 100644 index 00000000000..c6852a56532 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_cdcc.yaml @@ -0,0 +1,26 @@ +- name: IA cdcc unit test 1 + period: 2021 + input: + cdcc: 1_000 + ia_net_income: 9_999.99 + state_code: IA + output: + ia_cdcc: 750 + +- name: IA cdcc unit test 2 + period: 2022 + input: + cdcc: 1_000 + ia_net_income: 40_000 + state_code: IA + output: + ia_cdcc: 300 + +- name: IA cdcc unit test 3 + period: 2022 + input: + cdcc: 1_000 + ia_net_income: 90_000 + state_code: IA + output: + ia_cdcc: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_eitc.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_eitc.yaml new file mode 100644 index 00000000000..a1d774e2ddf --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_eitc.yaml @@ -0,0 +1,7 @@ +- name: IA eitc unit test 1 + period: 2021 + input: + earned_income_tax_credit: 1_000 + state_code: IA + output: + ia_eitc: 150 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_exemption_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_exemption_credit.yaml new file mode 100644 index 00000000000..11f5529f83f --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_exemption_credit.yaml @@ -0,0 +1,49 @@ +- name: IA exemption credit unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 65 + person2: + age: 10 + is_blind: true + spm_units: + spm_unit: + members: [person1, person2] + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_exemption_credit: 100 # = 40 + 20 + 40 + +- name: IA exemption credit unit test 2 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + age: 65 + person2: + is_tax_unit_spouse: true + age: 65 + is_blind: true + person3: + age: 14 + is_blind: true + spm_units: + spm_unit: + members: [person1, person2, person3] + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: IA + output: + ia_exemption_credit: 180 # = 40*2 + 20*3 + 40*1 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_fedtax_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_fedtax_deduction.yaml new file mode 100644 index 00000000000..5c25c224c7d --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_fedtax_deduction.yaml @@ -0,0 +1,57 @@ +- name: IA federal income tax deduction unit test 1 + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 40 + ia_net_income: 300_000 + self_employment_tax: 200 + person2: + is_tax_unit_spouse: true + age: 38 + ia_net_income: 100_000 + person3: + is_tax_unit_dependent: true + age: 17 + tax_units: + tax_unit: + members: [person1, person2, person3] + income_tax_before_refundable_credits: 21_000 + additional_medicare_tax: 1_000 + households: + household: + members: [person1, person2, person3] + state_code: IA + output: + ia_fedtax_deduction: [14_800, 5_000, 0] + +- name: IA federal income tax deduction unit test 2 + absolute_error_margin: 0.01 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + age: 40 + ia_net_income: 300_000 + self_employment_tax: 200 + person2: + is_tax_unit_spouse: true + age: 38 + ia_net_income: 100_000 + person3: + is_tax_unit_dependent: true + age: 17 + tax_units: + tax_unit: + members: [person1, person2, person3] + income_tax_before_refundable_credits: 21_000 + additional_medicare_tax: 1_000 + households: + household: + members: [person1, person2, person3] + state_code: IA + output: + ia_fedtax_deduction: [14_800, 5_000, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_files_separately.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_files_separately.yaml new file mode 100644 index 00000000000..aa34260ffdd --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_files_separately.yaml @@ -0,0 +1,17 @@ +- name: IA files separately unit test 1 + period: 2021 + input: + ia_income_tax_indiv: 200 + ia_income_tax_joint: 300 + state_code: IA + output: + ia_files_separately: true + +- name: IA files separately unit test 2 + period: 2022 + input: + ia_income_tax_indiv: 400 + ia_income_tax_joint: 300 + state_code: IA + output: + ia_files_separately: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_income_tax_before_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_income_tax_before_credits.yaml new file mode 100644 index 00000000000..65ab4788301 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_income_tax_before_credits.yaml @@ -0,0 +1,51 @@ +- name: IA basic tax unit test 1 + period: 2021 + 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: 200 + ia_base_tax_joint: 0 + ia_amt_joint: 0 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_income_tax_before_credits: 1_550 + +- name: IA basic tax unit test 2 + period: 2022 + 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] + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_income_tax_before_credits: 1_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_income_tax_before_refundable_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_income_tax_before_refundable_credits.yaml new file mode 100644 index 00000000000..9418543b4e0 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_income_tax_before_refundable_credits.yaml @@ -0,0 +1,43 @@ +- name: IA income tax before refundable credits unit test 1 + period: 2021 + input: + ia_income_tax_before_credits: 800 + ia_exemption_credit: 200 + ia_is_tax_exempt: false + ia_reduced_tax: 900 + state_code: IA + output: + ia_income_tax_before_refundable_credits: 600 + +- name: IA income tax before refundable credits unit test 2 + period: 2022 + input: + ia_income_tax_before_credits: 100 + ia_exemption_credit: 200 + ia_is_tax_exempt: false + ia_reduced_tax: 300 + state_code: IA + output: + ia_income_tax_before_refundable_credits: 0 + +- name: IA income tax before refundable credits unit test 3 + period: 2021 + input: + ia_income_tax_before_credits: 110 + ia_exemption_credit: 80 + ia_is_tax_exempt: true + ia_reduced_tax: 300 + state_code: IA + output: + ia_income_tax_before_refundable_credits: 0 + +- name: IA income tax before refundable credits unit test 4 + period: 2022 + input: + ia_income_tax_before_credits: 180 + ia_exemption_credit: 80 + ia_is_tax_exempt: false + ia_reduced_tax: 40 + state_code: IA + output: + ia_income_tax_before_refundable_credits: 40 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_integration.yaml new file mode 100644 index 00000000000..5a72284a74b --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_integration.yaml @@ -0,0 +1,184 @@ +- name: Tax unit with taxsimid 4506 in p21.its.csv and p21.ots.csv + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 28 + employment_income: 104_010 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + person2: + is_tax_unit_spouse: true + age: 28 + employment_income: 148_010 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + person3: + age: 11 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + person4: + age: 11 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + person5: + age: 11 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + person6: + age: 16 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5, person6] + snap: 0 # not in TAXSIM35 + tanf: 0 # not in TAXSIM35 + tax_units: + tax_unit: + members: [person1, person2, person3, person4, person5, person6] + premium_tax_credit: 0 # not in TAXSIM35 + households: + household: + members: [person1, person2, person3, person4, person5, person6] + state_code: IA + output: # expected ia_income_tax from patched TAXSIM35 2023-05-05 version + # federal income tax results used by Iowa income tax: + filing_status: JOINT + # federal CTC was fully refundable in 2021, but composition is flawed + non_refundable_ctc: -4_000.00 # a negative credit is nonsensical + refundable_ctc: 1_2000.00 # the correct amount in this case is $8000 + income_tax_before_refundable_credits: 46_502.80 # $4000 too large + # formula for ia_fedtax_deduction works around the above federal CTC flaw + additional_medicare_tax: 18.18 # neither this nor SECA tax part of fedtax + # Iowa income tax results: + ia_net_income: [104_010, 148_010, 0, 0, 0, 0] + # ia_prorate_fraction: [0.41270533 0.58729464, 0, 0, 0, 0] + ia_standard_deduction_indiv: [2130, 2130, 0, 0, 0, 0] + ia_standard_deduction_joint: [5240, 0, 0, 0, 0, 0] + # aggregate IA fedtax is 46_502.80 + -4_000.00 - 18.18 = 42_484.62 + ia_fedtax_deduction: [17_533.63, 24_950.99, 0, 0, 0, 0] + ia_taxable_income_indiv: [84_346.37, 120_929.01, 0, 0, 0, 0] + ia_taxable_income_joint: [204_295.38, 0.00, 0, 0, 0, 0] + ia_regular_tax_indiv: [ 5_184.05, 8_304.55, 0, 0, 0, 0] + ia_regular_tax_joint: [15_415.70, 0.00, 0, 0, 0, 0] + ia_alternate_tax_indiv: [ 8_396.80, 11_948.95, 0, 0, 0, 0] + ia_alternate_tax_joint: [20_345.76, 0.00, 0, 0, 0, 0] + # base tax is minimum of regular tax and alternate tax: + ia_base_tax_indiv: [ 5_184.05, 8_304.55, 0, 0, 0, 0] + ia_base_tax_joint: [15_415.70, 0.00, 0, 0, 0, 0] + # Iowa alternative minimum tax: + ia_amt_indiv: [0, 0, 0, 0, 0, 0] + ia_amt_joint: [0, 0, 0, 0, 0, 0] + # Iowa income tax is sum of base tax and alternative minimum tax: + ia_income_tax_indiv: 13_488.60 # person amounts aggregated for tax unit + ia_income_tax_joint: 15_415.70 # person amounts aggregated for tax unit + # decide whether or not to file separately on Iowa return: + ia_files_separately: true + ia_income_tax_before_credits: 13_488.60 + ia_exemption_credit: 240 # = 6 * 40 + ia_income_tax: 13_248.60 + +- name: Tax unit with taxsimid 37860 in p21.its.csv and p21.ots.csv + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 72 + employment_income: 30_010 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + wic: 0 # not in TAXSIM35 + person2: + is_tax_unit_spouse: true + age: 72 + employment_income: 22_010 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + wic: 0 # not in TAXSIM35 + person3: + age: 16 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + wic: 0 # not in TAXSIM35 + person4: + age: 16 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + wic: 0 # not in TAXSIM35 + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + snap: 0 # not in TAXSIM35 + tanf: 0 # not in TAXSIM35 + tax_units: + tax_unit: + members: [person1, person2, person3, person4] + premium_tax_credit: 0 # not in TAXSIM35 + households: + household: + members: [person1, person2, person3, person4] + state_code: IA + output: # expected ia_income_tax from patched TAXSIM35 2023-05-06 version + ia_income_tax: 1_376.25 + +- name: Tax unit with taxsimid 70540 in p21.its.csv and p21.ots.csv + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 69 + employment_income: 9_010 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + wic: 0 # not in TAXSIM35 + person2: + is_tax_unit_spouse: true + age: 69 + employment_income: 30_010 + ssi: 0 # not in TAXSIM35 + state_supplement: 0 # not in TAXSIM35 + wic: 0 # not in TAXSIM35 + spm_units: + spm_unit: + members: [person1, person2] + snap: 0 # not in TAXSIM35 + tanf: 0 # not in TAXSIM35 + tax_units: + tax_unit: + members: [person1, person2] + premium_tax_credit: 0 # not in TAXSIM35 + households: + household: + members: [person1, person2] + state_code: IA + output: # expected ia_income_tax from patched TAXSIM35 2023-05-06 version + ia_regular_tax_indiv: [ 90.31, 1_117.14] + ia_regular_tax_joint: [1_453.34, 0.00] + ia_alternate_tax_indiv: [ 138.27, 460.54] + ia_alternate_tax_joint: [ 598.81, 0.00] + # base tax is minimum of regular tax and alternate tax: + ia_base_tax_indiv: [ 90.31, 460.54] + ia_base_tax_joint: [598.81, 0.00] + # if sep/jnt decision made at this stage, couple would file separately + # but the IA AMT calculations below reverse that decision + # Iowa alternative minimum tax: + # (cannot yet validate the following ia_amt_indiv results because + # the 2023-0506 patched version of TAXSIM35 incorrectly makes the + # IA sep/jnt filing decision BEFORE applying the AMT to base tax) + ia_amt_indiv: [0, 148.56] # 2023-05-06 TAXSIM35 logic + ia_amt_joint: [0, 0.00] + # Iowa income tax is sum of base tax and alternative minimum tax: + ia_income_tax_indiv: 699.41 # = 90.31 + (460.54 + 148.56) + ia_income_tax_joint: 598.81 # person amounts aggregated for tax unit + # decide whether or not to file separately on Iowa return: + ia_files_separately: false + ia_income_tax_before_credits: 598.81 + ia_exemption_credit: 120 + ia_income_tax: 478.81 # the incorrect TAXSIM35 result is 430.85 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_is_tax_exempt.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_is_tax_exempt.yaml new file mode 100644 index 00000000000..0e8eacbec18 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_is_tax_exempt.yaml @@ -0,0 +1,47 @@ +- name: IA is-tax-exempt unit test 1 + period: 2021 + input: + filing_status: SINGLE + age_head: 60 + ia_net_income: 0 + ia_pension_exclusion: 0 + ia_reportable_social_security: 10_000 + state_code: IA + output: + ia_is_tax_exempt: false + +- name: IA is-tax-exempt unit test 2 + period: 2022 + input: + filing_status: SINGLE + age_head: 70 + ia_net_income: 0 + ia_pension_exclusion: 0 + ia_reportable_social_security: 10_000 + state_code: IA + output: + ia_is_tax_exempt: true + +- name: IA is-tax-exempt unit test 3 + period: 2021 + input: + filing_status: JOINT + age_head: 60 + ia_net_income: 0 + ia_pension_exclusion: 0 + ia_reportable_social_security: 10_000 + state_code: IA + output: + ia_is_tax_exempt: true + +- name: IA is-tax-exempt unit test 4 + period: 2022 + input: + filing_status: JOINT + age_head: 70 + ia_net_income: 10_000 + ia_pension_exclusion: 10_000 + ia_reportable_social_security: 10_000 + state_code: IA + output: + ia_is_tax_exempt: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_indiv.yaml new file mode 100644 index 00000000000..d12afc7a38e --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_indiv.yaml @@ -0,0 +1,23 @@ +- name: IA itemized deductions indiv unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + ia_net_income: 200_000 + real_estate_taxes: 2_000 + person2: + is_tax_unit_spouse: true + ia_net_income: 50_000 + real_estate_taxes: 11_000 + tax_units: + tax_unit: + members: [person1, person2] + interest_deduction: 17_000 + state_and_local_sales_or_income_tax: 8_000 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_itemized_deductions_indiv: [24_000, 6_000] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_joint.yaml new file mode 100644 index 00000000000..189471bf5e7 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_joint.yaml @@ -0,0 +1,23 @@ +- name: IA itemized deductions joint unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + ia_net_income: 200_000 + real_estate_taxes: 2_000 + person2: + is_tax_unit_spouse: true + ia_net_income: 50_000 + real_estate_taxes: 11_000 + tax_units: + tax_unit: + members: [person1, person2] + interest_deduction: 17_000 + state_and_local_sales_or_income_tax: 8_000 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_itemized_deductions_joint: [30_000, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_unit.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_unit.yaml new file mode 100644 index 00000000000..046098b0810 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_itemized_deductions_unit.yaml @@ -0,0 +1,23 @@ +- name: IA unit itemized deductions unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + ia_net_income: 200_000 + real_estate_taxes: 2_000 + person2: + is_tax_unit_spouse: true + ia_net_income: 50_000 + real_estate_taxes: 11_000 + tax_units: + tax_unit: + members: [person1, person2] + interest_deduction: 17_000 + state_and_local_sales_or_income_tax: 8_000 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_itemized_deductions_unit: 30_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_net_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_net_income.yaml new file mode 100644 index 00000000000..8ca38f9ecca --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_net_income.yaml @@ -0,0 +1,55 @@ +- name: IA net income unit test 1 + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 40 + ia_gross_income: 10_000 + ia_income_adjustments: 2_000 + person2: + is_tax_unit_dependent: true + age: 18 + ia_gross_income: 800 + person3: + is_tax_unit_dependent: true + age: 17 + ia_gross_income: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: IA + output: + ia_net_income: [9_400, 0, 0] + +- name: IA net income unit test 2 + absolute_error_margin: 0.01 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + age: 40 + ia_gross_income: 10_000 + ia_income_adjustments: 2_000 + person2: + is_tax_unit_spouse: true + age: 38 + ia_gross_income: 8_000 + person3: + is_tax_unit_dependent: true + age: 17 + ia_gross_income: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: IA + output: + ia_net_income: [8_600, 8_000, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_pension_exclusion.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_pension_exclusion.yaml new file mode 100644 index 00000000000..4e51deb5f20 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_pension_exclusion.yaml @@ -0,0 +1,75 @@ +- name: IA pension exclusion unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 40 + is_permanently_and_totally_disabled: true + taxable_pension_income: 1_000 + person2: + age: 10 + taxable_pension_income: 7_000 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_pension_exclusion: [1_000, 0] + +- name: IA pension exclusion unit test 2 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + age: 54 + is_permanently_and_totally_disabled: true + taxable_pension_income: 1_000 + person2: + is_tax_unit_spouse: true + age: 55 + taxable_pension_income: 7_000 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_pension_exclusion: [1_000, 7_000] + +- name: IA pension exclusion unit test 3 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + age: 54 + taxable_pension_income: 1_000 + person2: + is_tax_unit_spouse: true + age: 55 + taxable_pension_income: 7_000 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_pension_exclusion: [0, 7_000] + +- name: IA pension exclusion unit test 4 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + age: 54 + taxable_pension_income: 1_000 + person2: + age: 54 + taxable_pension_income: 7_000 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_pension_exclusion: [0, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_prorate_fraction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_prorate_fraction.yaml new file mode 100644 index 00000000000..98d68c9fbaf --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_prorate_fraction.yaml @@ -0,0 +1,40 @@ +- name: IA prorate fraction unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 40 + ia_net_income: 200 + person2: + is_tax_unit_spouse: true + age: 40 + ia_net_income: 800 + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_prorate_fraction: [0.2, 0.8] + +- name: If no net income and single, assign entirely to them as head. + period: 2021 + input: + state_code: IA + output: + ia_prorate_fraction: 1 + +- name: If no net income, assign to head. + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + person2: + is_tax_unit_spouse: true + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_prorate_fraction: [1, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_qbi_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_qbi_deduction.yaml new file mode 100644 index 00000000000..53522f1a6c3 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_qbi_deduction.yaml @@ -0,0 +1,15 @@ +- name: IA qualified business income (QBI) deduction unit test 1 + period: 2021 + input: + qbid_amount: 10_000 + state_code: IA + output: + ia_qbi_deduction: 5_000 + +- name: IA qualified business income (QBI) deduction unit test 2 + period: 2022 + input: + qbid_amount: 10_000 + state_code: IA + output: + ia_qbi_deduction: 7_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_reduced_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_reduced_tax.yaml new file mode 100644 index 00000000000..c04019cde63 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_reduced_tax.yaml @@ -0,0 +1,21 @@ +- name: IA reduced tax unit test 1 + period: 2021 + input: + filing_status: SINGLE + is_tax_unit_head: true + age: 64 + ia_modified_income: 9_500 + state_code: IA + output: + ia_reduced_tax: 500 + +- name: IA reduced tax unit test 2 + period: 2021 + input: + filing_status: SINGLE + is_tax_unit_head: true + age: 66 + ia_modified_income: 24_800 + state_code: IA + output: + ia_reduced_tax: 800 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_regular_tax_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_regular_tax_indiv.yaml new file mode 100644 index 00000000000..51d8c72c6ef --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_regular_tax_indiv.yaml @@ -0,0 +1,35 @@ +- name: IA regular tax indiv unit test 1 + absolute_error_margin: 0.5 + period: 2021 + input: + ia_taxable_income_indiv: 95_675 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2021-12/2021TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_indiv: 6_150 + +- name: IA regular tax indiv unit test 2 + absolute_error_margin: 0.5 + period: 2021 + input: + ia_taxable_income_indiv: 110_000 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2021-12/2021TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_indiv: 7_371.92 + +- name: IA regular tax indiv unit test 3 + absolute_error_margin: 0.5 + period: 2022 + input: + ia_taxable_income_indiv: 95_775 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2022-12/TY2022IA1040TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_indiv: 6_079 + +- name: IA regular tax indiv unit test 4 + absolute_error_margin: 0.5 + period: 2022 + input: + ia_taxable_income_indiv: 110_000 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2022-12/TY2022IA1040TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_indiv: 7_292.39 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_regular_tax_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_regular_tax_joint.yaml new file mode 100644 index 00000000000..db8639d1175 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_regular_tax_joint.yaml @@ -0,0 +1,35 @@ +- name: IA regular tax joint unit test 1 + absolute_error_margin: 0.5 + period: 2021 + input: + ia_taxable_income_joint: 95_675 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2021-12/2021TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_joint: 6_150 + +- name: IA regular tax joint unit test 2 + absolute_error_margin: 0.5 + period: 2021 + input: + ia_taxable_income_joint: 110_000 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2021-12/2021TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_joint: 7_371.92 + +- name: IA regular tax joint unit test 3 + absolute_error_margin: 0.5 + period: 2022 + input: + ia_taxable_income_joint: 95_775 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2022-12/TY2022IA1040TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_joint: 6_079 + +- name: IA regular tax joint unit test 4 + absolute_error_margin: 0.5 + period: 2022 + input: + ia_taxable_income_joint: 110_000 + state_code: IA + output: # https://tax.iowa.gov/sites/default/files/2022-12/TY2022IA1040TaxTables%2841026%29.pdf#page=5 + ia_regular_tax_joint: 7_292.39 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_reportable_social_security.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_reportable_social_security.yaml new file mode 100644 index 00000000000..d0b89d39608 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_reportable_social_security.yaml @@ -0,0 +1,51 @@ +- name: IA reportable social security unit test 1 + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + age: 70 + social_security: 24_000 + taxable_interest_income: 38_000 + tax_exempt_interest_income: 2_000 + person2: + is_tax_unit_spouse: true + age: 70 + social_security: 16_000 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: IA + output: + adjusted_gross_income: 57_600 + taxable_social_security: [11_760, 7_840] + ia_reportable_social_security: 4_000 # one-half of (income - deduction) + +- name: IA reportable social security unit test 2 + absolute_error_margin: 0.01 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + age: 70 + social_security: 2_000 + taxable_interest_income: 38_000 + tax_exempt_interest_income: 2_000 + person2: + is_tax_unit_spouse: true + age: 70 + social_security: 1_000 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_reportable_social_security: 1_500 # one-half of gross social security diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_standard_deduction_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_standard_deduction_indiv.yaml new file mode 100644 index 00000000000..2e323a90f50 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_standard_deduction_indiv.yaml @@ -0,0 +1,55 @@ +- name: IA standard deduction indiv unit test 1 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + person2: + is_tax_unit_spouse: true + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_standard_deduction_indiv: [2_130, 2_130] + +- name: IA standard deduction indiv unit test 2 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + households: + household: + members: [person1] + state_code: IA + output: + ia_standard_deduction_indiv: 2_130 + +- name: IA standard deduction indiv unit test 3 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + person2: + is_tax_unit_spouse: true + households: + household: + members: [person1, person2] + state_code: IA + output: + ia_standard_deduction_indiv: [2_210, 2_210] + +- name: IA standard deduction indiv unit test 4 + period: 2022 + input: + people: + person1: + is_tax_unit_head: true + households: + household: + members: [person1] + state_code: IA + output: + ia_standard_deduction_indiv: 2_210 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_standard_deduction_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_standard_deduction_joint.yaml new file mode 100644 index 00000000000..db8add04a97 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_standard_deduction_joint.yaml @@ -0,0 +1,36 @@ +- name: IA standard deduction joint unit test 1 + absolute_error_margin: 0.01 + period: 2021 + input: + filing_status: JOINT + state_code: IA + output: + ia_standard_deduction_joint: 5_240 + +- name: IA standard deduction joint unit test 2 + absolute_error_margin: 0.01 + period: 2021 + input: + filing_status: SINGLE + state_code: IA + output: + ia_standard_deduction_joint: 2_130 + +- name: IA standard deduction joint unit test 3 + absolute_error_margin: 0.01 + period: 2022 + input: + filing_status: JOINT + state_code: IA + output: + ia_standard_deduction_joint: 5_450 + +- name: IA standard deduction joint unit test 4 + absolute_error_margin: 0.01 + period: 2022 + input: + filing_status: HEAD_OF_HOUSEHOLD + state_code: IA + output: + ia_standard_deduction_joint: 5_450 + diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_taxable_income_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_taxable_income_indiv.yaml new file mode 100644 index 00000000000..ea2e57401ad --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_taxable_income_indiv.yaml @@ -0,0 +1,22 @@ +- name: IA taxable income indiv unit test 1 + period: 2021 + input: + ia_net_income: 20_000 + ia_basic_deduction_indiv: 8_000 + ia_basic_deduction_joint: 14_000 + ia_fedtax_deduction: 0 + ia_qbi_deduction: 0 + state_code: IA + output: + ia_taxable_income_indiv: 12_000 + +- name: IA taxable income indiv unit test 2 + period: 2022 + input: + ia_net_income: 12_000 + ia_basic_deduction_indiv: 9_000 + ia_fedtax_deduction: 0 + ia_qbi_deduction: 4_000 + state_code: IA + output: + ia_taxable_income_indiv: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_taxable_income_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_taxable_income_joint.yaml new file mode 100644 index 00000000000..079b680c311 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_taxable_income_joint.yaml @@ -0,0 +1,22 @@ +- name: IA taxable income joint unit test 1 + period: 2021 + input: + ia_net_income: 20_000 + ia_basic_deduction_indiv: 10_000 + ia_basic_deduction_joint: 14_000 + ia_fedtax_deduction: 0 + ia_qbi_deduction: 0 + state_code: IA + output: + ia_taxable_income_joint: 6_000 + +- name: IA taxable income joint unit test 2 + period: 2022 + input: + ia_net_income: 12_000 + ia_basic_deduction_joint: 9_000 + ia_fedtax_deduction: 0 + ia_qbi_deduction: 4_000 + state_code: IA + output: + ia_taxable_income_joint: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/ky_income_tax_before_refundable_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/ky_income_tax_before_refundable_credits.yaml new file mode 100644 index 00000000000..8bc4f75544a --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ky/tax/income/ky_income_tax_before_refundable_credits.yaml @@ -0,0 +1,23 @@ +- name: No income + period: 2023 + input: + ky_taxable_income: 0 + state_code: KY + output: + ky_income_tax_before_refundable_credits: 0 + +- name: 2023 tax rate + period: 2023 + input: + ky_taxable_income: 1_000 + state_code: KY + output: + ky_income_tax_before_refundable_credits: 45 + +- name: 2022 tax rate + period: 2022 + input: + ky_taxable_income: 1_000 + state_code: KY + output: + ky_income_tax_before_refundable_credits: 50 diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.yaml new file mode 100644 index 00000000000..0b143ebb90d --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.yaml @@ -0,0 +1,44 @@ +- name: No income + period: 2021 + input: + filing_status: SINGLE + mt_taxable_income: 0 + state_code: MT + output: + mt_income_tax_before_refundable_credits: 0 + +- name: Temporary rate calculation #((5_000 - 2_900) * 0.02 + 2_900 * 0.01) + period: 2021 + input: + filing_status: SINGLE + mt_taxable_income: 5_000 + state_code: MT + output: + mt_income_tax_before_refundable_credits: 71 + +- name: Progressive rate - Joint filing # 5_000 * 0.047 + period: 2024 + input: + filing_status: JOINT + mt_taxable_income: 5_000 + state_code: MT + output: + mt_income_tax_before_refundable_credits: 235 + +- name: Progressive rate - Single filing # ((25_000 - 20_500) * 0.065 + 20_500 * 0.047) + period: 2025 + input: + filing_status: SINGLE + mt_taxable_income: 25_000 + state_code: MT + output: + mt_income_tax_before_refundable_credits: 1_256 + +- name: Progressive rate - head of household # ((35_000 - 30_750) * 0.065 + 30_750 * 0.047) + period: 2025 + input: + filing_status: HEAD_OF_HOUSEHOLD + mt_taxable_income: 35_000 + state_code: MT + output: + mt_income_tax_before_refundable_credits: 1_721.5 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/nc_income_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/nc_income_tax.yaml new file mode 100644 index 00000000000..d7ce535d88e --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/nc_income_tax.yaml @@ -0,0 +1,17 @@ +- name: Floor at 0 + period: 2023 + input: + nc_income_tax_before_credits: 100 + nc_non_refundable_credits: 300 + state_code: NC + output: + nc_income_tax: 0 + +- name: Calculation + period: 2023 + input: + nc_income_tax_before_credits: 1_000 + nc_non_refundable_credits: 300 + state_code: NC + output: + nc_income_tax: 700 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/nc_income_tax_before_refundable_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/nc_income_tax_before_refundable_credits.yaml new file mode 100644 index 00000000000..dcd3bd3f24e --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/nc_income_tax_before_refundable_credits.yaml @@ -0,0 +1,23 @@ +- name: No income + period: 2023 + input: + nc_taxable_income: 0 + state_code: NC + output: + nc_income_tax_before_credits: 0 + +- name: 1_000 income # 1_000 * 0.0475 + period: 2023 + input: + nc_taxable_income: 1_000 + state_code: NC + output: + nc_income_tax_before_credits: 47.5 + +- name: 1_000 income in 2025 # 1_000 * 0.0475 + period: 2025 + input: + nc_taxable_income: 1_000 + state_code: NC + output: + nc_income_tax_before_credits: 45 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nh/tax/income/nh_income_tax_before_refundable_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/nh/tax/income/nh_income_tax_before_refundable_credits.yaml new file mode 100644 index 00000000000..77887fc1b2f --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/nh/tax/income/nh_income_tax_before_refundable_credits.yaml @@ -0,0 +1,23 @@ +- name: 2023 rate + period: 2023 + input: + state_code: NH + nh_taxable_income: 2_000 + output: + nh_income_tax_before_refundable_credits: 80 + +- name: 2025 rate + period: 2025 + input: + state_code: NH + nh_taxable_income: 2_000 + output: + nh_income_tax_before_refundable_credits: 40 + +- name: No income + period: 2023 + input: + state_code: NH + nh_taxable_income: 0 + output: + nh_income_tax_before_refundable_credits: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml index d9f2d9954e5..7e022f3f892 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/nj_income_tax.yaml @@ -15,3 +15,25 @@ filing_status: JOINT output: nj_income_tax: 0 + +- name: NJ income tax below filing threshold but tax is negative because of refundable credits. + period: 2022 + input: + state_code: NJ + nj_agi: 19_999 + filing_status: JOINT + nj_income_tax_before_refundable_credits: 1_000 + nj_refundable_credits: 1_001 + output: + nj_income_tax: -1 + +- name: NJ income tax above filing threshold so tax is calculated amount minus refundable credits. + period: 2022 + input: + state_code: NJ + nj_agi: 60_000 + filing_status: JOINT + nj_income_tax_before_refundable_credits: 10_000 + nj_refundable_credits: 50 + output: + nj_income_tax: 9_950 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.yaml index 8bb020310ee..af4ddc2bcd9 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.yaml @@ -12,7 +12,7 @@ members: [person1, person2] rents: true nj_homeowners_property_tax: 0 - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true households: household: members: [person1, person2] @@ -34,7 +34,7 @@ members: [person1, person2] rents: true nj_homeowners_property_tax: 0 - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true households: household: members: [person1, person2] @@ -49,7 +49,7 @@ rents: false nj_homeowners_property_tax: 10_000 state_code: NJ - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true output: nj_potential_property_tax_deduction: 10_000 @@ -60,7 +60,7 @@ rents: false nj_homeowners_property_tax: 20_000 state_code: NJ - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true output: nj_potential_property_tax_deduction: 15_000 @@ -71,6 +71,6 @@ rents: false nj_homeowners_property_tax: 20_000 state_code: NJ - nj_property_tax_deduction_or_credit_eligible: false + nj_property_tax_deduction_eligible: false output: nj_potential_property_tax_deduction: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.yaml index 9b159c4f9e3..e110f2538f9 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.yaml @@ -2,7 +2,7 @@ period: 2022 absolute_error_margin: 0 input: - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_credit_eligible: true nj_taking_property_tax_deduction: false state_code: NJ output: @@ -12,8 +12,20 @@ period: 2022 absolute_error_margin: 0 input: - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_credit_eligible: true nj_taking_property_tax_deduction: true state_code: NJ output: nj_property_tax_credit: 0 + +- name: NJ property tax credit is $25 if eligible, not taking deduction, and filing separate but maintain same home. + period: 2022 + absolute_error_margin: 0 + input: + nj_property_tax_credit_eligible: true + nj_taking_property_tax_deduction: false + filing_status: SEPARATE + cohabitating_spouses: true + state_code: NJ + output: + nj_property_tax_credit: 25 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_credit_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_credit_eligible.yaml new file mode 100644 index 00000000000..f049149a84c --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_credit_eligible.yaml @@ -0,0 +1,77 @@ +- name: Ineligible for property tax deduction and not 65+ or blind/disabled, so ineligible for credit. + period: 2022 + absolute_error_margin: 0 + input: + nj_property_tax_deduction_eligible: false + age_head: 64 + age_spouse: 64 + blind_head: false + blind_spouse: false + disabled_head: false + disabled_spouse: false + state_code: NJ + output: + nj_property_tax_credit_eligible: false + +- name: Eligible for property tax deduction, therefore eligible for credit. + period: 2022 + absolute_error_margin: 0 + input: + nj_property_tax_deduction_eligible: true + age_head: 64 + age_spouse: 64 + blind_head: false + blind_spouse: false + disabled_head: false + disabled_spouse: false + state_code: NJ + output: + nj_property_tax_credit_eligible: true + +- name: Ineligible for property tax deduction but above 65 and paid property taxes, therefore eligible for credit. + period: 2022 + absolute_error_margin: 0 + input: + nj_property_tax_deduction_eligible: false + nj_homeowners_property_tax: 100 + age_head: 66 + age_spouse: 64 + blind_head: false + blind_spouse: false + disabled_head: false + disabled_spouse: false + state_code: NJ + output: + nj_property_tax_credit_eligible: true + +- name: Ineligible for property tax deduction but spouse is blind and paid property taxes, therefore eligible for credit. + period: 2022 + absolute_error_margin: 0 + input: + nj_property_tax_deduction_eligible: false + nj_homeowners_property_tax: 100 + age_head: 64 + age_spouse: 64 + blind_head: false + blind_spouse: false + disabled_head: false + disabled_spouse: true + state_code: NJ + output: + nj_property_tax_credit_eligible: true + +- name: Ineligible for property tax deduction but above 65 but did not pay property taxes, therefore ineligible for credit. + period: 2022 + absolute_error_margin: 0 + input: + nj_property_tax_deduction_eligible: false + nj_homeowners_property_tax: 0 + age_head: 66 + age_spouse: 64 + blind_head: false + blind_spouse: false + disabled_head: false + disabled_spouse: false + state_code: NJ + output: + nj_property_tax_credit_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_or_credit_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_eligible.yaml similarity index 83% rename from policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_or_credit_eligible.yaml rename to policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_eligible.yaml index 3d4d8cede5f..34e2c9e0c36 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_or_credit_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_eligible.yaml @@ -8,7 +8,7 @@ rents: true state_code: NJ output: - nj_property_tax_deduction_or_credit_eligible: false + nj_property_tax_deduction_eligible: false - name: Ineligible for property tax deduction or credit if income is below filing status-specific threshold. period: 2022 @@ -20,7 +20,7 @@ rents: true state_code: NJ output: - nj_property_tax_deduction_or_credit_eligible: false + nj_property_tax_deduction_eligible: false - name: Income is above filing status-specific threshold and paid homeowner's property tax. period: 2022 @@ -32,7 +32,7 @@ rents: false state_code: NJ output: - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true - name: Income is above filing status-specific threshold and paid nonzero rent. period: 2022 @@ -44,4 +44,4 @@ rents: true state_code: NJ output: - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.yaml index 4332c3f049d..5615c00bc86 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.yaml @@ -1,8 +1,8 @@ -- name: Default should be false if not eligible for property tax deduction or credit. +- name: Default should be false if not eligible for property tax deduction. period: 2022 absolute_error_margin: 0 input: - nj_property_tax_deduction_or_credit_eligible: false + nj_property_tax_deduction_eligible: false nj_potential_property_tax_deduction: 15_000 nj_taxable_income_before_property_tax_deduction: 100_000 filing_status: JOINT @@ -14,7 +14,7 @@ period: 2022 absolute_error_margin: 0 input: - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true nj_potential_property_tax_deduction: 2_858 nj_taxable_income_before_property_tax_deduction: 25_000 filing_status: SINGLE @@ -26,7 +26,7 @@ period: 2022 absolute_error_margin: 0 input: - nj_property_tax_deduction_or_credit_eligible: true + nj_property_tax_deduction_eligible: true nj_potential_property_tax_deduction: 2_856 nj_taxable_income_before_property_tax_deduction: 25_000 filing_status: SINGLE diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.py b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.py index eba70319bd3..f0ed68ecbc6 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.py @@ -25,11 +25,7 @@ def formula(tax_unit, period, parameters): "qualified_business_income_deduction", ] ] - filing_status = tax_unit("filing_status", period) - salt_cap = ded.itemized.salt_and_real_estate.cap[filing_status] - itemized_deductions = ( - add(tax_unit, period, deductions_if_itemizing) + salt_cap - ) + itemized_deductions = add(tax_unit, period, deductions_if_itemizing) # Ignore QBID here, it requires SALT. deductions_if_not_itemizing = tax_unit("standard_deduction", period) diff --git a/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.py b/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.py index 92149122915..7a9a1079250 100644 --- a/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.py +++ b/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_age_restricted_expenses.py @@ -23,4 +23,7 @@ def formula(tax_unit, period, parameters): tax_unit_childcare_expenses = tax_unit( "tax_unit_childcare_expenses", period ) - return qualifying_children * tax_unit_childcare_expenses / children + qualifying_child_share = where( + children > 0, qualifying_children / children, 0 + ) + return tax_unit_childcare_expenses * qualifying_child_share diff --git a/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_applicable_percentage.py b/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_applicable_percentage.py index a62c2abc91c..2bec01f1e12 100644 --- a/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_applicable_percentage.py +++ b/policyengine_us/variables/gov/local/ny/nyc/tax/income/credits/cdcc/nyc_cdcc_applicable_percentage.py @@ -26,6 +26,4 @@ def formula(tax_unit, period, parameters): excess = max_(income - p.phaseout_start, 0) capped_excess = min_(excess, phase_out_width) percent_excess = capped_excess / phase_out_width - applicable_percentage = p.max_rate * (1 - percent_excess) - - return applicable_percentage + return p.max_rate * (1 - percent_excess) diff --git a/policyengine_us/variables/gov/states/co/ssa/state_suplement/co_state_supplement.py b/policyengine_us/variables/gov/states/co/ssa/state_suplement/co_state_supplement.py new file mode 100644 index 00000000000..a80592332d4 --- /dev/null +++ b/policyengine_us/variables/gov/states/co/ssa/state_suplement/co_state_supplement.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class co_state_supplement(Variable): + value_type = float + entity = Person + label = "Colorado State Supplement" + definition_period = YEAR + defined_for = "co_state_supplement_eligible" + + def formula(person, period, parameters): + income = person("ssi_countable_income", period) + ssi = person("ssi", period) + total_countable_income = ssi + income + p = parameters(period).gov.states.co.ssa.state_supplement + grant_standard = p.grant_standard * MONTHS_IN_YEAR + return max_(0, grant_standard - total_countable_income) diff --git a/policyengine_us/variables/gov/states/co/ssa/state_suplement/co_state_supplement_eligible.py b/policyengine_us/variables/gov/states/co/ssa/state_suplement/co_state_supplement_eligible.py new file mode 100644 index 00000000000..e99dcf6b761 --- /dev/null +++ b/policyengine_us/variables/gov/states/co/ssa/state_suplement/co_state_supplement_eligible.py @@ -0,0 +1,19 @@ +from policyengine_us.model_api import * + + +class co_state_supplement_eligible(Variable): + value_type = bool + entity = Person + label = "Colorado State Supplement Eligible" + definition_period = YEAR + defined_for = StateCode.CO + + def formula(person, period, parameters): + ssi_eligible = person("is_ssi_eligible_individual", period) + is_disabled = person("is_ssi_disabled", period) + is_blind = person("is_blind", period) + disabled_or_blind = is_disabled | is_blind + age = person("age", period) + p = parameters(period).gov.states.co.ssa.state_supplement + in_age_range = p.age_range.calc(age) + return disabled_or_blind & ssi_eligible & in_age_range diff --git a/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_cdcc.py b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_cdcc.py new file mode 100644 index 00000000000..620c167d8e5 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_cdcc.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class ia_cdcc(Variable): + value_type = float + entity = TaxUnit + label = "Iowa child/dependent care credit" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=86" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=86" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + federal_cdcc = tax_unit("cdcc", period) + netinc = add(tax_unit, period, ["ia_net_income"]) + p = parameters(period).gov.states.ia.tax.income + return federal_cdcc * p.credits.child_care.fraction.calc(netinc) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_eitc.py b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_eitc.py new file mode 100644 index 00000000000..d3e8d694a09 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_eitc.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_eitc(Variable): + value_type = float + entity = TaxUnit + label = "Iowa earned income tax credit" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf#page=2" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=87" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf#page=2" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=87" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + federal_eitc = tax_unit("earned_income_tax_credit", period) + p = parameters(period).gov.states.ia.tax.income + return federal_eitc * p.credits.earned_income.fraction diff --git a/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_exemption_credit.py b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_exemption_credit.py new file mode 100644 index 00000000000..0a6dad8b0a9 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_exemption_credit.py @@ -0,0 +1,33 @@ +from policyengine_us.model_api import * + + +class ia_exemption_credit(Variable): + value_type = float + entity = TaxUnit + label = "Iowa exemption credit" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2021-12/IA6251%2841131%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/IA6251%2841131%29.pdf" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + adult_count = tax_unit("num", period) + dependent_count = tax_unit("tax_unit_dependents", period) + # count additional exemptions based on being elderly and/or blind + p = parameters(period).gov.states.ia.tax.income + exemption = p.credits.exemption + elder_head = tax_unit("age_head", period) >= exemption.elderly_age + elder_spouse = tax_unit("age_spouse", period) >= exemption.elderly_age + elder_count = elder_head.astype(int) + elder_spouse.astype(int) + blind_head = tax_unit("blind_head", period) + blind_spouse = tax_unit("blind_spouse", period) + blind_count = blind_head.astype(int) + blind_spouse.astype(int) + additional_count = elder_count + blind_count + return ( + adult_count * exemption.personal + + additional_count * exemption.additional + + dependent_count * exemption.dependent + ) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_nonrefundable_credits.py b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_nonrefundable_credits.py new file mode 100644 index 00000000000..bcb6ba4f4e5 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_nonrefundable_credits.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class ia_nonrefundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Iowa nonrefundable income tax credits" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + adds = "gov.states.ia.tax.income.credits.nonrefundable" diff --git a/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_refundable_credits.py b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_refundable_credits.py new file mode 100644 index 00000000000..616041b4896 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/credits/ia_refundable_credits.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class ia_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Iowa refundable income tax credits" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + adds = "gov.states.ia.tax.income.credits.refundable" diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_basic_deduction_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_basic_deduction_indiv.py new file mode 100644 index 00000000000..c2adfd7fe9e --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_basic_deduction_indiv.py @@ -0,0 +1,28 @@ +from policyengine_us.model_api import * + + +class ia_basic_deduction_indiv(Variable): + value_type = float + entity = Person + label = "Iowa deduction of either standard or itemized deductions when married couples file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + """ + FROM THE 2021 INSTRUCTIONS (PAGE 46): + You may itemize deductions or claim the Iowa standard deduction, + whichever is larger. You may itemize deductions on your Iowa return + even if you did not itemize deductions on your federal return. + """ + return max_( + person("ia_standard_deduction_indiv", period), + person("ia_itemized_deductions_indiv", period), + ) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_basic_deduction_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_basic_deduction_joint.py new file mode 100644 index 00000000000..2ebbbec1b0b --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_basic_deduction_joint.py @@ -0,0 +1,28 @@ +from policyengine_us.model_api import * + + +class ia_basic_deduction_joint(Variable): + value_type = float + entity = Person + label = "Iowa deduction of either standard or itemized deductions when married couples file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + """ + FROM THE 2021 INSTRUCTIONS (PAGE 46): + You may itemize deductions or claim the Iowa standard deduction, + whichever is larger. You may itemize deductions on your Iowa return + even if you did not itemize deductions on your federal return. + """ + return max_( + person("ia_standard_deduction_joint", period), + person("ia_itemized_deductions_joint", period), + ) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_fedtax_deduction.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_fedtax_deduction.py new file mode 100644 index 00000000000..0d0d139b02b --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_fedtax_deduction.py @@ -0,0 +1,43 @@ +from policyengine_us.model_api import * + + +class ia_fedtax_deduction(Variable): + value_type = float + entity = Person + label = "Iowa deduction for selected components of federal income tax" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=41" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=41" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + # Iowa allows a deduction of federal income taxes from Iowa net + # income, but federal payroll taxes (FICA and SECA and Additional + # Medicare) cannot be used to reduced Iowa net income. + ustax = person.tax_unit("income_tax_before_refundable_credits", period) + # correct ustax amount for flaw in CTC refundable/nonrefundable split + ctc = parameters(period).gov.irs.credits.ctc + ctc_fully_refundable = ctc.refundable.fully_refundable + if ctc_fully_refundable: + us_tax = ustax + person.tax_unit("non_refundable_ctc", period) + else: + us_tax = ustax + is_head = person("is_tax_unit_head", period) + is_spouse = person("is_tax_unit_spouse", period) + additional_hi_tax = person.tax_unit("additional_medicare_tax", period) + aggregate_tax = (is_head | is_spouse) * (us_tax - additional_hi_tax) + # prorate aggregate_tax among head and spouse according to net incomes + fraction = person("ia_prorate_fraction", period) + prorated_tax = fraction * aggregate_tax + # allocate any dependent self-employment tax to tax unit head + indiv_setax = person("self_employment_tax", period) + is_dependent = person("is_tax_unit_dependent", period) + sum_dep_setax = person.tax_unit.sum(is_dependent * indiv_setax) + setax = ~is_dependent * indiv_setax + is_head * sum_dep_setax + # return prorated_tax less setax + return max_(0, prorated_tax - setax) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_indiv.py new file mode 100644 index 00000000000..a6cd0122ee0 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_indiv.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class ia_itemized_deductions_indiv(Variable): + value_type = float + entity = Person + label = "Iowa itemized deductions for individual couples" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + unit_deds = person.tax_unit("ia_itemized_deductions_unit", period) + return unit_deds * person("ia_prorate_fraction", period) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_joint.py new file mode 100644 index 00000000000..59d78cfc615 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_joint.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_itemized_deductions_joint(Variable): + value_type = float + entity = Person + label = "Iowa itemized deductions for joint couples" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + deductions = person.tax_unit("ia_itemized_deductions_unit", period) + is_head = person("is_tax_unit_head", period) + return deductions * is_head diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_unit.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_unit.py new file mode 100644 index 00000000000..e67d6518811 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_itemized_deductions_unit.py @@ -0,0 +1,35 @@ +from policyengine_us.model_api import * + + +class ia_itemized_deductions_unit(Variable): + value_type = float + entity = TaxUnit + label = "Iowa itemized deductions for tax unit" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + """ + FROM THE 2021 INSTRUCTIONS (PAGE 46): + The $10,000 federal cap on the itemized deduction for state and + local taxes does not apply for Iowa purposes. Taxpayers may still + deduct eligible state and local taxes paid, independent of the + federal dollar limitation. + """ + # compute tax unit's itemized deductions + p = parameters(period).gov.irs.deductions + itm_deds = [ + deduction + for deduction in p.itemized_deductions + if deduction not in ["salt_deduction"] + ] + us_itemized_deductions_less_salt = add(tax_unit, period, itm_deds) + uncapped_property_taxes = add(tax_unit, period, ["real_estate_taxes"]) + return us_itemized_deductions_less_salt + uncapped_property_taxes diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_qbi_deduction.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_qbi_deduction.py new file mode 100644 index 00000000000..d7cd2985613 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_qbi_deduction.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_qbi_deduction(Variable): + value_type = float + entity = Person + label = "Iowa deduction that is fraction of federal qualified business income deduction" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + fed_qbid = person("qbid_amount", period) + p = parameters(period).gov.states.ia.tax.income + return fed_qbid * p.deductions.qualified_business_income.fraction diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_standard_deduction_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_standard_deduction_indiv.py new file mode 100644 index 00000000000..7ccb958df72 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_standard_deduction_indiv.py @@ -0,0 +1,40 @@ +from policyengine_us.model_api import * + + +class ia_standard_deduction_indiv(Variable): + value_type = float + entity = Person + label = "Iowa standard deduction when married couples file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + us_filing_status = person.tax_unit("filing_status", period) + fsvals = us_filing_status.possible_values + filing_status = select( + [ + us_filing_status == fsvals.JOINT, + us_filing_status == fsvals.SINGLE, + us_filing_status == fsvals.SEPARATE, + us_filing_status == fsvals.HEAD_OF_HOUSEHOLD, + us_filing_status == fsvals.WIDOW, + ], + [ + fsvals.SEPARATE, # couples are filing separately on Iowa form + fsvals.SINGLE, + fsvals.SEPARATE, + fsvals.HEAD_OF_HOUSEHOLD, + fsvals.WIDOW, + ], + ) + is_head = person("is_tax_unit_head", period) + is_spouse = person("is_tax_unit_spouse", period) + p = parameters(period).gov.states.ia.tax.income + return (is_head | is_spouse) * p.deductions.standard[filing_status] diff --git a/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_standard_deduction_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_standard_deduction_joint.py new file mode 100644 index 00000000000..06ce3e31a1d --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/deductions/ia_standard_deduction_joint.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class ia_standard_deduction_joint(Variable): + value_type = float + entity = Person + label = "Iowa standard deduction when married couples file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + is_head = person("is_tax_unit_head", period) + filing_status = person.tax_unit("filing_status", period) + p = parameters(period).gov.states.ia.tax.income + return is_head * p.deductions.standard[filing_status] diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_indiv.py new file mode 100644 index 00000000000..fc0e0ddc506 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_indiv.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class ia_alternate_tax_indiv(Variable): + value_type = float + entity = Person + label = "Iowa alternate tax when married couples file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=53" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=53" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + alt_tax = person.tax_unit("ia_alternate_tax_unit", period) + return alt_tax * person("ia_prorate_fraction", period) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_joint.py new file mode 100644 index 00000000000..411703deb9c --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_joint.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class ia_alternate_tax_joint(Variable): + value_type = float + entity = Person + label = "Iowa alternate tax when married couples file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=53" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=53" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + alt_tax = person.tax_unit("ia_alternate_tax_unit", period) + return alt_tax * person("is_tax_unit_head", period) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_unit.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_unit.py new file mode 100644 index 00000000000..c6b1b5a4e18 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_alternate_tax_unit.py @@ -0,0 +1,33 @@ +from policyengine_us.model_api import * +import numpy as np + + +class ia_alternate_tax_unit(Variable): + value_type = float + entity = TaxUnit + label = "Iowa alternate tax calculated using worksheet" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=53" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=53" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + # compute alternate tax following worksheet in the instructions + p = parameters(period).gov.states.ia.tax.income.alternate_tax + # ... determine alternate tax deduction + elder_head = tax_unit("age_head", period) >= p.elderly_age + elder_spouse = tax_unit("age_spouse", period) >= p.elderly_age + is_elder = elder_head | elder_spouse + alt_ded = where(is_elder, p.deduction.elderly, p.deduction.nonelderly) + # ... determine alternate tax amount + alt_taxinc = max_(0, tax_unit("ia_modified_income", period) - alt_ded) + alt_tax = alt_taxinc * p.rate + # ... alternate tax is not available to single filing units + filing_status = tax_unit("filing_status", period) + is_single = filing_status == filing_status.possible_values.SINGLE + return where(is_single, np.inf, alt_tax) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_amt_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_amt_indiv.py new file mode 100644 index 00000000000..f4d6b80ec29 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_amt_indiv.py @@ -0,0 +1,55 @@ +from policyengine_us.model_api import * + + +class ia_amt_indiv(Variable): + value_type = float + entity = Person + label = "Iowa alternative minimum tax when married couples file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=55" + "https://tax.iowa.gov/sites/default/files/2021-12/IA6251%2841131%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=55" + "https://tax.iowa.gov/sites/default/files/2023-01/IA6251%2841131%29.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + # compute Iowa AMT taxable income + reg_taxinc = person("ia_taxable_income_indiv", period) + std_ded = person("ia_standard_deduction_indiv", period) + itm_ded = person("ia_itemized_deductions_indiv", period) + amt_taxinc = where( + itm_ded > std_ded, + reg_taxinc + person("real_estate_taxes", period), + reg_taxinc, + ) + # compute AMT amount + p = parameters(period).gov.states.ia.tax.income + amt = p.alternative_minimum_tax + us_filing_status = person.tax_unit("filing_status", period) + fsvals = us_filing_status.possible_values + filing_status = select( + [ + us_filing_status == fsvals.JOINT, + us_filing_status == fsvals.SINGLE, + us_filing_status == fsvals.SEPARATE, + us_filing_status == fsvals.HEAD_OF_HOUSEHOLD, + us_filing_status == fsvals.WIDOW, + ], + [ + fsvals.SEPARATE, # couples are filing separately on Iowa form + fsvals.SINGLE, + fsvals.SEPARATE, + fsvals.HEAD_OF_HOUSEHOLD, + fsvals.WIDOW, + ], + ) + amt_threshold = amt.threshold[filing_status] # Line 23 + amt_exemption = amt.exemption[filing_status] # Line 24 + netinc = max_(0, amt_taxinc - amt_exemption) # Line 25 + amount = max_(0, amt_threshold - netinc * amt.fraction) # Line 27 + gross_amt = max_(0, amt_taxinc - amount) * amt.rate # Line 29 + base_tax = person("ia_base_tax_indiv", period) # Line 30 + return max_(0, gross_amt - base_tax) # Line 31 diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_amt_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_amt_joint.py new file mode 100644 index 00000000000..6e6ee40e7be --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_amt_joint.py @@ -0,0 +1,38 @@ +from policyengine_us.model_api import * + + +class ia_amt_joint(Variable): + value_type = float + entity = Person + label = "Iowa alternative minimum tax when married couples file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=55" + "https://tax.iowa.gov/sites/default/files/2021-12/IA6251%2841131%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=55" + "https://tax.iowa.gov/sites/default/files/2023-01/IA6251%2841131%29.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + # compute Iowa AMT taxable income + reg_taxinc = person("ia_taxable_income_joint", period) + std_ded = person("ia_standard_deduction_joint", period) + itm_ded = person("ia_itemized_deductions_joint", period) + amt_taxinc = where( + itm_ded > std_ded, + reg_taxinc + person("real_estate_taxes", period), + reg_taxinc, + ) + # compute AMT amount + p = parameters(period).gov.states.ia.tax.income + amt = p.alternative_minimum_tax + filing_status = person.tax_unit("filing_status", period) + amt_threshold = amt.threshold[filing_status] # Line 23 + amt_exemption = amt.exemption[filing_status] # Line 24 + netinc = max_(0, amt_taxinc - amt_exemption) # Line 25 + amount = max_(0, amt_threshold - netinc * amt.fraction) # Line 27 + gross_amt = max_(0, amt_taxinc - amount) * amt.rate # Line 29 + base_tax = person("ia_base_tax_joint", period) # Line 30 + return max_(0, gross_amt - base_tax) # Line 31 diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_base_tax_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_base_tax_indiv.py new file mode 100644 index 00000000000..b76fa37ace1 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_base_tax_indiv.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_base_tax_indiv(Variable): + value_type = float + entity = Person + label = "Iowa base tax when married couples file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=53" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=53" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + reg_tax = person("ia_regular_tax_indiv", period) + alt_tax = person("ia_alternate_tax_indiv", period) + return min_(reg_tax, alt_tax) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_base_tax_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_base_tax_joint.py new file mode 100644 index 00000000000..5ba3d45d9de --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_base_tax_joint.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_base_tax_joint(Variable): + value_type = float + entity = Person + label = "Iowa base tax when married couples file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=53" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=53" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + reg_tax = person("ia_regular_tax_joint", period) + alt_tax = person("ia_alternate_tax_joint", period) + return min_(reg_tax, alt_tax) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_files_separately.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_files_separately.py new file mode 100644 index 00000000000..1757d529165 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_files_separately.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_files_separately(Variable): + value_type = bool + entity = TaxUnit + label = "married couple files separately on Iowa tax return" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + itax_indiv = tax_unit("ia_income_tax_indiv", period) + itax_joint = tax_unit("ia_income_tax_joint", period) + return itax_indiv < itax_joint diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax.py new file mode 100644 index 00000000000..ef865f3f804 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax.py @@ -0,0 +1,18 @@ +from policyengine_us.model_api import * + + +class ia_income_tax(Variable): + value_type = float + entity = TaxUnit + label = "Iowa income tax" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + adds = ["ia_income_tax_before_refundable_credits"] + subtracts = ["ia_refundable_credits"] diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_before_credits.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_before_credits.py new file mode 100644 index 00000000000..aed67f628a4 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_before_credits.py @@ -0,0 +1,23 @@ +from policyengine_us.model_api import * + + +class ia_income_tax_before_credits(Variable): + value_type = float + entity = TaxUnit + label = "Iowa income tax before credits" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + return where( + tax_unit("ia_files_separately", period), + tax_unit("ia_income_tax_indiv", period), + tax_unit("ia_income_tax_joint", period), + ) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_before_refundable_credits.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_before_refundable_credits.py new file mode 100644 index 00000000000..b85165c20a9 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_before_refundable_credits.py @@ -0,0 +1,24 @@ +from policyengine_us.model_api import * + + +class ia_income_tax_before_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Iowa income tax before refundable credits" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=60" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=60" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + tax_before = tax_unit("ia_income_tax_before_credits", period) + nonref_credits = tax_unit("ia_nonrefundable_credits", period) + is_tax_exempt = tax_unit("ia_is_tax_exempt", period) + tax_after = ~is_tax_exempt * max_(0, tax_before - nonref_credits) + tax_reduced = tax_unit("ia_reduced_tax", period) + return min_(tax_after, tax_reduced) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_indiv.py new file mode 100644 index 00000000000..64a9da6dba3 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_indiv.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class ia_income_tax_indiv(Variable): + value_type = float + entity = TaxUnit + label = "Iowa income tax when married couples file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + adds = ["ia_base_tax_indiv", "ia_amt_indiv"] diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_joint.py new file mode 100644 index 00000000000..9d45467eb3e --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_income_tax_joint.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class ia_income_tax_joint(Variable): + value_type = float + entity = TaxUnit + label = "Iowa income tax when married couples file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + adds = ["ia_base_tax_joint", "ia_amt_joint"] diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_is_tax_exempt.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_is_tax_exempt.py new file mode 100644 index 00000000000..c408e823c19 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_is_tax_exempt.py @@ -0,0 +1,31 @@ +from policyengine_us.model_api import * + + +class ia_is_tax_exempt(Variable): + value_type = bool + entity = TaxUnit + label = "whether or not exempt from Iowa income tax because of low income" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=37" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=37" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + filing_status = tax_unit("filing_status", period) + is_single = filing_status == filing_status.possible_values.SINGLE + p = parameters(period).gov.states.ia.tax.income.tax_exempt + elderly_head = tax_unit("age_head", period) >= p.elderly_age + elderly_spouse = tax_unit("age_spouse", period) >= p.elderly_age + is_elderly = elderly_head | elderly_spouse + pil = p.income_limit + modified_income_limit = where( + is_single, + where(is_elderly, pil.single_elderly, pil.single_nonelderly), + where(is_elderly, pil.other_elderly, pil.other_nonelderly), + ) + return tax_unit("ia_modified_income", period) <= modified_income_limit diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_modified_income.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_modified_income.py new file mode 100644 index 00000000000..0f4e32ddd9b --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_modified_income.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class ia_modified_income(Variable): + value_type = float + entity = TaxUnit + label = "Iowa modified income used in tax-exempt and alternate-tax calculations" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=55" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=55" + ) + defined_for = StateCode.IA + adds = "gov.states.ia.tax.income.modified_income.sources" diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_reduced_tax.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_reduced_tax.py new file mode 100644 index 00000000000..88d192ae81f --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_reduced_tax.py @@ -0,0 +1,32 @@ +from policyengine_us.model_api import * +import numpy as np + + +class ia_reduced_tax(Variable): + value_type = float + entity = TaxUnit + label = "Iowa income tax reduced amount for single tax units" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=60" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=60" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + # logic follows Tax Reduction Worksheet + modified_income = tax_unit("ia_modified_income", period) # Line 1 + p = parameters(period).gov.states.ia.tax.income.tax_reduction + is_elderly = tax_unit("age_head", period) >= p.elderly_age + modified_income_threshold = where( # Line 2 + is_elderly, p.threshold.elderly, p.threshold.nonelderly + ) + amount = max_(0, modified_income - modified_income_threshold) # Line 3 + # reduced tax available only to single tax units + filing_status = tax_unit("filing_status", period) + is_single = filing_status == filing_status.possible_values.SINGLE + return where(is_single, amount, np.inf) + # see ia_income_tax_before_refundable_credits formula for variable use diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_regular_tax_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_regular_tax_indiv.py new file mode 100644 index 00000000000..1f6867b1aee --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_regular_tax_indiv.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_regular_tax_indiv(Variable): + value_type = float + entity = Person + label = "Iowa regular tax calculated using income tax rate schedule when married couples file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=53" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=53" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + taxable_income = person("ia_taxable_income_indiv", period) + p = parameters(period).gov.states.ia.tax.income + return p.rates.all.calc(max_(0, taxable_income)) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_regular_tax_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_regular_tax_joint.py new file mode 100644 index 00000000000..ed7ec489d71 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_regular_tax_joint.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class ia_regular_tax_joint(Variable): + value_type = float + entity = Person + label = "Iowa regular tax calculated using income tax rate schedule when married couples file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=53" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=53" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + taxable_income = person("ia_taxable_income_joint", period) + p = parameters(period).gov.states.ia.tax.income + return p.rates.all.calc(max_(0, taxable_income)) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_reportable_social_security.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_reportable_social_security.py new file mode 100644 index 00000000000..5b7fad6dd8b --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_reportable_social_security.py @@ -0,0 +1,28 @@ +from policyengine_us.model_api import * + + +class ia_reportable_social_security(Variable): + value_type = float + entity = TaxUnit + label = "Iowa reportable social security benefits" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=11" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=10" + ) + defined_for = StateCode.IA + + def formula(tax_unit, period, parameters): + benefits = add(tax_unit, period, ["social_security"]) + income = ( + tax_unit("adjusted_gross_income", period) + - add(tax_unit, period, ["taxable_social_security"]) + + add(tax_unit, period, ["tax_exempt_interest_income"]) + ) + p = parameters(period).gov.states.ia.tax.income + filing_status = tax_unit("filing_status", period) + deduction = p.reportable_social_security.deduction[filing_status] + return p.reportable_social_security.fraction * min_( + benefits, max_(0, income - deduction) + ) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_taxable_income_indiv.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_taxable_income_indiv.py new file mode 100644 index 00000000000..ba183bb4008 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_taxable_income_indiv.py @@ -0,0 +1,26 @@ +from policyengine_us.model_api import * + + +class ia_taxable_income_indiv(Variable): + value_type = float + entity = Person + label = "Iowa taxable income when married couple file separately" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + net_income = person("ia_net_income", period) + p = parameters(period).gov.states.ia.tax.income + deductions = [ + f"{ded}_indiv" if ded == "ia_basic_deduction" else ded + for ded in p.deductions.sources + ] + deductions_amount = add(person, period, deductions) + return max_(0, net_income - deductions_amount) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/ia_taxable_income_joint.py b/policyengine_us/variables/gov/states/ia/tax/income/ia_taxable_income_joint.py new file mode 100644 index 00000000000..94a3b5df691 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/ia_taxable_income_joint.py @@ -0,0 +1,30 @@ +from policyengine_us.model_api import * + + +class ia_taxable_income_joint(Variable): + value_type = float + entity = Person + label = "Iowa taxable income when married couple file jointly" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + # assign total net_income to tax unit head + is_head = person("is_tax_unit_head", period) + net_income = person("ia_net_income", period) + head_net_income = is_head * person.tax_unit.sum(net_income) + # subtract joint deductions + p = parameters(period).gov.states.ia.tax.income + deductions = [ + f"{ded}_joint" if ded == "ia_basic_deduction" else ded + for ded in p.deductions.sources + ] + deductions_amount = add(person.tax_unit, period, deductions) + return is_head * max_(0, head_net_income - deductions_amount) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_gross_income.py b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_gross_income.py new file mode 100644 index 00000000000..c24322e7370 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_gross_income.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class ia_gross_income(Variable): + value_type = float + entity = Person + label = "Iowa gross income" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + adds = "gov.states.ia.tax.income.gross_income.sources" diff --git a/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_income_adjustments.py b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_income_adjustments.py new file mode 100644 index 00000000000..d55e4b58b17 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_income_adjustments.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class ia_income_adjustments(Variable): + value_type = float + entity = Person + label = "Iowa income adjustments" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + adds = "gov.states.ia.tax.income.income_adjustments.sources" diff --git a/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_net_income.py b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_net_income.py new file mode 100644 index 00000000000..03142c21656 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_net_income.py @@ -0,0 +1,26 @@ +from policyengine_us.model_api import * + + +class ia_net_income(Variable): + value_type = float + entity = Person + label = "Iowa net income" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + gross_income = person("ia_gross_income", period) + income_adjustments = person("ia_income_adjustments", period) + net_income = gross_income - income_adjustments + # allocate any dependent net_income to tax unit head + is_dependent = person("is_tax_unit_dependent", period) + sum_dep_net_income = person.tax_unit.sum(is_dependent * net_income) + is_head = person("is_tax_unit_head", period) + return ~is_dependent * net_income + is_head * sum_dep_net_income diff --git a/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_pension_exclusion.py b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_pension_exclusion.py new file mode 100644 index 00000000000..95a6cc11a95 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_pension_exclusion.py @@ -0,0 +1,33 @@ +from policyengine_us.model_api import * + + +class ia_pension_exclusion(Variable): + value_type = float + entity = Person + label = "Iowa pension exclusion" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf#page=26" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf#page=26" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + p = parameters(period).gov.states.ia.tax.income.pension_exclusion + # determine eligibility for pension exclusion + is_head = person("is_tax_unit_head", period) + is_spouse = person("is_tax_unit_spouse", period) + # ... determine age eligibility + an_elder = person("age", period) >= p.minimum_age + is_elderly = (is_head & an_elder) | (is_spouse & an_elder) + # ... determine disability eligiblity + has_disability = person("is_permanently_and_totally_disabled", period) + is_disabled = (is_head & has_disability) | (is_spouse & has_disability) + # ... determine exclusion eligibility + is_eligible = is_elderly | is_disabled + # determine pension exclusion amount + pension = person("taxable_pension_income", period) + filing_status = person.tax_unit("filing_status", period) + exclusion_cap = p.maximum_amount[filing_status] + return is_eligible * min_(pension, exclusion_cap) diff --git a/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_prorate_fraction.py b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_prorate_fraction.py new file mode 100644 index 00000000000..1eee1dfea78 --- /dev/null +++ b/policyengine_us/variables/gov/states/ia/tax/income/net_income/ia_prorate_fraction.py @@ -0,0 +1,26 @@ +from policyengine_us.model_api import * + + +class ia_prorate_fraction(Variable): + value_type = float + entity = Person + label = "Iowa joint amount proration fraction" + unit = USD + definition_period = YEAR + reference = ( + "https://tax.iowa.gov/sites/default/files/2022-01/IA1040%2841-001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2021%20Expanded%20Instructions_010323.pdf" + "https://tax.iowa.gov/sites/default/files/2023-01/2022IA1040%2841001%29.pdf" + "https://tax.iowa.gov/sites/default/files/2023-03/2022%20Expanded%20Instructions_022023.pdf" + ) + defined_for = StateCode.IA + + def formula(person, period, parameters): + net_income = person("ia_net_income", period) + total_net_income = person.tax_unit.sum(net_income) + # If no net income, then assign entirely to head. + return where( + total_net_income == 0, + person("is_tax_unit_head", period), + net_income / total_net_income, + ) diff --git a/policyengine_us/variables/gov/states/ky/tax/income/credits/ky_refundable_credits.py b/policyengine_us/variables/gov/states/ky/tax/income/credits/ky_refundable_credits.py new file mode 100644 index 00000000000..67e2bd31fe4 --- /dev/null +++ b/policyengine_us/variables/gov/states/ky/tax/income/credits/ky_refundable_credits.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class ky_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Kentucky refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.KY diff --git a/policyengine_us/variables/gov/states/ky/tax/income/ky_income_tax.py b/policyengine_us/variables/gov/states/ky/tax/income/ky_income_tax.py new file mode 100644 index 00000000000..b2ecb34adc2 --- /dev/null +++ b/policyengine_us/variables/gov/states/ky/tax/income/ky_income_tax.py @@ -0,0 +1,12 @@ +from policyengine_us.model_api import * + + +class ky_income_tax(Variable): + value_type = float + entity = TaxUnit + label = "Kentucky income tax" + unit = USD + definition_period = YEAR + defined_for = StateCode.KY + adds = ["ky_income_tax_before_refundable_credits"] + subtracts = ["ky_refundable_credits"] diff --git a/policyengine_us/variables/gov/states/ky/tax/income/ky_income_tax_before_refundable_credits.py b/policyengine_us/variables/gov/states/ky/tax/income/ky_income_tax_before_refundable_credits.py new file mode 100644 index 00000000000..a4ff7170a28 --- /dev/null +++ b/policyengine_us/variables/gov/states/ky/tax/income/ky_income_tax_before_refundable_credits.py @@ -0,0 +1,15 @@ +from policyengine_us.model_api import * + + +class ky_income_tax_before_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Kentucky income tax before refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.KY + + def formula(tax_unit, period, paramters): + income = tax_unit("ky_taxable_income", period) + rate = paramters(period).gov.states.ky.tax.income.rate + return income * rate diff --git a/policyengine_us/variables/gov/states/ky/tax/income/ky_taxable_income.py b/policyengine_us/variables/gov/states/ky/tax/income/ky_taxable_income.py new file mode 100644 index 00000000000..e558cc6b1f8 --- /dev/null +++ b/policyengine_us/variables/gov/states/ky/tax/income/ky_taxable_income.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class ky_taxable_income(Variable): + value_type = float + entity = TaxUnit + label = "Kentucky taxable income" + unit = USD + definition_period = YEAR + defined_for = StateCode.KY diff --git a/policyengine_us/variables/gov/states/mt/tax/income/mt_income_tax.py b/policyengine_us/variables/gov/states/mt/tax/income/mt_income_tax.py new file mode 100644 index 00000000000..6841ebb0e59 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/mt_income_tax.py @@ -0,0 +1,12 @@ +from policyengine_us.model_api import * + + +class mt_income_tax(Variable): + value_type = float + entity = TaxUnit + label = "Montana income tax" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + adds = ["mt_income_tax_before_refundable_credits"] + subtracts = ["mt_refundable_credits"] diff --git a/policyengine_us/variables/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.py b/policyengine_us/variables/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.py new file mode 100644 index 00000000000..9c272c7dccd --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/mt_income_tax_before_refundable_credits.py @@ -0,0 +1,30 @@ +from policyengine_us.model_api import * + + +class mt_income_tax_before_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Montana income tax before refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + income = tax_unit("mt_taxable_income", period) + p = parameters(period).gov.states.mt.tax.income.main + filing_status = tax_unit("filing_status", period) + status = filing_status.possible_values + return select( + [ + filing_status == status.SINGLE, + filing_status == status.JOINT, + filing_status == status.HEAD_OF_HOUSEHOLD, + filing_status == status.SEPARATE, + ], + [ + p.single.calc(income), + p.joint.calc(income), + p.head_of_household.calc(income), + p.separate.calc(income), + ], + ) diff --git a/policyengine_us/variables/gov/states/mt/tax/income/mt_refundable_credits.py b/policyengine_us/variables/gov/states/mt/tax/income/mt_refundable_credits.py new file mode 100644 index 00000000000..22b00f68247 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/mt_refundable_credits.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class mt_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Montana refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/mt_taxable_income.py b/policyengine_us/variables/gov/states/mt/tax/income/mt_taxable_income.py new file mode 100644 index 00000000000..6113924d993 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/mt_taxable_income.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class mt_taxable_income(Variable): + value_type = float + entity = TaxUnit + label = "Montana taxable income" + unit = USD + definition_period = YEAR + defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/nc/tax/income/nc_income_tax.py b/policyengine_us/variables/gov/states/nc/tax/income/nc_income_tax.py new file mode 100644 index 00000000000..edea84d8a2a --- /dev/null +++ b/policyengine_us/variables/gov/states/nc/tax/income/nc_income_tax.py @@ -0,0 +1,16 @@ +from policyengine_us.model_api import * + + +class nc_income_tax(Variable): + value_type = float + entity = TaxUnit + label = "North Carolina income tax" + unit = USD + definition_period = YEAR + defined_for = StateCode.NC + + def formula(tax_unit, period, parameters): + tax_before_credits = tax_unit("nc_income_tax_before_credits", period) + # North Carolina does not allow for any refundable credits + credits = tax_unit("nc_non_refundable_credits", period) + return max_((tax_before_credits - credits), 0) diff --git a/policyengine_us/variables/gov/states/nc/tax/income/nc_income_tax_before_credits.py b/policyengine_us/variables/gov/states/nc/tax/income/nc_income_tax_before_credits.py new file mode 100644 index 00000000000..cc2c728b790 --- /dev/null +++ b/policyengine_us/variables/gov/states/nc/tax/income/nc_income_tax_before_credits.py @@ -0,0 +1,15 @@ +from policyengine_us.model_api import * + + +class nc_income_tax_before_credits(Variable): + value_type = float + entity = TaxUnit + label = "North Carolina income tax before credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.NC + + def formula(tax_unit, period, parameters): + income = tax_unit("nc_taxable_income", period) + rate = parameters(period).gov.states.nc.tax.income.rate + return income * rate diff --git a/policyengine_us/variables/gov/states/nc/tax/income/nc_non_refundable_credits.py b/policyengine_us/variables/gov/states/nc/tax/income/nc_non_refundable_credits.py new file mode 100644 index 00000000000..c0922a2284f --- /dev/null +++ b/policyengine_us/variables/gov/states/nc/tax/income/nc_non_refundable_credits.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class nc_non_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "North Carolina non-refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.NC diff --git a/policyengine_us/variables/gov/states/nc/tax/income/nc_taxable_income.py b/policyengine_us/variables/gov/states/nc/tax/income/nc_taxable_income.py new file mode 100644 index 00000000000..8fd68e2b0a9 --- /dev/null +++ b/policyengine_us/variables/gov/states/nc/tax/income/nc_taxable_income.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class nc_taxable_income(Variable): + value_type = float + entity = TaxUnit + label = "North Carolina taxable income" + unit = USD + definition_period = YEAR + defined_for = StateCode.NC diff --git a/policyengine_us/variables/gov/states/nh/tax/income/nh_income_tax.py b/policyengine_us/variables/gov/states/nh/tax/income/nh_income_tax.py new file mode 100644 index 00000000000..6346b6ba243 --- /dev/null +++ b/policyengine_us/variables/gov/states/nh/tax/income/nh_income_tax.py @@ -0,0 +1,12 @@ +from policyengine_us.model_api import * + + +class nh_income_tax(Variable): + value_type = float + entity = TaxUnit + label = "New Hampshire income tax" + unit = USD + definition_period = YEAR + defined_for = StateCode.NH + adds = ["nh_income_tax_before_refundable_credits"] + subtracts = ["nh_refundable_credits"] diff --git a/policyengine_us/variables/gov/states/nh/tax/income/nh_income_tax_before_refundable_credits.py b/policyengine_us/variables/gov/states/nh/tax/income/nh_income_tax_before_refundable_credits.py new file mode 100644 index 00000000000..cfdde5bedc6 --- /dev/null +++ b/policyengine_us/variables/gov/states/nh/tax/income/nh_income_tax_before_refundable_credits.py @@ -0,0 +1,15 @@ +from policyengine_us.model_api import * + + +class nh_income_tax_before_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "New Hampshire income tax before refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.NH + + def formula(tax_unit, period, parameters): + income = tax_unit("nh_taxable_income", period) + rate = parameters(period).gov.states.nh.tax.income.main + return income * rate diff --git a/policyengine_us/variables/gov/states/nh/tax/income/nh_refundable_credits.py b/policyengine_us/variables/gov/states/nh/tax/income/nh_refundable_credits.py new file mode 100644 index 00000000000..034e74a0771 --- /dev/null +++ b/policyengine_us/variables/gov/states/nh/tax/income/nh_refundable_credits.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class nh_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "New Hampshire refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.NH diff --git a/policyengine_us/variables/gov/states/nh/tax/income/nh_taxable_income.py b/policyengine_us/variables/gov/states/nh/tax/income/nh_taxable_income.py new file mode 100644 index 00000000000..4fa7f4fe7dc --- /dev/null +++ b/policyengine_us/variables/gov/states/nh/tax/income/nh_taxable_income.py @@ -0,0 +1,12 @@ +from policyengine_us.model_api import * + + +class nh_taxable_income(Variable): + value_type = float + entity = TaxUnit + label = "New Hampshire taxable income" + unit = USD + definition_period = YEAR + reference = "https://www.gencourt.state.nh.us/rsa/html/V/77/77-4.htm " + defined_for = StateCode.NH + adds = ["dividend_income", "interest_income"] diff --git a/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax.py b/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax.py index 690b2076675..8745e2c67c1 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax.py @@ -8,5 +8,27 @@ class nj_income_tax(Variable): unit = USD definition_period = YEAR defined_for = StateCode.NJ - adds = ["ny_income_tax_before_refundable_credits"] - subtracts = ["ny_refundable_credits"] + + def formula(tax_unit, period, parameters): + # Get the NJ tax portion of the parameter tree. + p = parameters(period).gov.states.nj.tax.income + + # Get NJ AGI. + agi = tax_unit("nj_agi", period) + + # Get filing status. + filing_status = tax_unit("filing_status", period) + + # Get the refundable credits and the income tax before refundable credits. + income_tax = tax_unit( + "nj_income_tax_before_refundable_credits", period + ) + refundable_credits = tax_unit("nj_refundable_credits", period) + + # If taxable income is below the filing threshold, the tax should not be positive. + # Tax could still be negative if filer is due refundable credits. + return where( + agi < p.filing_threshold[filing_status], + min_(0, income_tax - refundable_credits), + income_tax - refundable_credits, + ) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax_before_refundable_credits.py b/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax_before_refundable_credits.py index 30306fc2d4a..5465dc7b392 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax_before_refundable_credits.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/nj_income_tax_before_refundable_credits.py @@ -8,3 +8,9 @@ class nj_income_tax_before_refundable_credits(Variable): unit = USD definition_period = YEAR defined_for = StateCode.NJ + + def formula(tax_unit, period, parameters): + main_income_tax = tax_unit("nj_main_income_tax", period) + non_refundable_credits = tax_unit("nj_non_refundable_credits", period) + + return max_(main_income_tax - non_refundable_credits, 0) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/nj_non_refundable_credits.py b/policyengine_us/variables/gov/states/nj/tax/income/nj_non_refundable_credits.py new file mode 100644 index 00000000000..03d53f2eca3 --- /dev/null +++ b/policyengine_us/variables/gov/states/nj/tax/income/nj_non_refundable_credits.py @@ -0,0 +1,10 @@ +from policyengine_us.model_api import * + + +class nj_non_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "New Jersey non-refundable credits" + unit = USD + definition_period = YEAR + defined_for = StateCode.NJ diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_homeowners_property_tax.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_homeowners_property_tax.py index 0e44214a487..e7280a55bce 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_homeowners_property_tax.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_homeowners_property_tax.py @@ -10,3 +10,6 @@ class nj_homeowners_property_tax(Variable): documentation = "Property taxes or rent paid on a principal place of residence that was subject to New Jersey property tax." reference = "https://www.state.nj.us/treasury/taxation/pdf/current/1040i.pdf#page=26" defined_for = StateCode.NJ + + # By default, use real estate taxes. + adds = ["real_estate_taxes"] diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py index 3d65e36153c..184777a2659 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py @@ -8,11 +8,9 @@ class nj_potential_property_tax_deduction(Variable): unit = USD definition_period = YEAR reference = "https://law.justia.com/codes/new-jersey/2022/title-54a/section-54a-3a-17/" - defined_for = "nj_property_tax_deduction_or_credit_eligible" + defined_for = "nj_property_tax_deduction_eligible" def formula(tax_unit, period, parameters): - # Don't forget to divide the threshold if filing separately? They have to also live together. - # Get the NJ property tax deduction portion of the parameter tree. p = parameters(period).gov.states.nj.tax.income.deductions.property_tax @@ -23,13 +21,21 @@ def formula(tax_unit, period, parameters): # If renting, this will be a fraction of the total rent. person = tax_unit.members rent_amounts = person("rent", period) - property_tax = np.where( + property_tax = where( rents, tax_unit.sum(rent_amounts) * p.qualifying_rent_fraction, tax_unit("nj_homeowners_property_tax", period), ) + # If filing separate but maintain same home, halve property tax. + filing_status = tax_unit("filing_status", period) + status = filing_status.possible_values + separate = filing_status == status.SEPARATE + cohabitating = tax_unit("cohabitating_spouses", period) + property_tax = property_tax / (1 + separate * cohabitating) + # Get the amount of paid property taxes under the threshold. - threshold = p.threshold + # Threshold is also halved if filing separate but maintain same home. + threshold = p.threshold / (1 + separate * cohabitating) return min_(property_tax, threshold) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.py index a506468ac99..432f73652cc 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_credit.py @@ -8,12 +8,9 @@ class nj_property_tax_credit(Variable): unit = USD definition_period = YEAR reference = "https://law.justia.com/codes/new-jersey/2022/title-54a/section-54a-3a-20/" - defined_for = "nj_property_tax_deduction_or_credit_eligible" + defined_for = "nj_property_tax_credit_eligible" def formula(tax_unit, period, parameters): - # Don't forget to add eligiblity (I think easy one is filing threshold). - # Don't forget to divide the threshold if filing separately? They have to also live together. - # Get the NJ property tax credit portion of the parameter tree. p = parameters(period).gov.states.nj.tax.income.credits.property_tax @@ -21,4 +18,11 @@ def formula(tax_unit, period, parameters): taking_deduction = tax_unit("nj_taking_property_tax_deduction", period) # Return the credit amount, which does not depend on property taxes paid if eligible. - return p.amount * ~taking_deduction + # Halve the credit amount if filing separate but maintain same home. + filing_status = tax_unit("filing_status", period) + status = filing_status.possible_values + separate = filing_status == status.SEPARATE + cohabitating = tax_unit("cohabitating_spouses", period) + credit_amount = p.amount / (1 + separate * cohabitating) + + return credit_amount * ~taking_deduction diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_credit_eligible.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_credit_eligible.py new file mode 100644 index 00000000000..b360bb6aa60 --- /dev/null +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_credit_eligible.py @@ -0,0 +1,47 @@ +from policyengine_us.model_api import * + + +class nj_property_tax_credit_eligible(Variable): + value_type = bool + entity = TaxUnit + label = "New Jersey property tax credit eligibility" + definition_period = YEAR + defined_for = StateCode.NJ + + def formula(tax_unit, period, parameters): + # Same as deduction eligibility, but also eligible if 65+ or + # blind/disabled and paid property taxes. + deduction_eligibility = tax_unit( + "nj_property_tax_deduction_eligible", period + ) + + # Get the NJ property tax credit portion of the parameter tree. + p = parameters(period).gov.states.nj.tax.income.credits.property_tax + + # If filing jointly, only one spouse needs to be 65+ or blind/disabled. + blind_head = tax_unit("blind_head", period) + disabled_head = tax_unit("disabled_head", period) + blind_spouse = tax_unit("blind_spouse", period) + disabled_spouse = tax_unit("disabled_spouse", period) + senior_head = tax_unit("age_head", period) > p.senior_qualifying_age + senior_spouse = ( + tax_unit("age_spouse", period) > p.senior_qualifying_age + ) + senior_blind_disabled = ( + blind_head + | disabled_head + | blind_spouse + | disabled_spouse + | senior_head + | senior_spouse + ) + + # Next check if they paid property taxes (either directly or through + # rent). + direct_property_taxes = tax_unit("nj_homeowners_property_tax", period) + rent = tax_unit("rents", period) + paid_property_taxes = (direct_property_taxes + rent) > 0 + + return deduction_eligibility | ( + senior_blind_disabled & paid_property_taxes + ) diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction.py index f599b1a5851..c76962506b2 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction.py @@ -12,8 +12,6 @@ class nj_property_tax_deduction(Variable): default_value = 0 def formula(tax_unit, period, parameters): - # Don't forget to divide the threshold if filing separately? They have to also live together. - # Get the tax unit's potential property tax deduction. potential_deduction = tax_unit( "nj_potential_property_tax_deduction", period diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_or_credit_eligible.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_eligible.py similarity index 68% rename from policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_or_credit_eligible.py rename to policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_eligible.py index e00f7a5da87..25e10c7c8e8 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_or_credit_eligible.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_property_tax_deduction_eligible.py @@ -1,17 +1,14 @@ from policyengine_us.model_api import * -class nj_property_tax_deduction_or_credit_eligible(Variable): +class nj_property_tax_deduction_eligible(Variable): value_type = bool entity = TaxUnit - label = "New Jersey property tax deduction/credit eligibility" - unit = USD + label = "New Jersey property tax deduction eligibility" definition_period = YEAR defined_for = StateCode.NJ def formula(tax_unit, period, parameters): - # Don't forget to divide the threshold if filing separately? They have to also live together. - # Get the NJ tax portion of the parameter tree. p = parameters(period).gov.states.nj.tax.income @@ -23,6 +20,6 @@ def formula(tax_unit, period, parameters): # Next check if they paid property taxes (either directly or through rent). direct_property_taxes = tax_unit("nj_homeowners_property_tax", period) rent = tax_unit("rents", period) - paid_property_taxes = (direct_property_taxes + rent) > 0 + paid_property_taxes_or_rent = (direct_property_taxes + rent) > 0 - return income_eligible & paid_property_taxes + return income_eligible & paid_property_taxes_or_rent diff --git a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py index e1730021c20..3e01bcf187d 100644 --- a/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py +++ b/policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py @@ -8,11 +8,10 @@ class nj_taking_property_tax_deduction(Variable): unit = USD definition_period = YEAR reference = "https://law.justia.com/codes/new-jersey/2022/title-54a/section-54a-3a-17/" - defined_for = "nj_property_tax_deduction_or_credit_eligible" + defined_for = "nj_property_tax_deduction_eligible" def formula(tax_unit, period, parameters): # This follows the logic of the 1040 instructions Worksheet H. - # Don't forget to divide the threshold if filing separately? They have to also live together. # Get the would-be property tax deduction. deduction = tax_unit("nj_potential_property_tax_deduction", period) @@ -67,7 +66,12 @@ def formula(tax_unit, period, parameters): ) # Determine whether the difference in tax incidence is greater than the credit amount. + # Credit amount is halved if filing separately but maintaining the same home. credit_amount = parameters( period ).gov.states.nj.tax.income.credits.property_tax.amount + separate = filing_status == status.SEPARATE + cohabitating = tax_unit("cohabitating_spouses", period) + credit_amount = credit_amount / (1 + separate * cohabitating) + return (taxes_without_deduction - taxes_with_deduction) > credit_amount diff --git a/policyengine_us/variables/gov/states/ri/tax/income/ri_refundable_credits.py b/policyengine_us/variables/gov/states/ri/tax/income/ri_refundable_credits.py index 67d9744d157..1cccd759945 100644 --- a/policyengine_us/variables/gov/states/ri/tax/income/ri_refundable_credits.py +++ b/policyengine_us/variables/gov/states/ri/tax/income/ri_refundable_credits.py @@ -1,7 +1,7 @@ from policyengine_us.model_api import * -class ri_refunable_credits(Variable): +class ri_refundable_credits(Variable): value_type = float entity = TaxUnit label = "Rhode Island refundable credits" diff --git a/policyengine_us/variables/gov/states/tax/income/state_income_tax.py b/policyengine_us/variables/gov/states/tax/income/state_income_tax.py index 67059a8746d..feac75f6631 100644 --- a/policyengine_us/variables/gov/states/tax/income/state_income_tax.py +++ b/policyengine_us/variables/gov/states/tax/income/state_income_tax.py @@ -10,6 +10,7 @@ class state_income_tax(Variable): adds = [ # state income tax variables listed in alphabetical order: "ca_income_tax", + # "ia_income_tax", --- activating will cause circular logic errors "il_income_tax", "ks_income_tax", "ma_income_tax", diff --git a/policyengine_us/variables/gov/states/tax/income/state_income_tax_before_refundable_credits.py b/policyengine_us/variables/gov/states/tax/income/state_income_tax_before_refundable_credits.py index 99603749a4b..e04bb20e077 100644 --- a/policyengine_us/variables/gov/states/tax/income/state_income_tax_before_refundable_credits.py +++ b/policyengine_us/variables/gov/states/tax/income/state_income_tax_before_refundable_credits.py @@ -8,6 +8,7 @@ class state_income_tax_before_refundable_credits(Variable): unit = USD definition_period = YEAR adds = [ + "ia_income_tax_before_refundable_credits", "il_total_tax", "ks_income_tax_before_refundable_credits", "ma_income_tax_before_refundable_credits", diff --git a/policyengine_us/variables/household/demographic/tax_unit/cohabitating_spouses.py b/policyengine_us/variables/household/demographic/tax_unit/cohabitating_spouses.py new file mode 100644 index 00000000000..c657c49277f --- /dev/null +++ b/policyengine_us/variables/household/demographic/tax_unit/cohabitating_spouses.py @@ -0,0 +1,11 @@ +from policyengine_us.model_api import * + + +class cohabitating_spouses(Variable): + value_type = bool + entity = TaxUnit + definition_period = YEAR + label = "Cohabitating spouses" + documentation = ( + "Whether spouses in joint or separate tax units are cohabitating." + ) diff --git a/policyengine_us/variables/household/income/household/household_benefits.py b/policyengine_us/variables/household/income/household/household_benefits.py index 9241c6e37c8..9c0afd230d3 100644 --- a/policyengine_us/variables/household/income/household/household_benefits.py +++ b/policyengine_us/variables/household/income/household/household_benefits.py @@ -11,6 +11,7 @@ class household_benefits(Variable): "social_security", "ssi", "state_supplement", + "co_state_supplement", "ca_cvrp", # California Clean Vehicle Rebate Project. "ca_care", "ca_fera", diff --git a/policyengine_us/variables/household/income/spm_unit/spm_unit_benefits.py b/policyengine_us/variables/household/income/spm_unit/spm_unit_benefits.py index 8a3b4dde343..9d84fbac7cc 100644 --- a/policyengine_us/variables/household/income/spm_unit/spm_unit_benefits.py +++ b/policyengine_us/variables/household/income/spm_unit/spm_unit_benefits.py @@ -13,6 +13,7 @@ def formula(spm_unit, period, parameters): "social_security", "ssi", "state_supplement", + "co_state_supplement", "ca_cvrp", # California Clean Vehicle Rebate Project. "snap", "wic", diff --git a/setup.py b/setup.py index ff17dfa34f3..9f6061180b1 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="policyengine-us", - version="0.320.1", + version="0.329.3", author="PolicyEngine", author_email="hello@policyengine.org", long_description=readme, @@ -37,8 +37,8 @@ "microdf_python", "pandas", "pathlib", - "policyengine-core>=2.0.4,<3", - "pytest==5.4.3", + "policyengine-core>=2.1,<3", + "pytest", "pytest-dependency", "pyyaml", "requests", @@ -68,7 +68,7 @@ ], }, # Windows CI requires Python 3.9. - python_requires=">=3.7,<3.10", + python_requires=">=3.7", entry_points={ "console_scripts": [ "policyengine-us = policyengine_us.tools.cli:main",