From 448b1790dda55c8bd95f0e0362b51673cd8f77ca Mon Sep 17 00:00:00 2001 From: Yihan Wang <91220978+mylittlebecca@users.noreply.github.com> Date: Sun, 24 Dec 2023 18:34:33 -0500 Subject: [PATCH] Add Ohio Joint Filing Credit (#3086) * Ohio Joint Filing Credit Fixes #3057 * Fix 3057 * Fix 3057 * Ohio Joint Filing Credit Fixes #3057 * Ohio Joint Filing Credit Fixes #3057 * Ohio Joint Filing Credit Fixes #3057 * Ohio Joint Filing Credit Fixes #3057 * Ohio Joint Filing Credit Fixes #3057 * Fix Ohio Joint Filing Credit * Ohio Joint Filing Credit Fixes #3057 * Ohio Joint Filing Credit Fixes #3057 * formatting * typo * minor fix * fix variables and tests * delete extra Ohio file * suggested format * typo --------- Co-authored-by: PavelMakarchuk --- changelog_entry.yaml | 4 ++ .../joint_filing/agi_subtractions.yaml | 20 ++++++ .../tax/income/credits/joint_filing/cap.yaml | 15 +++++ .../joint_filing/income_threshold.yaml | 15 +++++ .../other_non_refundable_credits.yaml | 21 +++++++ .../tax/income/credits/joint_filing/rate.yaml | 32 ++++++++++ .../oh/tax/income/credits/non_refundable.yaml | 2 + .../oh_joint_filing_credit.yaml | 33 ++++++++++ .../oh_joint_filing_credit_eligible.yaml | 62 +++++++++++++++++++ .../oh_tax_before_joint_filing_credit.yaml | 17 +++++ ...me_tax_before_non_refundable_credits.yaml} | 4 +- ..._income_tax_before_refundable_credits.yaml | 4 +- .../joint_filing_credit/oh_alternative_agi.py | 22 +++++++ .../oh_joint_filing_credit.py | 25 ++++++++ .../oh_joint_filing_credit_eligible.py | 28 +++++++++ .../oh_partial_non_refundable_credits.py | 20 ++++++ .../oh_tax_before_joint_filing_credit.py | 23 +++++++ .../exemptions/oh_personal_exemptions.py | 4 +- ...come_tax_before_non_refundable_credits.py} | 2 +- ...oh_income_tax_before_refundable_credits.py | 4 +- 20 files changed, 349 insertions(+), 8 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/agi_subtractions.yaml create mode 100644 policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/cap.yaml create mode 100644 policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/income_threshold.yaml create mode 100644 policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/other_non_refundable_credits.yaml create mode 100644 policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.yaml rename policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/{oh_income_tax_before_credits.yaml => oh_income_tax_before_non_refundable_credits.yaml} (81%) create mode 100644 policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_alternative_agi.py create mode 100644 policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.py create mode 100644 policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.py create mode 100644 policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_partial_non_refundable_credits.py create mode 100644 policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.py rename policyengine_us/variables/gov/states/oh/tax/income/{oh_income_tax_before_credits.py => oh_income_tax_before_non_refundable_credits.py} (90%) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..30cfaae738d 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Ohio joint filing credit. diff --git a/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/agi_subtractions.yaml b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/agi_subtractions.yaml new file mode 100644 index 00000000000..780fee7de98 --- /dev/null +++ b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/agi_subtractions.yaml @@ -0,0 +1,20 @@ +description: Ohio subtracts these items from the Ohio adjusted gross income, under the joint filing credit. + +metadata: + unit: list + reference: + - title: 2021 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/pit-it1040-booklet.pdf#page=20 + - title: 2022 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/it1040-sd100-instruction-booklet.pdf#page=20 + - title: Ohio Revised Code - Section 5747.05 Tax credits. (E) (1) + href: https://law.justia.com/codes/ohio/2022/title-57/chapter-5747/section-5747-05/ + period: year + label: Ohio joint filing credit adjusted gross income subtractions + + values: + 2021-01-01: + - interest_income + - dividend_income + - capital_gains + - rental_income diff --git a/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/cap.yaml b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/cap.yaml new file mode 100644 index 00000000000..8a1dc399773 --- /dev/null +++ b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/cap.yaml @@ -0,0 +1,15 @@ +description: Ohio caps the joint filing credit at this amount. +values: + 2021-01-01: 650 + +metadata: + period: year + unit: currency-USD + label: Ohio joint filing credit cap + reference: + - title: 2021 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/pit-it1040-booklet.pdf#page=20 + - title: 2022 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/it1040-sd100-instruction-booklet.pdf#page=20 + - title: Ohio Revised Code - Section 5747.05 Tax credits. (E) (1) + href: https://codes.ohio.gov/ohio-revised-code/section-5747.05 diff --git a/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/income_threshold.yaml b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/income_threshold.yaml new file mode 100644 index 00000000000..e83ba8845f2 --- /dev/null +++ b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/income_threshold.yaml @@ -0,0 +1,15 @@ +description: Ohio limits the joint filing credit to filers with head and spouse each having at least this adjusted gross income. +values: + 2021-01-01: 500 + +metadata: + period: year + unit: currency-USD + label: Ohio joint filing credit income threshold + reference: + - title: 2021 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/pit-it1040-booklet.pdf#page=20 + - title: 2022 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/it1040-sd100-instruction-booklet.pdf#page=20 + - title: Ohio Revised Code - Section 5747.05 Tax credits. (E) (1) + href: https://codes.ohio.gov/ohio-revised-code/section-5747.05 diff --git a/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/other_non_refundable_credits.yaml b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/other_non_refundable_credits.yaml new file mode 100644 index 00000000000..ef373bcdafa --- /dev/null +++ b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/other_non_refundable_credits.yaml @@ -0,0 +1,21 @@ +description: Ohio provides a joint filing credit equal to a fraction of tax liability less these non-refundable tax credits. +values: + 2021-01-01: + - oh_cdcc # Line 6 + - oh_senior_citizen_credit # Line 3 + - oh_retirement_credit # Line 2 + - oh_exemption_credits # Line 9 + 2023-01-01: + - oh_cdcc # Line 6 + - oh_senior_citizen_credit # Line 3 + - oh_retirement_credit # Line 2 + - oh_exemption_credits # Line 9 +metadata: + unit: list + period: year + label: Ohio non-refundable tax credits prior to the joint filing credit + reference: + - title: 2021 Ohio Schedule of Credits + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/sch-cre.pdf + - title: 2022 Ohio Schedule of Credits + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/itschedule-credits.pdf diff --git a/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/rate.yaml b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/rate.yaml new file mode 100644 index 00000000000..da32ac4afd0 --- /dev/null +++ b/policyengine_us/parameters/gov/states/oh/tax/income/credits/joint_filing/rate.yaml @@ -0,0 +1,32 @@ +description: Ohio provides a joint filing credit equal to this fraction of tax liability less certain non-refundable tax credits, based on the state adjusted gross income less exemptions. +metadata: + threshold_unit: currency-USD + amount_unit: /1 + type: single_amount + period: year + label: Ohio joint filing credit income rate + reference: + - title: 2021 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/pit-it1040-booklet.pdf#page=20 + - title: 2022 Ohio IT 1040 Individual Income Tax Return Form Instructions Line 12 + href: https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/it1040-sd100-instruction-booklet.pdf#page=20 + - title: Ohio Revised Code - Section 5747.05 Tax credits. (E) + href: https://codes.ohio.gov/ohio-revised-code/section-5747.05 + +brackets: + - threshold: + 2021-01-01: 0 + amount: + 2021-01-01: 0.2 + - threshold: + 2021-01-01: 25_000 + amount: + 2021-01-01: 0.15 + - threshold: + 2021-01-01: 50_000 + amount: + 2021-01-01: 0.1 + - threshold: + 2021-01-01: 75_000 + amount: + 2021-01-01: 0.05 diff --git a/policyengine_us/parameters/gov/states/oh/tax/income/credits/non_refundable.yaml b/policyengine_us/parameters/gov/states/oh/tax/income/credits/non_refundable.yaml index 702d92474c4..39002d6e697 100644 --- a/policyengine_us/parameters/gov/states/oh/tax/income/credits/non_refundable.yaml +++ b/policyengine_us/parameters/gov/states/oh/tax/income/credits/non_refundable.yaml @@ -8,6 +8,7 @@ values: - oh_retirement_credit - oh_non_public_school_credits - oh_exemption_credits + - oh_joint_filing_credit 2023-01-01: - oh_eitc - oh_cdcc @@ -15,6 +16,7 @@ values: - oh_retirement_credit - oh_non_public_school_credits - oh_exemption_credits + - oh_joint_filing_credit metadata: unit: list label: Ohio non-refundable tax credits diff --git a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.yaml new file mode 100644 index 00000000000..ed0e5821089 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.yaml @@ -0,0 +1,33 @@ +- name: Eligible for joint filing credit + absolute_error_margin: 0.01 + period: 2021 + input: + oh_joint_filing_credit_eligible: true + oh_agi: 67_000 + oh_personal_exemptions: 10_000 + oh_tax_before_joint_filing_credit: 4_000 + output: + oh_joint_filing_credit: 400 + +- name: Eligible for maximum joint filing credit + absolute_error_margin: 0.01 + period: 2022 + input: + state_code: OH + oh_joint_filing_credit_eligible: true + oh_agi: 47_000 + oh_personal_exemptions: 10_000 + oh_tax_before_joint_filing_credit: 6_000 + output: + oh_joint_filing_credit: 650 + +- name: Not eligible for joint filing credit + absolute_error_margin: 0.01 + period: 2021 + input: + oh_joint_filing_credit_eligible: false + oh_agi: 47_000 + oh_personal_exemptions: 10_000 + oh_tax_before_joint_filing_credit: 4_000 + output: + oh_joint_filing_credit: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.yaml new file mode 100644 index 00000000000..26a0bbc38de --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.yaml @@ -0,0 +1,62 @@ +- name: Income not eligible for joint filing credit + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + oh_alternative_agi: 400 + person2: + is_tax_unit_spouse: true + oh_alternative_agi: 700 + tax_units: + tax_unit: + members: [person1, person2] + filing_status: JOINT + households: + household: + state_code: OH + output: + oh_joint_filing_credit_eligible: false + +- name: Status not eligible for joint filing credit + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + oh_alternative_agi: 600 + person2: + is_tax_unit_spouse: true + oh_alternative_agi: 700 + tax_units: + tax_unit: + members: [person1, person2] + filing_status: HEAD_OF_HOUSEHOLD + households: + household: + state_code: OH + output: + oh_joint_filing_credit_eligible: false + +- name: Eligible for joint filing credit + absolute_error_margin: 0.01 + period: 2021 + input: + people: + person1: + is_tax_unit_head: true + oh_alternative_agi: 600 + person2: + is_tax_unit_spouse: true + oh_alternative_agi: 700 + tax_units: + tax_unit: + members: [person1, person2] + filing_status: JOINT + households: + household: + state_code: OH + output: + oh_joint_filing_credit_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.yaml new file mode 100644 index 00000000000..3dd16eb1261 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.yaml @@ -0,0 +1,17 @@ +- name: Capped at 0 + period: 2022 + input: + oh_income_tax_before_non_refundable_credits: 20 + oh_partial_non_refundable_credits: 30 + state_code: OH + output: + oh_tax_before_joint_filing_credit: 0 + +- name: Reduction + period: 2022 + input: + oh_income_tax_before_non_refundable_credits: 100 + oh_partial_non_refundable_credits: 20 + state_code: OH + output: + oh_tax_before_joint_filing_credit: 80 diff --git a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_non_refundable_credits.yaml similarity index 81% rename from policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_credits.yaml rename to policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_non_refundable_credits.yaml index 1678655ea96..0e9ff54ff4e 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_credits.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_non_refundable_credits.yaml @@ -7,7 +7,7 @@ output: # base amount = $346.16 # + 2.765% of (31_000 - 25_000) = 165.90 - oh_income_tax_before_credits: 512.06 + oh_income_tax_before_non_refundable_credits: 512.06 - name: Single filing, income in 3rd tax bracket period: 2021 @@ -19,4 +19,4 @@ # base amount = 346.16 # + 2.765 of (44_250 - 25_000) = 532.26 # + 3.226% of (64_500 - 44_250) = 653.27 - oh_income_tax_before_credits: 1_531.69 + oh_income_tax_before_non_refundable_credits: 1_531.69 diff --git a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.yaml index 2c8756cde74..5525267ccc6 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.yaml @@ -2,7 +2,7 @@ period: 2021 input: state_code: OH - oh_income_tax_before_credits: 800 + oh_income_tax_before_non_refundable_credits: 800 oh_non_refundable_credits: 900 output: oh_income_tax_before_refundable_credits: 0 @@ -11,7 +11,7 @@ period: 2021 input: state_code: OH - oh_income_tax_before_credits: 800 + oh_income_tax_before_non_refundable_credits: 800 oh_non_refundable_credits: 600 output: oh_income_tax_before_refundable_credits: 200 diff --git a/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_alternative_agi.py b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_alternative_agi.py new file mode 100644 index 00000000000..e576c18a9d3 --- /dev/null +++ b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_alternative_agi.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class oh_alternative_agi(Variable): + value_type = float + entity = Person + label = ( + "Ohio alternative adjusted gross income for the joint filing credit" + ) + unit = USD + definition_period = YEAR + reference = ( + "https://codes.ohio.gov/ohio-revised-code/section-5747.055", + "https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/pit-it1040-booklet.pdf#page=20", + ) + defined_for = StateCode.OH + + adds = ["oh_agi"] + + subtracts = ( + "gov.states.oh.tax.income.credits.joint_filing.agi_subtractions" + ) diff --git a/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.py b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.py new file mode 100644 index 00000000000..1bfb9b275be --- /dev/null +++ b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit.py @@ -0,0 +1,25 @@ +from policyengine_us.model_api import * + + +class oh_joint_filing_credit(Variable): + value_type = float + entity = TaxUnit + label = "Ohio joint filing credit" + unit = USD + definition_period = YEAR + reference = "https://codes.ohio.gov/ohio-revised-code/section-5747.05" + defined_for = "oh_joint_filing_credit_eligible" + + def formula(tax_unit, period, parameters): + tax_before_joint_filing_credit = tax_unit( + "oh_tax_before_joint_filing_credit", period + ) + p = parameters(period).gov.states.oh.tax.income.credits.joint_filing + # Ohio uses MAGI for the credit computation, which is Ohio AGI with + # the addition of the business income deduction, which is currently not included in the model, + # hence, we use the Ohio AGI for the credit computation + oh_agi = tax_unit("oh_agi", period) + exemptions = tax_unit("oh_personal_exemptions", period) + agi_less_exepmtions = max_(oh_agi - exemptions, 0) + percentage = p.rate.calc(agi_less_exepmtions) + return min_(tax_before_joint_filing_credit * percentage, p.cap) diff --git a/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.py b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.py new file mode 100644 index 00000000000..46627613312 --- /dev/null +++ b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_eligible.py @@ -0,0 +1,28 @@ +from policyengine_us.model_api import * + + +class oh_joint_filing_credit_eligible(Variable): + value_type = bool + entity = TaxUnit + label = "Eligible for the Ohio joint filing credit" + definition_period = YEAR + reference = "https://codes.ohio.gov/ohio-revised-code/section-5747.05" + defined_for = StateCode.OH + + def formula(tax_unit, period, parameters): + filing_status = tax_unit("filing_status", period) + person = tax_unit.members + is_head = person("is_tax_unit_head", period) + is_spouse = person("is_tax_unit_spouse", period) + p = parameters(period).gov.states.oh.tax.income.credits.joint_filing + income = person("oh_alternative_agi", period) + # The head and the spouse have to meet the income requirement individually + income_eligible = income >= p.income_threshold + head_eligible = tax_unit.any(is_head & income_eligible) + + spouse_eligible = tax_unit.any(is_spouse & income_eligible) + # The head and the spouse have to meet the income requirement individually + head_and_spouse_eligible = head_eligible & spouse_eligible + + status_eligible = filing_status == filing_status.possible_values.JOINT + return head_and_spouse_eligible & status_eligible diff --git a/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_partial_non_refundable_credits.py b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_partial_non_refundable_credits.py new file mode 100644 index 00000000000..cc467e60d6b --- /dev/null +++ b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_partial_non_refundable_credits.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class oh_partial_non_refundable_credits(Variable): + value_type = float + entity = TaxUnit + label = "Ohio non-refundable credits prior to the joint filing credit" + reference = ( + # 2021 Ohio Schedule of Credits + "https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/sch-cre.pdf", + # 2022 Ohio Schedule of Credits + "https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/itschedule-credits.pdf", + ) + unit = USD + definition_period = YEAR + defined_for = StateCode.OH + + adds = ( + "gov.states.oh.tax.income.credits.joint_filing.non_refundable_credits" + ) diff --git a/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.py b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.py new file mode 100644 index 00000000000..6878f60bfd3 --- /dev/null +++ b/policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_tax_before_joint_filing_credit.py @@ -0,0 +1,23 @@ +from policyengine_us.model_api import * + + +class oh_tax_before_joint_filing_credit(Variable): + value_type = float + entity = TaxUnit + label = "Ohio tax liability before the joint filing credit" + reference = ( + # 2021 Ohio Schedule of Credits + "https://tax.ohio.gov/static/forms/ohio_individual/individual/2021/sch-cre.pdf", + # 2022 Ohio Schedule of Credits + "https://tax.ohio.gov/static/forms/ohio_individual/individual/2022/itschedule-credits.pdf", + ) + unit = USD + definition_period = YEAR + defined_for = StateCode.OH + + def formula(tax_unit, period, parameters): + tax_before_credits = tax_unit( + "oh_income_tax_before_non_refundable_credits", period + ) + total_credits = tax_unit("oh_partial_non_refundable_credits", period) + return max_(0, tax_before_credits - total_credits) diff --git a/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions.py b/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions.py index 142f896bbc0..6911bf2b462 100644 --- a/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions.py +++ b/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions.py @@ -20,6 +20,6 @@ def formula(tax_unit, period, parameters): ) agi = tax_unit("oh_agi", period) - credit_amount = p.amount.calc(agi, right=True) + exemption_amount = p.amount.calc(agi, right=True) - return eligible_exemptions * credit_amount + return eligible_exemptions * exemption_amount diff --git a/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_credits.py b/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_non_refundable_credits.py similarity index 90% rename from policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_credits.py rename to policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_non_refundable_credits.py index 66fdec35302..bad8c4e0df1 100644 --- a/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_credits.py +++ b/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_non_refundable_credits.py @@ -1,7 +1,7 @@ from policyengine_us.model_api import * -class oh_income_tax_before_credits(Variable): +class oh_income_tax_before_non_refundable_credits(Variable): value_type = float entity = TaxUnit label = "Ohio income tax before credits" diff --git a/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.py b/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.py index e87b321b0d0..b3d23e2039c 100644 --- a/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.py +++ b/policyengine_us/variables/gov/states/oh/tax/income/oh_income_tax_before_refundable_credits.py @@ -10,6 +10,8 @@ class oh_income_tax_before_refundable_credits(Variable): defined_for = StateCode.OH def formula(tax_unit, period, parameters): - itax_before_credits = tax_unit("oh_income_tax_before_credits", period) + itax_before_credits = tax_unit( + "oh_income_tax_before_non_refundable_credits", period + ) nonrefundable_credits = tax_unit("oh_non_refundable_credits", period) return max_(0, itax_before_credits - nonrefundable_credits)