From ed4f96461d62b994d8f59d995a7e8510a16b5779 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 06:54:02 -0400 Subject: [PATCH 1/8] Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent A return on which the filer (or, if joint, either spouse) can be claimed as a dependent has no IRC 152 dependents (IRC 152(b)(1)). Arizona's dependent credit, family credit count and income limit, and 2021 families rebate; Arkansas's dependent credit, generic disabled-dependent credit and low-income table; and California's dependent exemption credit now follow that. A claimable filer also loses California's personal, senior and blind credits (RTC 17054, Form 540 lines 7-9), the childless CalEITC and so the foster youth credit (RTC 17052, FTB 3514), and is not counted for Arizona's excise credit (A.R.S. 43-1072.01; Form 140 line 56). California's standard deduction follows its dependent worksheet (RTC 17073.5(c)(2)). California's renter credit excludes a claimable filer who lived in the claimer's home (RTC 17053.5(d)(2)), read from a new input, and its 2025 joint income limit is $107,988. Co-Authored-By: Claude Opus 5.5 --- changelog.d/claimable-filer-az-ar-ca.fixed.md | 1 + .../tax/income/credits/renter/income_cap.yaml | 6 +- ...est_claimable_filer_az_ar_ca_invariants.py | 102 +++++ .../ar_personal_credit_dependent.yaml | 140 ++++++ ...ar_personal_credit_disabled_dependent.yaml | 431 ++++++++++++++++++ .../ar_personal_credits_potential.yaml | 145 ++++++ .../low_income/ar_low_income_tax_joint.yaml | 155 +++++++ .../credits/az_families_tax_rebate.yaml | 148 ++++++ .../az_family_tax_credit_eligible.yaml | 122 +++++ .../az_family_tax_credit_potential.yaml | 148 ++++++ .../az_increased_excise_tax_credit.yaml | 235 ++++++++++ .../az_dependent_tax_credit_potential.yaml | 192 ++++++++ .../earned_income/ca_eitc_eligible.yaml | 274 +++++++++++ .../ca_foster_youth_tax_credit.yaml | 149 ++++++ .../credits/renter/ca_renter_credit.yaml | 217 +++++++++ .../standard/ca_standard_deduction.yaml | 202 ++++++++ .../tax/income/exemptions/ca_exemptions.yaml | 323 +++++++++++++ .../personal/ar_personal_credit_dependent.py | 11 +- .../ar_personal_credit_disabled_dependent.py | 28 +- .../low_income/ar_low_income_tax_joint.py | 11 +- .../income/credits/az_families_tax_rebate.py | 9 +- .../credits/az_increased_excise_tax_credit.py | 28 +- ...az_increased_excise_tax_credit_eligible.py | 14 +- .../az_dependent_tax_credit_potential.py | 12 +- .../az_family_tax_credit_eligible.py | 14 +- .../az_family_tax_credit_potential.py | 19 +- .../ca/tax/income/credits/ca_renter_credit.py | 22 +- .../credits/earned_income/ca_eitc_eligible.py | 16 + .../standard/ca_standard_deduction.py | 32 +- .../ca/tax/income/exemptions/ca_exemptions.py | 41 +- .../person/lives_with_claiming_taxpayer.py | 15 + 31 files changed, 3233 insertions(+), 29 deletions(-) create mode 100644 changelog.d/claimable-filer-az-ar-ca.fixed.md create mode 100644 policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credits_potential.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/foster_youth/ca_foster_youth_tax_credit.yaml create mode 100644 policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py diff --git a/changelog.d/claimable-filer-az-ar-ca.fixed.md b/changelog.d/claimable-filer-az-ar-ca.fixed.md new file mode 100644 index 00000000000..d00a1fad0cb --- /dev/null +++ b/changelog.d/claimable-filer-az-ar-ca.fixed.md @@ -0,0 +1 @@ +Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent. A return on which the filer (or, if joint, either spouse) can be claimed counts no dependents for Arizona's dependent credit, family credit and 2021 families rebate, Arkansas's dependent credit, disabled-dependent credit (except for a filer's own child) and low-income tables, or California's dependent exemption credit, and gets no childless CalEITC or foster youth credit. A claimable filer loses California's personal, senior and blind credits and is not counted for Arizona's excise credit. California's standard deduction follows its dependent worksheet, and its renter credit excludes a claimable filer who lived in the claimer's home (new input `lives_with_claiming_taxpayer`). California's 2025 joint renter credit income limit is now $107,988. diff --git a/policyengine_us/parameters/gov/states/ca/tax/income/credits/renter/income_cap.yaml b/policyengine_us/parameters/gov/states/ca/tax/income/credits/renter/income_cap.yaml index 2ed14a3a3bc..d912a05e840 100644 --- a/policyengine_us/parameters/gov/states/ca/tax/income/credits/renter/income_cap.yaml +++ b/policyengine_us/parameters/gov/states/ca/tax/income/credits/renter/income_cap.yaml @@ -16,19 +16,19 @@ SURVIVING_SPOUSE: 2022-01-01: 98_440 2023-01-01: 101_492 2024-01-01: 104_842 - 2025-01-01: 107_987 + 2025-01-01: 107_988 JOINT: 2021-01-01: 90_896 2022-01-01: 98_440 2023-01-01: 101_492 2024-01-01: 104_842 - 2025-01-01: 107_987 + 2025-01-01: 107_988 HEAD_OF_HOUSEHOLD: 2021-01-01: 90_896 2022-01-01: 98_440 2023-01-01: 101_492 2024-01-01: 104_842 - 2025-01-01: 107_987 + 2025-01-01: 107_988 metadata: period: year diff --git a/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py b/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py new file mode 100644 index 00000000000..af314ccc7f4 --- /dev/null +++ b/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py @@ -0,0 +1,102 @@ +"""Arizona, Arkansas and California rules for a filer who can be claimed as a +dependent. + +Arizona's dependent and family credits, excise credit and 2021 families +rebate, Arkansas's dependent, disabled-dependent and low-income-table rules, +and California's standard deduction, exemption credits, CalEITC, foster youth +credit and renter credit apply IRC 151(d)(2) and 152(b)(1) and each state's +own text. + +For couples drawn by Hypothesis and a seeded population in the three states, +with either, both or neither spouse claimed: + +1. Swap invariance: each output is the same under either head/spouse + labelling. +2. Monotonicity: marking another filer as claimed never raises a credit, + deduction or eligibility below. +3. Identities: a return with a claimable filer gets no Arizona dependent + credit or families rebate and no Arkansas dependent credit, and a return + on which every filer can be claimed gets no Arizona excise credit. +""" + +import numpy as np +import pytest +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st + +from policyengine_us.tests.core.test_claimable_filer_federal_invariants import ( + check_monotone, + check_swap, +) +from policyengine_us.tests.core.test_dependent_elsewhere_head_spouse_swap_invariance import ( + CLAIM_PATTERNS, + _calc, + _crafted_cases, + _seeded_couples, + adults, + dependents, +) + +STATES = ["AZ", "AR", "CA"] +# 2021 covers the Arizona families rebate; 2026 the new Arizona amounts. +YEARS = [2021, 2023, 2025, 2026] +MONOTONE = [ + "az_dependent_tax_credit_potential", + "az_family_tax_credit_eligible", + "az_family_tax_credit_potential", + "az_increased_excise_tax_credit", + "az_families_tax_rebate", + "ar_personal_credits_potential", + "ca_standard_deduction", + "ca_exemptions", + "ca_eitc_eligible", + "ca_eitc", + "ca_foster_youth_tax_credit", + "ca_renter_credit", +] +# Arkansas's tax can rise when the low-income table changes, so it is checked +# only for swap invariance. +OUTPUTS = MONOTONE + [ + "ar_income_tax_before_non_refundable_credits_unit", + "state_income_tax", +] + + +def _identities(sim, year): + claimed_filer = _calc(sim, "head_or_spouse_is_dependent_elsewhere", year) > 0 + every_filer = _calc(sim, "every_filer_is_dependent_elsewhere", year) > 0 + for name in ["az_dependent_tax_credit_potential", "az_families_tax_rebate"]: + assert not _calc(sim, name, year)[claimed_filer].any(), name + ar_dependent = np.asarray( + sim.calculate("ar_personal_credit_dependent", year, map_to="tax_unit") + ) + assert not ar_dependent[claimed_filer].any() + assert not _calc(sim, "az_increased_excise_tax_credit", year)[every_filer].any() + + +@st.composite +def couples(draw): + return { + "state": draw(st.sampled_from(STATES)), + "adults": [draw(adults()), draw(adults())], + "dependents": draw(st.lists(dependents(), max_size=2)), + "claimed": draw(st.sampled_from(CLAIM_PATTERNS)), + } + + +@settings( + max_examples=2, + deadline=None, + derandomize=True, + suppress_health_check=[HealthCheck.too_slow, HealthCheck.data_too_large], +) +@given(st.sampled_from(YEARS), st.lists(couples(), min_size=6, max_size=12)) +def test_az_ar_ca_claimable_filer_rules_are_label_free(year, units): + check_swap(units, year, OUTPUTS, _identities) + + +@pytest.mark.parametrize("year", YEARS) +def test_az_ar_ca_claimable_filer_rules_seeded_population(year): + units = _seeded_couples(STATES, per_state=3) + _crafted_cases(STATES) + check_swap(units, year, OUTPUTS, _identities) + check_monotone(units, year, MONOTONE, _identities) diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.yaml index f06334ba950..4ce8472766a 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.yaml @@ -13,3 +13,143 @@ state_code: AR output: ar_personal_credit_dependent: 0 + +# Ark. Code 26-51-501 gives each dependent a $29 personal credit +# (credits/personal/amount/base.yaml), with "dependent" in the IRC 152 sense. +# A return on which the filer (or, if joint, either spouse) can be claimed as +# a dependent has no dependents (IRC 152(b)(1)). + +- name: 2025 single filer who can be claimed as a dependent gets no dependent credit for a child + period: 2025 + input: + people: + filer: + age: 19 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AR + output: + ar_personal_credit_dependent: [0, 0] + +- name: 2025 single filer who cannot be claimed gets the dependent credit for a child + period: 2025 + input: + people: + filer: + age: 19 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AR + output: + ar_personal_credit_dependent: [0, 29] + +- name: 2025 joint return with one claimable spouse gets no dependent credit for a child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_personal_credit_dependent: [0, 0, 0] + +- name: 2025 joint return with one claimable spouse gets no dependent credit for a child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: AR + output: + ar_personal_credit_dependent: [0, 0, 0] + +- name: 2025 joint return with both spouses claimable gets no dependent credit for a child + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_personal_credit_dependent: [0, 0, 0] + +- name: 2025 joint return with neither spouse claimable gets the dependent credit for a child + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_personal_credit_dependent: [0, 0, 29] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml index 96a04e415cc..952521f188b 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml @@ -24,3 +24,434 @@ state_code: AR output: ar_personal_credit_disabled_dependent: 500 + +# Act 417 of 1999 covers an individual who is "a child of the taxpayer's +# blood, an adopted child, or a dependent" in the IRC 152 sense, $500 each +# (credits/personal/amount/disabled_dependent.yaml). A return on which the +# filer (or, if joint, either spouse) can be claimed has no IRC 152 +# dependents (IRC 152(b)(1)), so only the filers' own children qualify. Parent +# ids say whose child the dependent is; id 99 is an absent parent. + +- name: 2025 single filer who can be claimed as a dependent gets no credit for a disabled dependent who is not their child + period: 2025 + input: + people: + filer: + age: 19 + person_id: 1 + claimed_as_dependent_on_another_return: true + dependent: + age: 30 + person_id: 3 + is_disabled: true + parent_1_id: 99 + tax_units: + tax_unit: + members: [filer, dependent] + filing_status: SINGLE + households: + household: + members: [filer, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0] + +- name: 2025 single filer who cannot be claimed gets the credit for a disabled dependent who is not their child + period: 2025 + input: + people: + filer: + age: 19 + person_id: 1 + dependent: + age: 30 + person_id: 3 + is_disabled: true + parent_1_id: 99 + tax_units: + tax_unit: + members: [filer, dependent] + filing_status: SINGLE + households: + household: + members: [filer, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 500] + +- name: 2025 joint return with one claimable spouse gets no credit for a disabled dependent who is not their child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + person_id: 1 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + person_id: 2 + is_tax_unit_head: false + is_tax_unit_spouse: true + dependent: + age: 30 + person_id: 3 + is_disabled: true + parent_1_id: 99 + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 0] + +- name: 2025 joint return with one claimable spouse gets no credit for a disabled dependent who is not their child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + person_id: 2 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + person_id: 1 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + dependent: + age: 30 + person_id: 3 + is_disabled: true + parent_1_id: 99 + tax_units: + tax_unit: + members: [person_b, person_a, dependent] + filing_status: JOINT + households: + household: + members: [person_b, person_a, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 0] + +- name: 2025 joint return with both spouses claimable gets no credit for a disabled dependent who is not their child + period: 2025 + input: + people: + person_a: + age: 20 + person_id: 1 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + person_id: 2 + claimed_as_dependent_on_another_return: true + dependent: + age: 30 + person_id: 3 + is_disabled: true + parent_1_id: 99 + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 0] + +- name: 2025 joint return with neither spouse claimable gets the credit for a disabled dependent who is not their child + period: 2025 + input: + people: + person_a: + age: 20 + person_id: 1 + person_b: + age: 22 + person_id: 2 + dependent: + age: 30 + person_id: 3 + is_disabled: true + parent_1_id: 99 + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 single filer who can be claimed as a dependent keeps the credit for their own disabled child + period: 2025 + input: + people: + filer: + age: 19 + person_id: 1 + claimed_as_dependent_on_another_return: true + dependent: + age: 8 + person_id: 3 + is_disabled: true + parent_1_id: 1 + tax_units: + tax_unit: + members: [filer, dependent] + filing_status: SINGLE + households: + household: + members: [filer, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 500] + +- name: 2025 joint return with one claimable spouse keeps the credit for a spouse's own disabled child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + person_id: 1 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + person_id: 2 + is_tax_unit_head: false + is_tax_unit_spouse: true + dependent: + age: 8 + person_id: 3 + is_disabled: true + parent_1_id: 1 + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 joint return with one claimable spouse keeps the credit for a spouse's own disabled child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + person_id: 2 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + person_id: 1 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + dependent: + age: 8 + person_id: 3 + is_disabled: true + parent_1_id: 1 + tax_units: + tax_unit: + members: [person_b, person_a, dependent] + filing_status: JOINT + households: + household: + members: [person_b, person_a, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 joint return with both spouses claimable keeps the credit for a spouse's own disabled child + period: 2025 + input: + people: + person_a: + age: 20 + person_id: 1 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + person_id: 2 + claimed_as_dependent_on_another_return: true + dependent: + age: 8 + person_id: 3 + is_disabled: true + parent_1_id: 1 + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 joint return with neither spouse claimable gets the credit for a spouse's own disabled child + period: 2025 + input: + people: + person_a: + age: 20 + person_id: 1 + person_b: + age: 22 + person_id: 2 + dependent: + age: 8 + person_id: 3 + is_disabled: true + parent_1_id: 1 + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 single filer who can be claimed as a dependent keeps the credit when no parent ids say whose child the disabled dependent is + period: 2025 + input: + people: + filer: + age: 19 + claimed_as_dependent_on_another_return: true + dependent: + age: 8 + is_disabled: true + tax_units: + tax_unit: + members: [filer, dependent] + filing_status: SINGLE + households: + household: + members: [filer, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 500] + +- name: 2025 joint return with one claimable spouse keeps the credit when no parent ids say whose child the disabled dependent is (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + dependent: + age: 8 + is_disabled: true + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 joint return with one claimable spouse keeps the credit when no parent ids say whose child the disabled dependent is (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + dependent: + age: 8 + is_disabled: true + tax_units: + tax_unit: + members: [person_b, person_a, dependent] + filing_status: JOINT + households: + household: + members: [person_b, person_a, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 joint return with both spouses claimable keeps the credit when no parent ids say whose child the disabled dependent is + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + dependent: + age: 8 + is_disabled: true + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 joint return with neither spouse claimable gets the credit for a disabled dependent without parent ids + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + dependent: + age: 8 + is_disabled: true + tax_units: + tax_unit: + members: [person_a, person_b, dependent] + filing_status: JOINT + households: + household: + members: [person_a, person_b, dependent] + state_code: AR + output: + ar_personal_credit_disabled_dependent: [0, 0, 500] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credits_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credits_potential.yaml new file mode 100644 index 00000000000..abc7b630d00 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credits_potential.yaml @@ -0,0 +1,145 @@ +# Each taxpayer and spouse keeps their own $29 personal credit +# ("Each taxpayer and spouse is entitled to one personal tax credit", AR1000F +# instructions) when another taxpayer can claim them; only the dependents' +# credits go (IRC 152(b)(1)). The filers are 30, so no aged credits apply. + +- name: 2025 single filer who can be claimed as a dependent keeps their own personal credit + period: 2025 + input: + people: + filer: + age: 30 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AR + output: + # $29 x 1. + ar_personal_credits_potential: 29 + +- name: 2025 single filer who cannot be claimed gets credits for the filer and the child + period: 2025 + input: + people: + filer: + age: 30 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AR + output: + # $29 x 2. + ar_personal_credits_potential: 58 + +- name: 2025 joint return with one claimable spouse keeps both spouses' personal credits (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + # $29 x 2. + ar_personal_credits_potential: 58 + +- name: 2025 joint return with one claimable spouse keeps both spouses' personal credits (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 30 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: AR + output: + # $29 x 2. + ar_personal_credits_potential: 58 + +- name: 2025 joint return with both spouses claimable keeps both spouses' personal credits + period: 2025 + input: + people: + person_a: + age: 30 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + # $29 x 2. + ar_personal_credits_potential: 58 + +- name: 2025 joint return with neither spouse claimable gets credits for both spouses and the child + period: 2025 + input: + people: + person_a: + age: 30 + person_b: + age: 30 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + # $29 x 3. + ar_personal_credits_potential: 87 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.yaml index 49e11429e8b..de155b8ed0a 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.yaml @@ -583,3 +583,158 @@ output: ar_low_income_tax_joint: [92, 104] ar_income_tax_before_non_refundable_credits_joint: [92, 104] + +# The low-income tax tables for joint filers differ by whether there are two +# or more dependents, counted in the IRC 152 sense. A joint return on which +# either spouse can be claimed has no dependents (IRC 152(b)(1)), so it uses +# the no-or-one-dependent table: $222 at $26,050 of AGI +# (low_income_tax_tables/joint/no_or_one_dependent.yaml) instead of $0 on the +# two-or-more table. The tax is attributed to the head, listed first. + +- name: 2025 joint return with one claimable spouse with two children uses the no-or-one-dependent table (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + ar_agi_joint: 26_050 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + ar_agi_joint: 0 + is_tax_unit_head: false + is_tax_unit_spouse: true + child_1: + age: 5 + ar_agi_joint: 0 + child_2: + age: 8 + ar_agi_joint: 0 + tax_units: + tax_unit: + members: [person_a, person_b, child_1, child_2] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child_1, child_2] + state_code: AR + output: + ar_low_income_tax_joint: [222, 0, 0, 0] + +- name: 2025 joint return with one claimable spouse with two children uses the no-or-one-dependent table (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + ar_agi_joint: 0 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + ar_agi_joint: 26_050 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child_1: + age: 5 + ar_agi_joint: 0 + child_2: + age: 8 + ar_agi_joint: 0 + tax_units: + tax_unit: + members: [person_b, person_a, child_1, child_2] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child_1, child_2] + state_code: AR + output: + ar_low_income_tax_joint: [222, 0, 0, 0] + +- name: 2025 joint return with both spouses claimable with two children uses the no-or-one-dependent table + period: 2025 + input: + people: + person_a: + age: 20 + ar_agi_joint: 26_050 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + ar_agi_joint: 0 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child_1: + age: 5 + ar_agi_joint: 0 + child_2: + age: 8 + ar_agi_joint: 0 + tax_units: + tax_unit: + members: [person_a, person_b, child_1, child_2] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child_1, child_2] + state_code: AR + output: + ar_low_income_tax_joint: [222, 0, 0, 0] + +- name: 2025 joint return with neither spouse claimable with two children uses the two-or-more-dependent table + period: 2025 + input: + people: + person_a: + age: 20 + ar_agi_joint: 26_050 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + ar_agi_joint: 0 + is_tax_unit_head: false + is_tax_unit_spouse: true + child_1: + age: 5 + ar_agi_joint: 0 + child_2: + age: 8 + ar_agi_joint: 0 + tax_units: + tax_unit: + members: [person_a, person_b, child_1, child_2] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child_1, child_2] + state_code: AR + output: + ar_low_income_tax_joint: [0, 0, 0, 0] + +- name: 2025 single filer who can be claimed as a dependent uses the single table + period: 2025 + input: + people: + filer: + age: 19 + ar_agi_joint: 15_050 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: AR + output: + # low_income_tax_tables/single.yaml: $54 at $15,050. + ar_low_income_tax_joint: 54 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml index b64a35ac376..422254c510c 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml @@ -325,3 +325,151 @@ # and would wrongly pay $250, so this case fails without it. Also closes the # sub-$1 boundary (0.99 vs the 1.00 kept-rebate case above). az_families_tax_rebate: 0 + +# Laws 2023, ch. 147, sec. 3(A) and (D): the rebate goes to a taxpayer who +# "claimed a dependent tax credit under section 43-1073.01" on the 2021 +# return, $250 for each such dependent under 17. That credit needs an IRC 152 +# dependent, and a 2021 return on which the filer (or, if joint, either +# spouse) can be claimed as a dependent has none (IRC 152(b)(1)). The filers +# have enough income for at least $1 of 2021 Arizona tax liability. + +- name: 2021 single filer who can be claimed as a dependent gets no rebate for a child + period: 2021 + input: + people: + filer: + age: 20 + employment_income: 40_000 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AZ + output: + az_families_tax_rebate: 0 + +- name: 2021 single filer who cannot be claimed gets the rebate for a child + period: 2021 + input: + people: + filer: + age: 20 + employment_income: 40_000 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AZ + output: + az_families_tax_rebate: 250 + +- name: 2021 joint return with one claimable spouse gets no rebate for a child (the claimable spouse is the head) + period: 2021 + input: + people: + person_a: + age: 20 + employment_income: 40_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_families_tax_rebate: 0 + +- name: 2021 joint return with one claimable spouse gets no rebate for a child (the claimable spouse is the spouse) + period: 2021 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + employment_income: 40_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: AZ + output: + az_families_tax_rebate: 0 + +- name: 2021 joint return with both spouses claimable gets no rebate for a child + period: 2021 + input: + people: + person_a: + age: 20 + employment_income: 40_000 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_families_tax_rebate: 0 + +- name: 2021 joint return with neither spouse claimable gets the rebate for a child + period: 2021 + input: + people: + person_a: + age: 20 + employment_income: 40_000 + person_b: + age: 22 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_families_tax_rebate: 250 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_eligible.yaml index c1261a443de..c375174bf1b 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_eligible.yaml @@ -85,3 +85,125 @@ tax_unit_dependents: 2 output: az_family_tax_credit_eligible: false + +# A.R.S. 43-1073(A) sets the income limit by the number of dependents, in the +# IRC 152 sense (A.R.S. 43-1001(3)). A joint return on which either spouse +# can be claimed has no dependents (IRC 152(b)(1)), so it uses the $20,000 +# limit for "not more than one dependent" rather than $23,600 for two. +# Income is Arizona AGI plus the exemptions subtracted under 43-1023. + +- name: 2025 joint return with one claimable spouse uses the no-dependent family credit income limit (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + child_1: + age: 5 + child_2: + age: 8 + tax_units: + tax_unit: + members: [person_a, person_b, child_1, child_2] + filing_status: JOINT + az_agi: 22_500 + az_exemptions: 0 + households: + household: + members: [person_a, person_b, child_1, child_2] + state_code: AZ + output: + # $22,500 > $20,000. + az_family_tax_credit_eligible: false + +- name: 2025 joint return with one claimable spouse uses the no-dependent family credit income limit (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child_1: + age: 5 + child_2: + age: 8 + tax_units: + tax_unit: + members: [person_b, person_a, child_1, child_2] + filing_status: JOINT + az_agi: 22_500 + az_exemptions: 0 + households: + household: + members: [person_b, person_a, child_1, child_2] + state_code: AZ + output: + # $22,500 > $20,000. + az_family_tax_credit_eligible: false + +- name: 2025 joint return with both spouses claimable uses the no-dependent family credit income limit + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + child_1: + age: 5 + child_2: + age: 8 + tax_units: + tax_unit: + members: [person_a, person_b, child_1, child_2] + filing_status: JOINT + az_agi: 22_500 + az_exemptions: 0 + households: + household: + members: [person_a, person_b, child_1, child_2] + state_code: AZ + output: + # $22,500 > $20,000. + az_family_tax_credit_eligible: false + +- name: 2025 joint return with neither spouse claimable uses the two-dependent family credit income limit + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + child_1: + age: 5 + child_2: + age: 8 + tax_units: + tax_unit: + members: [person_a, person_b, child_1, child_2] + filing_status: JOINT + az_agi: 22_500 + az_exemptions: 0 + households: + household: + members: [person_a, person_b, child_1, child_2] + state_code: AZ + output: + # $22,500 <= $23,600. + az_family_tax_credit_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml new file mode 100644 index 00000000000..ac919a722fc --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml @@ -0,0 +1,148 @@ +# A.R.S. 43-1073(B): $40 "for each person who is a resident of this state and +# who is either the taxpayer, the taxpayer's spouse who does not file a return +# or a dependent", capped at $120 single and $240 joint +# (family_tax_credits/amount). A filer who can be claimed as a dependent still +# counts as the taxpayer, but "dependent" has the IRC 152 meaning (A.R.S. +# 43-1001(3)), so a return on which either filer can be claimed counts no +# dependents (IRC 152(b)(1)). + +- name: 2025 single filer who can be claimed as a dependent counts only the filer, not the child + period: 2025 + input: + people: + filer: + age: 19 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AZ + output: + # $40 x 1. + az_family_tax_credit_potential: 40 + +- name: 2025 single filer who cannot be claimed counts the filer and the child + period: 2025 + input: + people: + filer: + age: 19 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AZ + output: + # $40 x 2. + az_family_tax_credit_potential: 80 + +- name: 2025 joint return with one claimable spouse counts both spouses but not the child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + # $40 x 2. + az_family_tax_credit_potential: 80 + +- name: 2025 joint return with one claimable spouse counts both spouses but not the child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: AZ + output: + # $40 x 2. + az_family_tax_credit_potential: 80 + +- name: 2025 joint return with both spouses claimable still counts both spouses + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + # $40 x 2. + az_family_tax_credit_potential: 80 + +- name: 2025 joint return with neither spouse claimable counts both spouses and the child + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + # $40 x 3. + az_family_tax_credit_potential: 120 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml index e7d2353bfd8..98eab030ab9 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml @@ -113,3 +113,238 @@ tax_unit_size: 4 output: az_increased_excise_tax_credit: 0 + +# A.R.S. 43-1072.01 allows $25 "for each person ... for whom a personal or +# dependent exemption is allowed", up to $100, but only "for a taxpayer who is +# not claimed as a dependent by any other taxpayer". The Form 140 line 56 +# worksheet counts the filers and the dependents "provided that person(s) +# qualifies as a dependent for federal purposes", and the instructions let a +# joint filer claim the credit but not for a spouse who is barred. So a filer +# who can be claimed is not counted, and a return on which either filer can +# be claimed counts no dependents (IRC 152(b)(1)). Income is zero. + +- name: 2025 single filer who can be claimed as a dependent gets no excise credit + period: 2025 + input: + people: + filer: + age: 19 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: AZ + output: + az_increased_excise_tax_credit: 0 + +- name: 2025 single filer who cannot be claimed gets the excise credit for the filer + period: 2025 + input: + people: + filer: + age: 19 + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: AZ + output: + # $25 x 1. + az_increased_excise_tax_credit: 25 + +- name: 2025 joint return with one claimable spouse gets the excise credit only for the other spouse (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: AZ + output: + # $25 x 1. + az_increased_excise_tax_credit: 25 + +- name: 2025 joint return with one claimable spouse gets the excise credit only for the other spouse (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + households: + household: + members: [person_b, person_a] + state_code: AZ + output: + # $25 x 1. + az_increased_excise_tax_credit: 25 + +- name: 2025 joint return with both spouses claimable gets no excise credit + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: AZ + output: + az_increased_excise_tax_credit: 0 + +- name: 2025 joint return with neither spouse claimable gets the excise credit for both spouses + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: AZ + output: + # $25 x 2. + az_increased_excise_tax_credit: 50 + +- name: 2025 joint return with one claimable spouse with a child gets the excise credit only for the other spouse (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + # $25 x 1; the child is not counted. + az_increased_excise_tax_credit: 25 + +- name: 2025 joint return with one claimable spouse with a child gets the excise credit only for the other spouse (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: AZ + output: + # $25 x 1; the child is not counted. + az_increased_excise_tax_credit: 25 + +- name: 2025 joint return with both spouses claimable with a child gets no excise credit + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_increased_excise_tax_credit: 0 + +- name: 2025 joint return with neither spouse claimable with a child gets the excise credit for both spouses and the child + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + # $25 x 3. + az_increased_excise_tax_credit: 75 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml new file mode 100644 index 00000000000..40d42d87826 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml @@ -0,0 +1,192 @@ +# A.R.S. 43-1073.01 grants the credit for each dependent, and A.R.S. +# 43-1001(3) gives "dependent" the IRC 152 meaning. Under IRC 152(b)(1) a +# return on which the filer (or, if joint, either spouse) can be claimed as a +# dependent has no dependents. Amounts: $100 per dependent under 17 through +# 2025 and $125 from 2026 (dependent_credit/amount.yaml); no reduction below +# $200,000 single / $400,000 joint AGI. + +- name: 2025 single filer who can be claimed as a dependent gets no credit for a child + period: 2025 + input: + people: + filer: + age: 19 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + adjusted_gross_income: 10_000 + households: + household: + members: [filer, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 0 + +- name: 2025 single filer who cannot be claimed gets $100 for a child + period: 2025 + input: + people: + filer: + age: 19 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + adjusted_gross_income: 10_000 + households: + household: + members: [filer, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 100 + +- name: 2025 joint return with one claimable spouse gets no dependent credit (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + adjusted_gross_income: 10_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 0 + +- name: 2025 joint return with one claimable spouse gets no dependent credit (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + adjusted_gross_income: 10_000 + households: + household: + members: [person_b, person_a, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 0 + +- name: 2025 joint return with both spouses claimable gets no dependent credit + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + adjusted_gross_income: 10_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 0 + +- name: 2025 joint return with neither spouse claimable gets $100 for a child + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + adjusted_gross_income: 10_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 100 + +- name: 2026 joint return with one claimable spouse gets no dependent credit + period: 2026 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + adjusted_gross_income: 10_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 0 + +- name: 2026 joint return with neither spouse claimable gets $125 for a child + period: 2026 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + adjusted_gross_income: 10_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 125 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.yaml index 8566120cea5..b1358ec8207 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.yaml @@ -161,3 +161,277 @@ state_code: CA output: ca_eitc_eligible: true + +# RTC 17052 keeps the IRC 32(c)(1)(A)(ii)(III) rule that a filer without a +# qualifying child must not be another taxpayer's dependent (FTB 3514, Step 4, +# question f). FTB 3514 skips that question on a joint return, since a married +# filer can be claimed only when the joint return seeks just a refund of +# withholding; as for the federal credit, a joint return on which either +# spouse can be claimed gets no credit without a qualifying child. A filer +# with a qualifying child is not barred. + +- name: 2025 single filer who can be claimed as a dependent without a qualifying child is ineligible + period: 2025 + input: + people: + filer: + age: 25 + employment_income: 1_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_eitc_eligible: false + ca_eitc: 0 + +- name: 2025 single filer who cannot be claimed without a qualifying child is eligible + period: 2025 + input: + people: + filer: + age: 25 + employment_income: 1_000 + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # $1,000 x 7.65% x 0.85. + ca_eitc_eligible: true + ca_eitc: 65.025 + +- name: 2025 joint return with one claimable spouse without a qualifying child is ineligible (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 25 + employment_income: 500 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 25 + employment_income: 500 + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_eitc_eligible: false + ca_eitc: 0 + +- name: 2025 joint return with one claimable spouse without a qualifying child is ineligible (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 25 + employment_income: 500 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 25 + employment_income: 500 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + households: + household: + members: [person_b, person_a] + state_code: CA + output: + ca_eitc_eligible: false + ca_eitc: 0 + +- name: 2025 joint return with both spouses claimable without a qualifying child is ineligible + period: 2025 + input: + people: + person_a: + age: 25 + employment_income: 500 + claimed_as_dependent_on_another_return: true + person_b: + age: 25 + employment_income: 500 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_eitc_eligible: false + ca_eitc: 0 + +- name: 2025 joint return with neither spouse claimable without a qualifying child is eligible + period: 2025 + input: + people: + person_a: + age: 25 + employment_income: 500 + person_b: + age: 25 + employment_income: 500 + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + # $1,000 x 7.65% x 0.85. + ca_eitc_eligible: true + ca_eitc: 65.025 + +- name: 2025 single filer who can be claimed as a dependent but has a qualifying child stays eligible + period: 2025 + input: + people: + filer: + age: 20 + employment_income: 1_000 + claimed_as_dependent_on_another_return: true + child: + age: 3 + tax_units: + tax_unit: + members: [filer, child] + filing_status: HEAD_OF_HOUSEHOLD + households: + household: + members: [filer, child] + state_code: CA + output: + ca_eitc_eligible: true + +- name: 2025 joint return with one claimable spouse with a qualifying child stays eligible (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 500 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + employment_income: 500 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 3 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_eitc_eligible: true + +- name: 2025 joint return with one claimable spouse with a qualifying child stays eligible (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + employment_income: 500 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + employment_income: 500 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 3 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: CA + output: + ca_eitc_eligible: true + +- name: 2025 joint return with both spouses claimable with a qualifying child stays eligible + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 500 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + employment_income: 500 + claimed_as_dependent_on_another_return: true + child: + age: 3 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_eitc_eligible: true + +- name: 2025 joint return with neither spouse claimable with a qualifying child is eligible + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 500 + person_b: + age: 22 + employment_income: 500 + child: + age: 3 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_eitc_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/foster_youth/ca_foster_youth_tax_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/foster_youth/ca_foster_youth_tax_credit.yaml new file mode 100644 index 00000000000..9e97727fbbb --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/foster_youth/ca_foster_youth_tax_credit.yaml @@ -0,0 +1,149 @@ +# The foster youth tax credit requires CalEITC eligibility (RTC 17052.2; +# FTB 3514 instructions), so a childless filer who can be claimed as a +# dependent, or a joint return on which either spouse can be, gets none. +# $1,189 per former foster youth aged 18-25 in 2025; earnings are below the +# phase-out start. + +- name: 2025 single filer who can be claimed as a dependent gets no foster youth credit without a qualifying child + period: 2025 + input: + people: + filer: + age: 20 + employment_income: 1_000 + was_in_foster_care: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_foster_youth_tax_credit: 0 + +- name: 2025 single filer who cannot be claimed gets the foster youth credit + period: 2025 + input: + people: + filer: + age: 20 + employment_income: 1_000 + was_in_foster_care: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_foster_youth_tax_credit: 1_189 + +- name: 2025 joint return with one claimable spouse gets no foster youth credit without a qualifying child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 500 + was_in_foster_care: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 20 + employment_income: 500 + was_in_foster_care: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_foster_youth_tax_credit: 0 + +- name: 2025 joint return with one claimable spouse gets no foster youth credit without a qualifying child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 20 + employment_income: 500 + was_in_foster_care: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + employment_income: 500 + was_in_foster_care: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + households: + household: + members: [person_b, person_a] + state_code: CA + output: + ca_foster_youth_tax_credit: 0 + +- name: 2025 joint return with both spouses claimable gets no foster youth credit without a qualifying child + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 500 + was_in_foster_care: true + claimed_as_dependent_on_another_return: true + person_b: + age: 20 + employment_income: 500 + was_in_foster_care: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_foster_youth_tax_credit: 0 + +- name: 2025 joint return with neither spouse claimable gets the foster youth credit for both spouses + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 500 + was_in_foster_care: true + person_b: + age: 20 + employment_income: 500 + was_in_foster_care: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + # 2 x $1,189. + ca_foster_youth_tax_credit: 2_378 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml index b0191cde7ff..cce211742cf 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml @@ -47,3 +47,220 @@ rent: 0 output: ca_renter_credit: 0 + +# RTC 17053.5(d)(2): a qualified renter does not include "an individual whose +# principal place of residence for more than 50 percent of the taxable year is +# with another person who claimed that individual as a dependent". The 2025 +# qualification record asks "Can you be claimed as a dependent ..." and then +# "did you live in the home of the person who can claim you as a dependent?" +# Being claimable alone does not bar the credit. Spouses filing jointly get +# one $120 credit when either is a qualified renter (17053.5(a)(1)(A)). +# Single filers get $60. California AGI is $2,000 and rent $6,000. + +- name: 2025 single filer who can be claimed as a dependent who lived in the claimer's home gets no renter credit + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + rent: 6_000 + lives_with_claiming_taxpayer: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_renter_credit: 0 + +- name: 2025 single filer who cannot be claimed who reports living with a claimer is still a qualified renter + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + rent: 6_000 + lives_with_claiming_taxpayer: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_renter_credit: 60 + +- name: 2025 joint return with one claimable spouse who lived in the claimer's home keeps the joint renter credit through the other spouse (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 2_000 + rent: 6_000 + lives_with_claiming_taxpayer: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + lives_with_claiming_taxpayer: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_renter_credit: 120 + +- name: 2025 joint return with one claimable spouse who lived in the claimer's home keeps the joint renter credit through the other spouse (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + lives_with_claiming_taxpayer: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + employment_income: 2_000 + rent: 6_000 + lives_with_claiming_taxpayer: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + households: + household: + members: [person_b, person_a] + state_code: CA + output: + ca_renter_credit: 120 + +- name: 2025 joint return with both spouses claimable who both lived in the claimers' homes get no renter credit + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 2_000 + rent: 6_000 + lives_with_claiming_taxpayer: true + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + lives_with_claiming_taxpayer: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_renter_credit: 0 + +- name: 2025 joint return with neither spouse claimable gets the joint renter credit + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 2_000 + rent: 6_000 + lives_with_claiming_taxpayer: true + person_b: + age: 22 + lives_with_claiming_taxpayer: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_renter_credit: 120 + +- name: 2025 single filer who can be claimed as a dependent but lived elsewhere gets the renter credit + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + rent: 6_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_renter_credit: 60 + +- name: 2025 joint return at the $107,988 income limit gets the renter credit + period: 2025 + input: + people: + person_a: + age: 40 + rent: 6_000 + person_b: + age: 40 + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + ca_agi: 107_988 + households: + household: + members: [person_a, person_b] + state_code: CA + output: + # 2025 qualification record, question 2: $107,988 or less if married/RDP filing jointly. + ca_renter_credit: 120 + +- name: 2025 joint return above the $107,988 income limit gets no renter credit + period: 2025 + input: + people: + person_a: + age: 40 + rent: 6_000 + person_b: + age: 40 + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + ca_agi: 107_989 + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_renter_credit: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml index 3ebfd55dca1..0440cde47fc 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml @@ -13,3 +13,205 @@ filing_status: JOINT output: ca_standard_deduction: 9_606 + +# RTC 17073.5 and the Form 540 "California Standard Deduction Worksheet for +# Dependents", used "only if your parent, or someone else, can claim you (or +# your spouse/RDP) as a dependent": the smaller of the California amount +# ($5,706 single, $11,412 joint in 2025) and the larger of $1,350 or earned +# income plus $450 (federal dependent amounts, gov.irs.deductions.standard +# .dependent). The filers have $2,000 of wages in total. + +- name: 2025 single filer who can be claimed as a dependent uses the dependent worksheet + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # max($1,350, $2,000 + $450) = $2,450 < $5,706. + ca_standard_deduction: 2_450 + +- name: 2025 single filer who cannot be claimed gets the full standard deduction + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_standard_deduction: 5_706 + +- name: 2025 joint return with one claimable spouse uses the dependent worksheet (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 1_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + employment_income: 1_000 + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + # max($1,350, $2,000 + $450) = $2,450 < $11,412. + ca_standard_deduction: 2_450 + +- name: 2025 joint return with one claimable spouse uses the dependent worksheet (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + employment_income: 1_000 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + employment_income: 1_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + households: + household: + members: [person_b, person_a] + state_code: CA + output: + # max($1,350, $2,000 + $450) = $2,450 < $11,412. + ca_standard_deduction: 2_450 + +- name: 2025 joint return with both spouses claimable uses the dependent worksheet + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 1_000 + claimed_as_dependent_on_another_return: true + person_b: + age: 22 + employment_income: 1_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + # max($1,350, $2,000 + $450) = $2,450 < $11,412. + ca_standard_deduction: 2_450 + +- name: 2025 joint return with neither spouse claimable gets the full standard deduction + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 1_000 + person_b: + age: 22 + employment_income: 1_000 + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_standard_deduction: 11_412 + +- name: 2025 single filer who can be claimed and has no earned income gets the $1,350 minimum + period: 2025 + input: + people: + filer: + age: 19 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_standard_deduction: 1_350 + +- name: 2025 single filer who can be claimed and has high earnings is capped at the California amount + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 10_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # min($5,706, $10,000 + $450). + ca_standard_deduction: 5_706 + +- name: 2021 single filer who can be claimed uses the 2021 dependent amounts + period: 2021 + input: + people: + filer: + age: 19 + employment_income: 3_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # min($4,803, max($1,100, $3,000 + $350)). + ca_standard_deduction: 3_350 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/exemptions/ca_exemptions.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/exemptions/ca_exemptions.yaml index 648ed555e86..b2fcc60caa2 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/exemptions/ca_exemptions.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/exemptions/ca_exemptions.yaml @@ -39,3 +39,326 @@ state_code: CA output: ca_exemptions: 658 + +# RTC 17054 and the Form 540 line 6-10 instructions: a filer whom another +# taxpayer can claim gets no personal, blind or senior credit (line 7 enters +# 0 for a single or head of household filer, and on a joint return 1 when only +# one spouse can be claimed and 0 when both can), and the dependents must be +# federal dependents, of which such a return has none (IRC 152(b)(1)). 2025 +# amounts: $153 per personal, blind or senior credit and $475 per dependent; +# income is zero, so nothing phases out. + +- name: 2025 single filer who can be claimed as a dependent with a child gets no exemption credits + period: 2025 + input: + people: + filer: + age: 30 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: CA + output: + ca_exemptions: 0 + +- name: 2025 single filer who cannot be claimed with a child gets the personal and dependent credits + period: 2025 + input: + people: + filer: + age: 30 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: CA + output: + # $153 + $475. + ca_exemptions: 628 + +- name: 2025 joint return with one claimable spouse with a child gets only the other spouse's personal credit (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_exemptions: 153 + +- name: 2025 joint return with one claimable spouse with a child gets only the other spouse's personal credit (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 30 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: CA + output: + ca_exemptions: 153 + +- name: 2025 joint return with both spouses claimable with a child gets no exemption credits + period: 2025 + input: + people: + person_a: + age: 30 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_exemptions: 0 + +- name: 2025 joint return with neither spouse claimable with a child gets two personal credits and a dependent credit + period: 2025 + input: + people: + person_a: + age: 30 + person_b: + age: 30 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + # 2 x $153 + $475. + ca_exemptions: 781 + +- name: 2025 single filer who can be claimed as a dependent aged 70 and blind gets no personal, senior or blind credit + period: 2025 + input: + people: + filer: + age: 70 + is_blind: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + ca_exemptions: 0 + +- name: 2025 single filer who cannot be claimed aged 70 and blind gets personal, senior and blind credits + period: 2025 + input: + people: + filer: + age: 70 + is_blind: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # 3 x $153. + ca_exemptions: 459 + +- name: 2025 joint return with one claimable spouse both aged 70 and blind keeps only the other spouse's three credits (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 70 + is_blind: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 70 + is_blind: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + # 3 x $153. + ca_exemptions: 459 + +- name: 2025 joint return with one claimable spouse both aged 70 and blind keeps only the other spouse's three credits (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 70 + is_blind: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 70 + is_blind: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + households: + household: + members: [person_b, person_a] + state_code: CA + output: + # 3 x $153. + ca_exemptions: 459 + +- name: 2025 joint return with both spouses claimable both aged 70 and blind gets no exemption credits + period: 2025 + input: + people: + person_a: + age: 70 + is_blind: true + claimed_as_dependent_on_another_return: true + person_b: + age: 70 + is_blind: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_exemptions: 0 + +- name: 2025 joint return with neither spouse claimable both aged 70 and blind gets six credits + period: 2025 + input: + people: + person_a: + age: 70 + is_blind: true + person_b: + age: 70 + is_blind: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + # 6 x $153. + ca_exemptions: 918 + +- name: 2025 single filer who can be claimed as a dependent filing as head of household gets no exemption credits + period: 2025 + input: + people: + filer: + age: 30 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: HEAD_OF_HOUSEHOLD + households: + household: + members: [filer, child] + state_code: CA + output: + # Line 7 instructions: head of household, enter -0-. + ca_exemptions: 0 + +- name: 2025 single filer who cannot be claimed filing as head of household gets the personal and dependent credits + period: 2025 + input: + people: + filer: + age: 30 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: HEAD_OF_HOUSEHOLD + households: + household: + members: [filer, child] + state_code: CA + output: + # $153 + $475. + ca_exemptions: 628 diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py index 23e95b90721..877498e6ac7 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py @@ -11,10 +11,19 @@ class ar_personal_credit_dependent(Variable): "https://www.dfa.arkansas.gov/wp-content/uploads/2021_AR1000F_FullYearResidentIndividualIncomeTaxReturn.pdf", "https://www.dfa.arkansas.gov/wp-content/uploads/2022_AR1000F_FullYearResidentIndividualIncomeTaxReturn.pdf#page=1", "https://www.dfa.arkansas.gov/wp-content/uploads/2022_AR1000F_and_AR1000NR_Instructions.pdf#page=12", + "https://www.arkleg.state.ar.us/Home/FTPDocument?path=/ACTS/2005/Public/ACT675.pdf#page=8", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", ) defined_for = StateCode.AR def formula(person, period, parameters): - dependent = person("is_tax_unit_dependent", period) + # Ark. Code 26-51-501 defines the dependent for this credit by IRC + # 152 (Act 675 of 2005, sec. 14), and under IRC 152(b)(1) a return on + # which the filer (or, if joint, either spouse) can be claimed as a + # dependent has no dependents. The filers' own credits remain. + filer_is_dependent = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere", period + ) + dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent p = parameters(period).gov.states.ar.tax.income.credits.personal.amount return dependent * p.base diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py index d035f6d50db..6e0520f2f1a 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py @@ -1,4 +1,8 @@ from policyengine_us.model_api import * +from policyengine_us.variables.household.demographic.person._parent_links import ( + household_has_parent_ids, + tax_unit_parent_indices, +) class ar_personal_credit_disabled_dependent(Variable): @@ -11,12 +15,34 @@ class ar_personal_credit_disabled_dependent(Variable): "https://www.dfa.arkansas.gov/wp-content/uploads/2021_AR1000F_FullYearResidentIndividualIncomeTaxReturn.pdf", "https://www.dfa.arkansas.gov/wp-content/uploads/2022_AR1000F_FullYearResidentIndividualIncomeTaxReturn.pdf#page=1", "https://www.dfa.arkansas.gov/wp-content/uploads/2022_AR1000F_and_AR1000NR_Instructions.pdf#page=12", + "https://www.arkleg.state.ar.us/Home/FTPDocument?path=%2FACTS%2F1999%2FPublic%2FACT417.pdf#page=2", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", ) defined_for = StateCode.AR def formula(person, period, parameters): dependent = person("is_tax_unit_dependent", period) disabled = person("is_disabled", period) - disabled_dependent = disabled & dependent + # The credit covers an individual who is "a child of the taxpayer's + # blood, an adopted child, or a dependent" in the IRC 152 sense (Act + # 417 of 1999). A return on which the filer (or, if joint, either + # spouse) can be claimed as a dependent has no IRC 152 dependents + # (IRC 152(b)(1)), so only the filers' own children still qualify. + filer_is_dependent = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere", period + ) + # A filer's child: a parent id that names a head or spouse of the + # tax unit. Parent ids also name step-parents, which on a joint + # return covers the other spouse's own child. Without parent ids the + # model cannot tell a filer's child from another dependent and keeps + # the child route open. + filer = person("is_tax_unit_head_or_spouse", period) + first, second = tax_unit_parent_indices(person, period) + child_of_filer = np.where(first >= 0, filer[first], False) | np.where( + second >= 0, filer[second], False + ) + relationship_unknown = ~household_has_parent_ids(person, period) + qualifies = ~filer_is_dependent | child_of_filer | relationship_unknown + disabled_dependent = disabled & dependent & qualifies p = parameters(period).gov.states.ar.tax.income.credits.personal.amount return disabled_dependent * p.disabled_dependent diff --git a/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py b/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py index 0dad1967ab0..31a75dac553 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py @@ -17,7 +17,16 @@ def formula(person, period, parameters): p = parameters(period).gov.states.ar.tax.income.rates.low_income_tax_tables filing_status_separate = person.tax_unit("filing_status", period) status = filing_status_separate.possible_values - dependents = person.tax_unit("tax_unit_dependents", period) + # The tables count dependents in the IRC 152 sense, and a return on + # which the filer (or, if joint, either spouse) can be claimed as a + # dependent has none (IRC 152(b)(1)). This changes only which table + # applies, not the filing status. + filer_is_dependent = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere", period + ) + dependents = where( + filer_is_dependent, 0, person.tax_unit("tax_unit_dependents", period) + ) return select( [ filing_status_separate == status.SINGLE, diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py index 1f6b885c7b3..6ec5345039c 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py @@ -47,7 +47,14 @@ def formula(tax_unit, period, parameters): has_tax_liability = tax_liability >= p.min_tax_liability person = tax_unit.members - dependent = person("is_tax_unit_dependent", period) + # The rebate counts each dependent for whom the 2021 return claimed + # the dependent tax credit (sec. 3(A), (D)). That credit needs an IRC + # 152 dependent (A.R.S. 43-1001(3)), and a return on which the filer + # (or, if joint, either spouse) can be claimed as a dependent has none + # (IRC 152(b)(1)). The rebate is computed on the 2021 return, so this + # reads the 2021 inputs. + filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent age = person("age", period) # Get counts by age group for max dependent limit prioritization diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py index 2be1bc88d3b..f130704f102 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py @@ -8,12 +8,34 @@ class az_increased_excise_tax_credit(Variable): unit = USD definition_period = YEAR defined_for = "az_increased_excise_tax_credit_eligible" - reference = "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01072-01.htm" + reference = ( + "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01072-01.htm", + # Form 140 line 56 instructions and worksheet. + "https://azdor.gov/sites/default/files/document/FORMS_INDIVIDUAL_2025_140i.pdf#page=25", + ) def formula(tax_unit, period, parameters): p = parameters(period).gov.states.az.tax.income.credits.increased_excise # The increased excise tax credit is allowed for each person that a # personal or dependent exemption can be claimed for - tax_unit_size = tax_unit("tax_unit_size", period) - uncapped_credit = tax_unit_size * p.amount + # (A.R.S. 43-1072.01(C)). The Form 140 worksheet counts the filers and + # the dependents "provided that person(s) qualifies as a dependent + # for federal purposes", and the instructions let a joint filer claim + # the credit but not for a spouse who is barred. So a filer whom + # another taxpayer can claim is not counted, and a return on which + # the filer (or, if joint, either spouse) can be claimed counts no + # dependents (IRC 152(b)(1)). + person = tax_unit.members + filers = tax_unit.sum(person("is_tax_unit_head_or_spouse", period)) + claimed_filers = filers - tax_unit( + "head_spouse_count_not_dependent_elsewhere", period + ) + filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + disallowed_dependents = where( + filer_is_dependent, tax_unit("tax_unit_dependents", period), 0 + ) + persons = ( + tax_unit("tax_unit_size", period) - claimed_filers - disallowed_dependents + ) + uncapped_credit = persons * p.amount return min_(uncapped_credit, p.max_amount) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py index 4db2d5a5e09..231629e571c 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py @@ -6,7 +6,11 @@ class az_increased_excise_tax_credit_eligible(Variable): entity = TaxUnit definition_period = YEAR label = "Eligible for Arizona Increased Excise Tax Credit" - reference = "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01072-01.htm" + reference = ( + "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01072-01.htm", + # Form 140 line 56 instructions. + "https://azdor.gov/sites/default/files/document/FORMS_INDIVIDUAL_2025_140i.pdf#page=25", + ) defined_for = StateCode.AZ def formula(tax_unit, period, parameters): @@ -14,4 +18,10 @@ def formula(tax_unit, period, parameters): agi = tax_unit("adjusted_gross_income", period) filing_status = tax_unit("filing_status", period) max_income = p.income_threshold[filing_status] - return agi <= max_income + # A.R.S. 43-1072.01(A) allows the credit only "for a taxpayer who is + # not claimed as a dependent by any other taxpayer". On a joint + # return a spouse who is not claimed can still claim it. + every_filer_is_dependent = tax_unit( + "every_filer_is_dependent_elsewhere", period + ) + return (agi <= max_income) & ~every_filer_is_dependent diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py b/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py index af778feb0af..bb887ccc8e8 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py @@ -6,14 +6,22 @@ class az_dependent_tax_credit_potential(Variable): entity = TaxUnit label = "Arizona dependent tax credit" unit = USD - reference = "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01073-01.htm" + reference = ( + "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01073-01.htm", + "https://www.azleg.gov/ars/43/01001.htm", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + ) definition_period = YEAR defined_for = StateCode.AZ def formula(tax_unit, period, parameters): person = tax_unit.members p = parameters(period).gov.states.az.tax.income.credits.dependent_credit - dependent = person("is_tax_unit_dependent", period) + # A.R.S. 43-1001(3) gives "dependent" the IRC 152 meaning, and under + # IRC 152(b)(1) a return on which the filer (or, if joint, either + # spouse) can be claimed as a dependent has no dependents. + filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent age = person("age", period) dependent_amount = p.amount.calc(age) * dependent amount = tax_unit.sum(dependent_amount) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py index 56673f2ec7d..e35ae45f124 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py @@ -6,7 +6,11 @@ class az_family_tax_credit_eligible(Variable): entity = TaxUnit label = "Eligible for the Arizona Family Tax Credit" definition_period = YEAR - reference = "https://www.azleg.gov/ars/43/01073.htm" + reference = ( + "https://www.azleg.gov/ars/43/01073.htm", + "https://www.azleg.gov/ars/43/01001.htm", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + ) defined_for = StateCode.AZ def formula(tax_unit, period, parameters): @@ -18,7 +22,13 @@ def formula(tax_unit, period, parameters): income = az_agi + exemptions filing_status = tax_unit("az_filing_status", period) status = filing_status.possible_values - dependents = tax_unit("tax_unit_dependents", period) + # The thresholds count dependents in the IRC 152 sense (A.R.S. + # 43-1001(3)); a return on which the filer (or, if joint, either + # spouse) can be claimed as a dependent has none (IRC 152(b)(1)). + filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + dependents = where( + filer_is_dependent, 0, tax_unit("tax_unit_dependents", period) + ) income_limit = select( [ filing_status == status.SINGLE, diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py index caaad18abc5..59dc9591156 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py @@ -7,6 +7,11 @@ class az_family_tax_credit_potential(Variable): label = "Arizona Family Tax Credit" unit = USD definition_period = YEAR + reference = ( + "https://www.azleg.gov/ars/43/01073.htm", + "https://www.azleg.gov/ars/43/01001.htm", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + ) defined_for = "az_family_tax_credit_eligible" def formula(tax_unit, period, parameters): @@ -14,6 +19,16 @@ def formula(tax_unit, period, parameters): period ).gov.states.az.tax.income.credits.family_tax_credits.amount filing_status = tax_unit("filing_status", period) - - amount = p.per_person * tax_unit("tax_unit_size", period) + # A.R.S. 43-1073(B): $40 "for each person ... who is either the + # taxpayer, the taxpayer's spouse who does not file a return or a + # dependent". A filer whom another taxpayer can claim still counts as + # the taxpayer, but "dependent" has the IRC 152 meaning (A.R.S. + # 43-1001(3)), so under IRC 152(b)(1) a return on which the filer (or, + # if joint, either spouse) can be claimed counts no dependents. + filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + disallowed_dependents = where( + filer_is_dependent, tax_unit("tax_unit_dependents", period), 0 + ) + persons = tax_unit("tax_unit_size", period) - disallowed_dependents + amount = p.per_person * persons return min_(amount, p.cap[filing_status]) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py b/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py index 057af59abcd..86c28f97713 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py @@ -6,7 +6,11 @@ class ca_renter_credit(Variable): entity = TaxUnit label = "California Renter Tax Credit" unit = USD - reference = "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17053.5" + reference = ( + "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17053.5", + # Nonrefundable Renter's Credit Qualification Record. + "https://www.ftb.ca.gov/forms/2025/2025-540-booklet.pdf#page=25", + ) definition_period = YEAR defined_for = StateCode.CA @@ -18,7 +22,21 @@ def formula(tax_unit, period, parameters): filing_status = tax_unit("filing_status", period) income_cap = p.income_cap[filing_status] income_eligible = agi <= income_cap - eligible = income_eligible & has_rent + # RTC 17053.5(d)(2): a qualified renter does not include "an + # individual whose principal place of residence for more than 50 + # percent of the taxable year is with another person who claimed that + # individual as a dependent" (the qualification record asks whether + # someone can claim you and, if so, whether you lived in that + # person's home for more than half the year). Being claimable alone + # does not bar the credit, and on a joint return a spouse who is a + # qualified renter still gets the joint amount (17053.5(a)(1)(A)). + person = tax_unit.members + filer = person("is_tax_unit_head_or_spouse", period) + excluded = person("claimed_as_dependent_on_another_return", period) & person( + "lives_with_claiming_taxpayer", period + ) + has_qualified_renter = tax_unit.any(filer & ~excluded) + eligible = income_eligible & has_rent & has_qualified_renter # Determine amount if eligible based on filing status. amount_if_eligible = p.amount[filing_status] # Return eligibility * (amount if eligible). diff --git a/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py b/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py index 8d6d28990ce..438626a3bc9 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py @@ -11,6 +11,8 @@ class ca_eitc_eligible(Variable): reference = ( "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17052.", "https://www.ftb.ca.gov/forms/2024/2024-3514-booklet.html", + "https://www.ftb.ca.gov/forms/2025/2025-3514-booklet.pdf#page=6", + "https://www.law.cornell.edu/uscode/text/26/32#c_1_A_ii", ) def formula(tax_unit, period, parameters): @@ -37,8 +39,22 @@ def formula(tax_unit, period, parameters): federal_agi = tax_unit("adjusted_gross_income", period) meets_agi_requirements = federal_agi < p.phase_out.final.end + # RTC 17052 keeps the IRC 32(c)(1)(A)(ii)(III) rule: without a + # qualifying child, the filer must not be another taxpayer's + # dependent (FTB 3514, Step 4, question f). FTB 3514 skips that + # question on a joint return because a married filer can be claimed + # only when the joint return seeks just a refund of withholding; as + # for the federal credit, a joint return on which either spouse can + # be claimed gets no credit without a qualifying child. + has_qualifying_child = tax_unit.any( + person("ca_is_qualifying_child_for_caleitc", period) + ) + dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + meets_dependency_requirements = has_qualifying_child | ~dependent_elsewhere + return ( meets_age_requirements & meets_investment_income_requirements & meets_agi_requirements + & meets_dependency_requirements ) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py b/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py index 27c3ceea1a1..d6a4126be48 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py @@ -6,11 +6,39 @@ class ca_standard_deduction(Variable): entity = TaxUnit label = "California standard deduction" unit = USD - reference = "https://www.ftb.ca.gov/forms/2021/2021-540.pdf" + reference = ( + "https://www.ftb.ca.gov/forms/2021/2021-540.pdf", + "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17073.5", + # California Standard Deduction Worksheet for Dependents. + "https://www.ftb.ca.gov/forms/2025/2025-540-booklet.pdf#page=13", + ) definition_period = YEAR defined_for = StateCode.CA def formula(tax_unit, period, parameters): p = parameters(period).gov.states.ca.tax.income.deductions.standard filing_status = tax_unit("filing_status", period) - return p.amount[filing_status] + standard = p.amount[filing_status] + # RTC 17073.5 applies the IRC 63(c)(5) limit, and the Form 540 + # worksheet for dependents applies "only if your parent, or someone + # else, can claim you (or your spouse/RDP) as a dependent": the + # deduction is the smaller of the California amount and the larger of + # the federal minimum or earned income plus the federal addition + # (line 1 carries line 2 of the federal worksheet). + dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + p_dependent = parameters(period).gov.irs.deductions.standard.dependent + # Federal worksheet earned income: wages and self-employment income + # minus the deductible part of self-employment tax. + earned_income = max_( + tax_unit("tax_unit_earned_income", period) + - tax_unit("self_employment_tax_ald", period), + 0, + ) + dependent_standard = min_( + standard, + max_( + p_dependent.amount, + earned_income + p_dependent.additional_earned_income, + ), + ) + return where(dependent_elsewhere, dependent_standard, standard) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py index 31fb55cf0e6..54bd4aa88d8 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py @@ -8,7 +8,12 @@ class ca_exemptions(Variable): defined_for = StateCode.CA unit = USD definition_period = YEAR - reference = "https://www.ftb.ca.gov/forms/2021/2021-540.pdf" + reference = ( + "https://www.ftb.ca.gov/forms/2021/2021-540.pdf", + "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=RTC§ionNum=17054", + # Form 540 lines 6-10 instructions. + "https://www.ftb.ca.gov/forms/2025/2025-540-booklet.pdf#page=12", + ) def formula(tax_unit, period, parameters): p = parameters(period).gov.states.ca.tax.income.exemptions @@ -20,18 +25,40 @@ def formula(tax_unit, period, parameters): increments = np.ceil(over_agi_threshold / p.phase_out.increment[filing_status]) exemption_reduction = increments * p.phase_out.amount - # Personal Exemptions - personal_exemption_count = p.personal_scale[filing_status] - personal_aged_blind_exemption_count = personal_exemption_count + tax_unit( - "aged_blind_count", period + # A filer whom another taxpayer can claim as a dependent gets no + # personal, blind or senior credit (RTC 17054). The Form 540 line 7 + # instructions enter 0 for a single, separate or head of household + # filer who can be claimed and, on a joint return, 1 when only one + # spouse can be claimed and 0 when both can; lines 8 and 9 say "Do + # not claim this credit if someone else can claim you as a + # dependent". + person = tax_unit.members + filer = person("is_tax_unit_head_or_spouse", period) + claimed = person("claimed_as_dependent_on_another_return", period) + dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + personal_exemption_count = where( + dependent_elsewhere, + tax_unit("head_spouse_count_not_dependent_elsewhere", period), + p.personal_scale[filing_status], + ) + aged_blind_count = tax_unit.sum( + (filer & ~claimed) + * (person("is_irs_aged", period).astype(int) + person("is_blind", period)) + ) + personal_aged_blind_exemption_count = ( + personal_exemption_count + aged_blind_count ) personal_aged_blind_exemption = max_( 0, personal_aged_blind_exemption_count * (p.amount - exemption_reduction), ) - # Dependent exemptions - dependents = tax_unit("tax_unit_dependents", period) + # Dependent exemptions: the dependents must be those claimed on the + # federal return, and a return on which the filer (or, if joint, + # either spouse) can be claimed has none (IRC 152(b)(1)). + dependents = where( + dependent_elsewhere, 0, tax_unit("tax_unit_dependents", period) + ) dependent_exemptions = max_( 0, dependents * (p.dependent_amount - exemption_reduction) ) diff --git a/policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py b/policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py new file mode 100644 index 00000000000..59d7cc8de4d --- /dev/null +++ b/policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py @@ -0,0 +1,15 @@ +from policyengine_us.model_api import * + + +class lives_with_claiming_taxpayer(Variable): + value_type = bool + entity = Person + definition_period = YEAR + label = "Lives with the taxpayer who can claim them as a dependent" + documentation = ( + "Whether, for more than half the year, the person's principal place " + "of residence was the home of the taxpayer who can claim them as a " + "dependent (see claimed_as_dependent_on_another_return). Rules read " + "it only for a person who can be claimed." + ) + reference = ("https://www.ftb.ca.gov/forms/2025/2025-540-booklet.pdf#page=25",) From 9efabea7b9da42f6aa6955c92942af9b5a36d9bd Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 07:02:02 -0400 Subject: [PATCH 2/8] Pin the inherited care-credit fixes, cite A.R.S. 43-1072.02, cap the joint Arizona rebate at three dependents Arkansas's and California's care credits and Arizona's 2026 care subtraction read the federal qualifying-person count, which the base branch fixes; YAML cases now pin the claimable-filer and disabled-child cases. The excise credit cites 43-1072.02, its operative section for 2021-2041. The 2021 families rebate counts at most three dependents on any return (Laws 2023, ch. 147, sec. 3(E)); ADOR's $1,500 joint maximum describes two 2021 families who married later. Co-Authored-By: Claude Opus 5.5 --- changelog.d/claimable-filer-az-ar-ca.fixed.md | 2 +- .../az/tax/income/rebate/max_dependents.yaml | 7 +- .../tax/income/credits/ar_cdcc_potential.yaml | 293 ++++++++++++++++++ .../credits/az_families_tax_rebate.yaml | 7 +- .../az_increased_excise_tax_credit.yaml | 5 +- ...az_dependent_care_expense_subtraction.yaml | 293 ++++++++++++++++++ .../credits/child_dependent_care/ca_cdcc.yaml | 293 ++++++++++++++++++ .../credits/az_increased_excise_tax_credit.py | 17 +- ...az_increased_excise_tax_credit_eligible.py | 8 +- 9 files changed, 908 insertions(+), 17 deletions(-) diff --git a/changelog.d/claimable-filer-az-ar-ca.fixed.md b/changelog.d/claimable-filer-az-ar-ca.fixed.md index d00a1fad0cb..b0ef687d062 100644 --- a/changelog.d/claimable-filer-az-ar-ca.fixed.md +++ b/changelog.d/claimable-filer-az-ar-ca.fixed.md @@ -1 +1 @@ -Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent. A return on which the filer (or, if joint, either spouse) can be claimed counts no dependents for Arizona's dependent credit, family credit and 2021 families rebate, Arkansas's dependent credit, disabled-dependent credit (except for a filer's own child) and low-income tables, or California's dependent exemption credit, and gets no childless CalEITC or foster youth credit. A claimable filer loses California's personal, senior and blind credits and is not counted for Arizona's excise credit. California's standard deduction follows its dependent worksheet, and its renter credit excludes a claimable filer who lived in the claimer's home (new input `lives_with_claiming_taxpayer`). California's 2025 joint renter credit income limit is now $107,988. +Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent. A return on which the filer (or, if joint, either spouse) can be claimed counts no dependents for Arizona's dependent credit, family credit and 2021 families rebate, Arkansas's dependent credit, disabled-dependent credit (except for a filer's own child) and low-income tables, or California's dependent exemption credit, and gets no childless CalEITC or foster youth credit. A claimable filer loses California's personal, senior and blind credits and is not counted for Arizona's excise credit. California's standard deduction follows its dependent worksheet, and its renter credit excludes a claimable filer who lived in the claimer's home (new input `lives_with_claiming_taxpayer`). California's 2025 joint renter credit income limit is now $107,988. Arizona's 2021 families rebate counts at most three dependents on a joint return, as on every other return (Laws 2023, ch. 147, sec. 3(E)). diff --git a/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml b/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml index 7d451605bd2..c6a3ef77a85 100644 --- a/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml +++ b/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml @@ -11,6 +11,8 @@ metadata: href: https://azdor.gov/individuals/arizona-families-tax-rebate - title: SB1734 - Arizona Families Tax Rebate href: https://www.azleg.gov/legtext/56leg/1r/laws/0147.htm + - title: Laws 2023, ch. 147, sec. 3(C), (E) + href: https://www.azleg.gov/legtext/56leg/1R/laws/0147.pdf#page=4 SINGLE: 2021-01-01: 3 HEAD_OF_HOUSEHOLD: @@ -19,5 +21,8 @@ SEPARATE: 2021-01-01: 3 SURVIVING_SPOUSE: 2021-01-01: 3 +# Sec. 3(E): "a maximum of three dependents for a qualifying taxpayer", with one +# rebate for each 2021 return (sec. 3(C)). ADOR's $1,500 joint maximum +# describes two 2021 families who married later, each with its own 2021 return. JOINT: - 2021-01-01: 6 + 2021-01-01: 3 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml index 38ff28007e5..3541dea11ec 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml @@ -128,3 +128,296 @@ # (Under the live 2026 federal 50 percent rate it would be 300.) ar_federal_cdcc: 1_050 ar_cdcc_potential: 210 + +# Fixed by the federal base branch, pinned here: a child under 13 is a +# qualifying person only as the filer's dependent (IRC 21(b)(1)(A)), and a +# return on which either filer can be claimed has none (IRC 152(b)(1)); a +# disabled dependent still qualifies (21(b)(1)(B) disregards 152(b)(1)). +# AGI $50,000, $1,000 of care: 2013-law rate 20% gives $200; Arkansas 20% +# gives $40 (credits/cdcc/match.yaml). + +- name: 2025 single filer who can be claimed as a dependent gets no care credit for a child under 13 + period: 2025 + input: + people: + filer: + age: 30 + employment_income: 50_000 + claimed_as_dependent_on_another_return: true + child: + age: 2 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [filer, child] + state_code: AR + output: + ar_cdcc_potential: 0 + +- name: 2025 single filer who cannot be claimed gets the care credit for a child under 13 + period: 2025 + input: + people: + filer: + age: 30 + employment_income: 50_000 + child: + age: 2 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [filer, child] + state_code: AR + output: + ar_cdcc_potential: 40 + +- name: 2025 joint return with one claimable spouse gets no care credit for a child under 13 (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + employment_income: 25_000 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 2 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_cdcc_potential: 0 + +- name: 2025 joint return with one claimable spouse gets no care credit for a child under 13 (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 30 + employment_income: 25_000 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 2 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_b, person_a, child] + state_code: AR + output: + ar_cdcc_potential: 0 + +- name: 2025 joint return with both spouses claimable gets no care credit for a child under 13 + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + child: + age: 2 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_cdcc_potential: 0 + +- name: 2025 joint return with neither spouse claimable gets the care credit for a child under 13 + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 25_000 + person_b: + age: 30 + employment_income: 25_000 + child: + age: 2 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_cdcc_potential: 40 + +- name: 2025 single filer who can be claimed as a dependent keeps the care credit for a disabled child + period: 2025 + input: + people: + filer: + age: 30 + employment_income: 50_000 + claimed_as_dependent_on_another_return: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [filer, child] + state_code: AR + output: + ar_cdcc_potential: 40 + +- name: 2025 joint return with one claimable spouse keeps the care credit for a disabled child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + employment_income: 25_000 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_cdcc_potential: 40 + +- name: 2025 joint return with one claimable spouse keeps the care credit for a disabled child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 30 + employment_income: 25_000 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_b, person_a, child] + state_code: AR + output: + ar_cdcc_potential: 40 + +- name: 2025 joint return with both spouses claimable keeps the care credit for a disabled child + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + employment_income: 25_000 + claimed_as_dependent_on_another_return: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_cdcc_potential: 40 + +- name: 2025 joint return with neither spouse claimable gets the care credit for a disabled child + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 25_000 + person_b: + age: 30 + employment_income: 25_000 + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: AR + output: + ar_cdcc_potential: 40 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml index 422254c510c..d021252ea63 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_families_tax_rebate.yaml @@ -145,7 +145,7 @@ # No dependents = no rebate az_families_tax_rebate: 0 -- name: 2021 - MFJ with six young dependents - max $1,500 rebate +- name: 2021 - MFJ with six young dependents - capped at three, $750 period: 2021 input: people: @@ -183,8 +183,9 @@ members: [filer1, filer2, child1, child2, child3, child4, child5, child6] state_code: AZ output: - # MFJ can claim up to 6 dependents: 6 x $250 = $1,500 - az_families_tax_rebate: 1_500 + # Laws 2023, ch. 147, sec. 3(E): "a maximum of three dependents for a + # qualifying taxpayer", one rebate per 2021 return: 3 x $250 = $750. + az_families_tax_rebate: 750 - name: 2021 - Single filer with four dependents - capped at $750 period: 2021 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml index 98eab030ab9..a813e364ba0 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml @@ -114,8 +114,9 @@ output: az_increased_excise_tax_credit: 0 -# A.R.S. 43-1072.01 allows $25 "for each person ... for whom a personal or -# dependent exemption is allowed", up to $100, but only "for a taxpayer who is +# A.R.S. 43-1072.01 and, from 2021, 43-1072.02 allow $25 for each person +# (43-1072.02(C): "either the taxpayer, the taxpayer's spouse who does not +# file a return or a dependent"), up to $100, but only "for a taxpayer who is # not claimed as a dependent by any other taxpayer". The Form 140 line 56 # worksheet counts the filers and the dependents "provided that person(s) # qualifies as a dependent for federal purposes", and the instructions let a diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/subtractions/az_dependent_care_expense_subtraction.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/subtractions/az_dependent_care_expense_subtraction.yaml index d5b6c2bae34..4dd6ecdd155 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/subtractions/az_dependent_care_expense_subtraction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/subtractions/az_dependent_care_expense_subtraction.yaml @@ -90,3 +90,296 @@ # cdcc = $3,000 * 0.37 rate = $1,110 # subtraction = max($3,000 - $1,110, 0) = $1,890 az_dependent_care_expense_subtraction: 1_890 + +# Fixed by the federal base branch, pinned here: A.R.S. 43-1022(34) subtracts +# care expenses "for a qualifying individual under section 21" above the +# federal credit. A child under 13 is not such an individual on a return on +# which either filer can be claimed (IRC 21(b)(1)(A), 152(b)(1)); a disabled +# dependent still is. $3,000 of care, earnings $8,000, no federal tax, so no +# federal credit: $3,000 (federal cdcc/max.yaml cap $3,000). + +- name: 2026 single filer who can be claimed as a dependent gets no care subtraction for a child under 13 + period: 2026 + input: + people: + filer: + age: 30 + employment_income: 8_000 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [filer, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 0 + +- name: 2026 single filer who cannot be claimed gets the care subtraction for a child under 13 + period: 2026 + input: + people: + filer: + age: 30 + employment_income: 8_000 + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [filer, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 3_000 + +- name: 2026 joint return with one claimable spouse gets no care subtraction for a child under 13 (the claimable spouse is the head) + period: 2026 + input: + people: + person_a: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + employment_income: 4_000 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 0 + +- name: 2026 joint return with one claimable spouse gets no care subtraction for a child under 13 (the claimable spouse is the spouse) + period: 2026 + input: + people: + person_b: + age: 30 + employment_income: 4_000 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_b, person_a, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 0 + +- name: 2026 joint return with both spouses claimable gets no care subtraction for a child under 13 + period: 2026 + input: + people: + person_a: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 0 + +- name: 2026 joint return with neither spouse claimable gets the care subtraction for a child under 13 + period: 2026 + input: + people: + person_a: + age: 30 + employment_income: 4_000 + person_b: + age: 30 + employment_income: 4_000 + child: + age: 5 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 3_000 + +- name: 2026 single filer who can be claimed as a dependent keeps the care credit for a disabled child + period: 2026 + input: + people: + filer: + age: 30 + employment_income: 8_000 + claimed_as_dependent_on_another_return: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [filer, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 3_000 + +- name: 2026 joint return with one claimable spouse keeps the care credit for a disabled child (the claimable spouse is the head) + period: 2026 + input: + people: + person_a: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + employment_income: 4_000 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 3_000 + +- name: 2026 joint return with one claimable spouse keeps the care credit for a disabled child (the claimable spouse is the spouse) + period: 2026 + input: + people: + person_b: + age: 30 + employment_income: 4_000 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_b, person_a, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 3_000 + +- name: 2026 joint return with both spouses claimable keeps the care credit for a disabled child + period: 2026 + input: + people: + person_a: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + employment_income: 4_000 + claimed_as_dependent_on_another_return: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 3_000 + +- name: 2026 joint return with neither spouse claimable gets the care credit for a disabled child + period: 2026 + input: + people: + person_a: + age: 30 + employment_income: 4_000 + person_b: + age: 30 + employment_income: 4_000 + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [person_a, person_b, child] + state_code: AZ + output: + az_dependent_care_expense_subtraction: 3_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc.yaml index 3cbbe67213b..15a48773b97 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc.yaml @@ -77,3 +77,296 @@ ca_federal_capped_cdcc: 0 output: ca_cdcc: 500 + +# Fixed by the federal base branch, pinned here: a child under 13 is a +# qualifying person only as the filer's dependent (IRC 21(b)(1)(A)), and a +# return on which either filer can be claimed has none (IRC 152(b)(1)); a +# disabled dependent still qualifies. AGI $39,900, $1,000 of care: federal +# rate 35% - ceil(24,900 / 2,000) x 1% = 22% gives $220; California 50% +# (credits/child_dependent_care/rate.yaml) gives $110. + +- name: 2025 single filer who can be claimed as a dependent gets no care credit for a child under 13 + period: 2025 + input: + people: + filer: + age: 30 + employment_income: 39_900 + claimed_as_dependent_on_another_return: true + child: + age: 3 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [filer, child] + state_code: CA + output: + ca_cdcc: 0 + +- name: 2025 single filer who cannot be claimed gets the care credit for a child under 13 + period: 2025 + input: + people: + filer: + age: 30 + employment_income: 39_900 + child: + age: 3 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [filer, child] + state_code: CA + output: + ca_cdcc: 110 + +- name: 2025 joint return with one claimable spouse gets no care credit for a child under 13 (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + employment_income: 19_950 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 3 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_cdcc: 0 + +- name: 2025 joint return with one claimable spouse gets no care credit for a child under 13 (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 30 + employment_income: 19_950 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 3 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_b, person_a, child] + state_code: CA + output: + ca_cdcc: 0 + +- name: 2025 joint return with both spouses claimable gets no care credit for a child under 13 + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + child: + age: 3 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_cdcc: 0 + +- name: 2025 joint return with neither spouse claimable gets the care credit for a child under 13 + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 19_950 + person_b: + age: 30 + employment_income: 19_950 + child: + age: 3 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_cdcc: 110 + +- name: 2025 single filer who can be claimed as a dependent keeps the care credit for a disabled child + period: 2025 + input: + people: + filer: + age: 30 + employment_income: 39_900 + claimed_as_dependent_on_another_return: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [filer, child] + state_code: CA + output: + ca_cdcc: 110 + +- name: 2025 joint return with one claimable spouse keeps the care credit for a disabled child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + employment_income: 19_950 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_cdcc: 110 + +- name: 2025 joint return with one claimable spouse keeps the care credit for a disabled child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 30 + employment_income: 19_950 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_b, person_a, child] + state_code: CA + output: + ca_cdcc: 110 + +- name: 2025 joint return with both spouses claimable keeps the care credit for a disabled child + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + person_b: + age: 30 + employment_income: 19_950 + claimed_as_dependent_on_another_return: true + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_cdcc: 110 + +- name: 2025 joint return with neither spouse claimable gets the care credit for a disabled child + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 19_950 + person_b: + age: 30 + employment_income: 19_950 + child: + age: 14 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [person_a, person_b, child] + state_code: CA + output: + ca_cdcc: 110 diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py index f130704f102..c091d75dfed 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py @@ -10,6 +10,7 @@ class az_increased_excise_tax_credit(Variable): defined_for = "az_increased_excise_tax_credit_eligible" reference = ( "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01072-01.htm", + "https://www.azleg.gov/ars/43/01072-02.htm", # Form 140 line 56 instructions and worksheet. "https://azdor.gov/sites/default/files/document/FORMS_INDIVIDUAL_2025_140i.pdf#page=25", ) @@ -18,13 +19,15 @@ def formula(tax_unit, period, parameters): p = parameters(period).gov.states.az.tax.income.credits.increased_excise # The increased excise tax credit is allowed for each person that a # personal or dependent exemption can be claimed for - # (A.R.S. 43-1072.01(C)). The Form 140 worksheet counts the filers and - # the dependents "provided that person(s) qualifies as a dependent - # for federal purposes", and the instructions let a joint filer claim - # the credit but not for a spouse who is barred. So a filer whom - # another taxpayer can claim is not counted, and a return on which - # the filer (or, if joint, either spouse) can be claimed counts no - # dependents (IRC 152(b)(1)). + # (A.R.S. 43-1072.01(C)); from 2021, 43-1072.02(C) allows $25 for each + # person "who is either the taxpayer, the taxpayer's spouse who does + # not file a return or a dependent". The Form 140 worksheet counts the + # filers and the dependents "provided that person(s) qualifies as a + # dependent for federal purposes", and the instructions let a joint + # filer claim the credit but not for a spouse who is barred. So a + # filer whom another taxpayer can claim is not counted, and a return + # on which the filer (or, if joint, either spouse) can be claimed + # counts no dependents (IRC 152(b)(1)). person = tax_unit.members filers = tax_unit.sum(person("is_tax_unit_head_or_spouse", period)) claimed_filers = filers - tax_unit( diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py index 231629e571c..9c4b90ad87a 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py @@ -8,6 +8,7 @@ class az_increased_excise_tax_credit_eligible(Variable): label = "Eligible for Arizona Increased Excise Tax Credit" reference = ( "https://www.azleg.gov/viewdocument/?docName=https://www.azleg.gov/ars/43/01072-01.htm", + "https://www.azleg.gov/ars/43/01072-02.htm", # Form 140 line 56 instructions. "https://azdor.gov/sites/default/files/document/FORMS_INDIVIDUAL_2025_140i.pdf#page=25", ) @@ -18,9 +19,10 @@ def formula(tax_unit, period, parameters): agi = tax_unit("adjusted_gross_income", period) filing_status = tax_unit("filing_status", period) max_income = p.income_threshold[filing_status] - # A.R.S. 43-1072.01(A) allows the credit only "for a taxpayer who is - # not claimed as a dependent by any other taxpayer". On a joint - # return a spouse who is not claimed can still claim it. + # A.R.S. 43-1072.01(A) and, from 2021, 43-1072.02(A) allow the credit + # only "for a taxpayer who is not claimed as a dependent by any other + # taxpayer". On a joint return a spouse who is not claimed can still + # claim it. every_filer_is_dependent = tax_unit( "every_filer_is_dependent_elsewhere", period ) From 02e2c3d8139b41b9b5b7534a1086aa489786ec23 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 07:27:49 -0400 Subject: [PATCH 3/8] Keep California's aged and blind count input; use a younger non-child dependent in the Arkansas cases California's senior and blind credits now subtract the claimable filers' own aged and blind credits from aged_blind_count, so cases that supply that count keep working. The Arkansas disabled-dependent cases used a dependent older than the filers, whom the model made the head; the dependent is now 15. Co-Authored-By: Claude Opus 5.5 --- .../ar_personal_credit_disabled_dependent.yaml | 12 ++++++------ .../states/ca/tax/income/exemptions/ca_exemptions.py | 7 +++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml index 952521f188b..42e399e18b4 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml @@ -41,7 +41,7 @@ person_id: 1 claimed_as_dependent_on_another_return: true dependent: - age: 30 + age: 15 person_id: 3 is_disabled: true parent_1_id: 99 @@ -64,7 +64,7 @@ age: 19 person_id: 1 dependent: - age: 30 + age: 15 person_id: 3 is_disabled: true parent_1_id: 99 @@ -95,7 +95,7 @@ is_tax_unit_head: false is_tax_unit_spouse: true dependent: - age: 30 + age: 15 person_id: 3 is_disabled: true parent_1_id: 99 @@ -126,7 +126,7 @@ is_tax_unit_head: false is_tax_unit_spouse: true dependent: - age: 30 + age: 15 person_id: 3 is_disabled: true parent_1_id: 99 @@ -154,7 +154,7 @@ person_id: 2 claimed_as_dependent_on_another_return: true dependent: - age: 30 + age: 15 person_id: 3 is_disabled: true parent_1_id: 99 @@ -180,7 +180,7 @@ age: 22 person_id: 2 dependent: - age: 30 + age: 15 person_id: 3 is_disabled: true parent_1_id: 99 diff --git a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py index 54bd4aa88d8..2ee5000732b 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py @@ -41,10 +41,13 @@ def formula(tax_unit, period, parameters): tax_unit("head_spouse_count_not_dependent_elsewhere", period), p.personal_scale[filing_status], ) - aged_blind_count = tax_unit.sum( - (filer & ~claimed) + claimed_aged_blind_count = tax_unit.sum( + (filer & claimed) * (person("is_irs_aged", period).astype(int) + person("is_blind", period)) ) + aged_blind_count = ( + tax_unit("aged_blind_count", period) - claimed_aged_blind_count + ) personal_aged_blind_exemption_count = ( personal_exemption_count + aged_blind_count ) From 97ca53c801e06dd5f07eb0257061e0c5c308912c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 07:30:28 -0400 Subject: [PATCH 4/8] Project the claimable-filer flag to persons in Arizona's dependent credit and rebate Both formulas combined a tax-unit array with a person array, which only broadcasts when the simulation has one tax unit. The property test's vectorized population caught it. Co-Authored-By: Claude Opus 5.5 --- .../states/az/tax/income/credits/az_families_tax_rebate.py | 4 +++- .../dependent_credit/az_dependent_tax_credit_potential.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py index 6ec5345039c..c846662852a 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py @@ -54,7 +54,9 @@ def formula(tax_unit, period, parameters): # (IRC 152(b)(1)). The rebate is computed on the 2021 return, so this # reads the 2021 inputs. filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) - dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent + dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( + filer_is_dependent + ) age = person("age", period) # Get counts by age group for max dependent limit prioritization diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py b/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py index bb887ccc8e8..9483c70f3b1 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py @@ -21,7 +21,9 @@ def formula(tax_unit, period, parameters): # IRC 152(b)(1) a return on which the filer (or, if joint, either # spouse) can be claimed as a dependent has no dependents. filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) - dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent + dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( + filer_is_dependent + ) age = person("age", period) dependent_amount = p.amount.calc(age) * dependent amount = tax_unit.sum(dependent_amount) From 5843a311602e170565f742aa196b97528c384544 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 10 Oct 2026 08:49:49 -0400 Subject: [PATCH 5/8] Address review: keep the rules in reforms, count filers directly, per-dependent relationship fallback, farm income - The Arizona, Arkansas and California dependent credit reforms, the California entry of the state dependent exemption repeal and AB 2591 replaced the changed formulas with the old ones; they now apply the same rules (California through shared helpers in ca_exemptions and ca_standard_deduction), with default-parity cases. - Arizona's family and excise credits count the filers directly on a claimable return, so a tax_unit_size input cannot carry dependents in. - Arkansas's disabled-dependent credit decides an unknown relationship from the dependent's own parent ids, not the household's; the comment records that parent ids also name step-parents. - The California dependent worksheet reads the new dependent_standard_deduction_earned_income, which counts farm income (Schedule 1 line 6) like the federal worksheet. - The property test adds renters who lived with the claimer and disabled dependents with and without parent ids. Co-Authored-By: Claude Opus 5.5 --- changelog.d/claimable-filer-az-ar-ca.fixed.md | 2 +- .../az/tax/income/rebate/max_dependents.yaml | 4 +- .../repeal_state_dependent_exemptions.py | 16 +++-- .../ar_dependent_credit_reform.py | 7 +- .../az_dependent_credit_reform.py | 10 ++- .../reforms/states/ca/ab2591/ab2591.py | 12 +++- .../ca_dependent_credit_reform.py | 22 +++++-- ...est_claimable_filer_az_ar_ca_invariants.py | 52 ++++++++++++++- ...dent_standard_deduction_earned_income.yaml | 66 +++++++++++++++++++ ...ar_personal_credit_disabled_dependent.yaml | 34 ++++++++++ .../az_family_tax_credit_potential.yaml | 54 +++++++++++++++ .../az_increased_excise_tax_credit.yaml | 54 +++++++++++++++ .../az_dependent_tax_credit_potential.yaml | 33 +++++++++- .../standard/ca_standard_deduction.yaml | 22 +++++++ .../repeal_state_dependent_exemptions.yaml | 41 ++++++++++++ .../ar/dependent_credit_reform_test.yaml | 41 ++++++++++++ .../az/dependent_credit_reform_test.yaml | 41 ++++++++++++ .../contrib/states/ca/ab2591/ca_ab2591.yaml | 47 +++++++++++++ .../ca/dependent_credit_reform_test.yaml | 41 ++++++++++++ ...endent_standard_deduction_earned_income.py | 35 ++++++++++ .../ar_personal_credit_disabled_dependent.py | 18 ++--- .../credits/az_increased_excise_tax_credit.py | 14 ++-- .../az_family_tax_credit_potential.py | 7 +- .../standard/ca_standard_deduction.py | 42 ++++++------ .../ca/tax/income/exemptions/ca_exemptions.py | 56 +++++++++------- 25 files changed, 679 insertions(+), 92 deletions(-) create mode 100644 policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml create mode 100644 policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py diff --git a/changelog.d/claimable-filer-az-ar-ca.fixed.md b/changelog.d/claimable-filer-az-ar-ca.fixed.md index b0ef687d062..ea05dfaab95 100644 --- a/changelog.d/claimable-filer-az-ar-ca.fixed.md +++ b/changelog.d/claimable-filer-az-ar-ca.fixed.md @@ -1 +1 @@ -Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent. A return on which the filer (or, if joint, either spouse) can be claimed counts no dependents for Arizona's dependent credit, family credit and 2021 families rebate, Arkansas's dependent credit, disabled-dependent credit (except for a filer's own child) and low-income tables, or California's dependent exemption credit, and gets no childless CalEITC or foster youth credit. A claimable filer loses California's personal, senior and blind credits and is not counted for Arizona's excise credit. California's standard deduction follows its dependent worksheet, and its renter credit excludes a claimable filer who lived in the claimer's home (new input `lives_with_claiming_taxpayer`). California's 2025 joint renter credit income limit is now $107,988. Arizona's 2021 families rebate counts at most three dependents on a joint return, as on every other return (Laws 2023, ch. 147, sec. 3(E)). +Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent. A return on which the filer (or, if joint, either spouse) can be claimed counts no dependents for Arizona's dependent credit, family credit and 2021 families rebate, Arkansas's dependent credit, disabled-dependent credit (except for a filer's own child) and low-income tables, or California's dependent exemption credit, and gets no childless CalEITC or foster youth credit. A claimable filer loses California's personal, senior and blind credits and is not counted for Arizona's excise credit. California's standard deduction follows its dependent worksheet, and its renter credit excludes a claimable filer who lived in the claimer's home (new input `lives_with_claiming_taxpayer`). California's 2025 joint renter credit income limit is now $107,988. Arizona's 2021 families rebate counts at most three dependents on a joint return, as on every other return (Laws 2023, ch. 147, sec. 3(E)). The Arizona, Arkansas and California dependent credit reforms, the state dependent exemption repeal and California's AB 2591 reform keep these rules, and the California dependent worksheet counts farm income as earned income (new `dependent_standard_deduction_earned_income`). diff --git a/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml b/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml index c6a3ef77a85..f333b260637 100644 --- a/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml +++ b/policyengine_us/parameters/gov/states/az/tax/income/rebate/max_dependents.yaml @@ -9,9 +9,7 @@ metadata: reference: - title: Arizona Families Tax Rebate href: https://azdor.gov/individuals/arizona-families-tax-rebate - - title: SB1734 - Arizona Families Tax Rebate - href: https://www.azleg.gov/legtext/56leg/1r/laws/0147.htm - - title: Laws 2023, ch. 147, sec. 3(C), (E) + - title: SB1734 - Arizona Families Tax Rebate (Laws 2023, ch. 147), sec. 3(C), (E) href: https://www.azleg.gov/legtext/56leg/1R/laws/0147.pdf#page=4 SINGLE: 2021-01-01: 3 diff --git a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py index 55765f89e4b..df2c4a3c059 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py +++ b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py @@ -1,5 +1,8 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ +from policyengine_us.variables.gov.states.ca.tax.income.exemptions.ca_exemptions import ( + ca_personal_aged_blind_exemption_count, +) def create_repeal_state_dependent_exemptions() -> Reform: @@ -239,17 +242,18 @@ def formula(tax_unit, period, parameters): over_agi_threshold / p.phase_out.increment[filing_status] ) exemption_reduction = increments * p.phase_out.amount - # Personal Exemptions - personal_exemption_count = p.personal_scale[filing_status] - personal_aged_blind_exemption_count = personal_exemption_count + tax_unit( - "aged_blind_count", period + # Personal, blind and senior exemptions, as in the baseline + # (none for a filer who can be claimed elsewhere) + personal_aged_blind_exemption_count = ( + ca_personal_aged_blind_exemption_count( + tax_unit, period, p, filing_status + ) ) personal_aged_blind_exemption = max_( 0, personal_aged_blind_exemption_count * (p.amount - exemption_reduction), ) - # Dependent exemptions - # total exemptions + # Dependent exemptions repealed return personal_aged_blind_exemption class ga_exemptions(Variable): diff --git a/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py b/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py index 2e12a55fa4c..2e62c73fc61 100644 --- a/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py +++ b/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py @@ -18,7 +18,12 @@ def formula(person, period, parameters): # age; this person-level amount is summed via adds in # ar_personal_credits_potential, so the age gate composes. p = parameters(period).gov.contrib.states.ar.dependent_credit - is_dependent = person("is_tax_unit_dependent", period) + # As in the baseline, a return on which the filer (or, if joint, + # either spouse) can be claimed has no dependents (IRC 152(b)(1)). + filer_is_dependent = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere", period + ) + is_dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent if p.age_limit.in_effect: age = person("age", period) eligible = is_dependent & (age < p.age_limit.threshold) diff --git a/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py b/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py index 02f1d3fe14d..02395b753db 100644 --- a/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py +++ b/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py @@ -21,7 +21,15 @@ def formula(tax_unit, period, parameters): period ).gov.states.az.tax.income.credits.dependent_credit p = parameters(period).gov.contrib.states.az.dependent_credit - dependent = person("is_tax_unit_dependent", period) + # As in the baseline, a return on which the filer (or, if joint, + # either spouse) can be claimed has no dependents (A.R.S. + # 43-1001(3), IRC 152(b)(1)). + filer_is_dependent = tax_unit( + "head_or_spouse_is_dependent_elsewhere", period + ) + dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( + filer_is_dependent + ) age = person("age", period) if p.age_limit.in_effect: eligible = dependent & (age < p.age_limit.threshold) diff --git a/policyengine_us/reforms/states/ca/ab2591/ab2591.py b/policyengine_us/reforms/states/ca/ab2591/ab2591.py index 4a73035d27f..2dade84f10d 100644 --- a/policyengine_us/reforms/states/ca/ab2591/ab2591.py +++ b/policyengine_us/reforms/states/ca/ab2591/ab2591.py @@ -1,5 +1,8 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ +from policyengine_us.variables.gov.states.ca.tax.income.deductions.standard.ca_standard_deduction import ( + ca_dependent_standard_deduction_limit, +) def create_ca_ab2591() -> Reform: @@ -52,7 +55,14 @@ def formula(tax_unit, period, parameters): # statutory standard deduction. elected_deduction = max_(fpl_deduction, baseline_deduction) - return where(p_ab2591.in_effect, elected_deduction, baseline_deduction) + deduction = where(p_ab2591.in_effect, elected_deduction, baseline_deduction) + # Assumes the bill leaves 17073.5(c)(2) in place, so the IRC + # 63(c)(5) limit for a filer who can be claimed as a dependent + # applies to whichever deduction is taken (and to the baseline + # amount in years the election is not in effect). + return ca_dependent_standard_deduction_limit( + tax_unit, period, parameters, deduction + ) class reform(Reform): def apply(self): diff --git a/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py b/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py index d190f71b159..5b62c271a95 100644 --- a/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py +++ b/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py @@ -1,5 +1,8 @@ from policyengine_us.model_api import * from policyengine_core.periods import period as period_ +from policyengine_us.variables.gov.states.ca.tax.income.exemptions.ca_exemptions import ( + ca_personal_aged_blind_exemption_count, +) def create_ca_dependent_credit_reform() -> Reform: @@ -25,10 +28,12 @@ def formula(tax_unit, period, parameters): ) exemption_reduction = increments * p.phase_out.amount - # Personal exemptions (unchanged) - personal_exemption_count = p.personal_scale[filing_status] - personal_aged_blind_exemption_count = personal_exemption_count + tax_unit( - "aged_blind_count", period + # Personal, blind and senior exemptions (unchanged from baseline, + # including the rules for a filer who can be claimed elsewhere) + personal_aged_blind_exemption_count = ( + ca_personal_aged_blind_exemption_count( + tax_unit, period, p, filing_status + ) ) personal_aged_blind_exemption = max_( 0, @@ -40,7 +45,14 @@ def formula(tax_unit, period, parameters): # dependent is age-eligible, matching the baseline count. person = tax_unit.members age = person("age", period) - is_dependent = person("is_tax_unit_dependent", period) + # As in the baseline, a return on which the filer (or, if joint, + # either spouse) can be claimed has no dependents (IRC 152(b)(1)). + filer_is_dependent = tax_unit( + "head_or_spouse_is_dependent_elsewhere", period + ) + is_dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( + filer_is_dependent + ) if c.age_limit.in_effect: eligible = is_dependent & (age < c.age_limit.threshold) else: diff --git a/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py b/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py index af314ccc7f4..6e45ea4059b 100644 --- a/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py +++ b/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py @@ -7,8 +7,10 @@ credit and renter credit apply IRC 151(d)(2) and 152(b)(1) and each state's own text. -For couples drawn by Hypothesis and a seeded population in the three states, -with either, both or neither spouse claimed: +For couples drawn by Hypothesis, a seeded population and crafted cases in the +three states (renters who lived with the person who can claim them, and a +disabled dependent who is a filer's own child, someone else's child, or of +unknown relationship), with either, both or neither spouse claimed: 1. Swap invariance: each output is the same under either head/spouse labelling. @@ -74,6 +76,46 @@ def _identities(sim, year): assert not _calc(sim, "az_increased_excise_tax_credit", year)[every_filer].any() +def _claimable_rule_cases(): + """Cases for the inputs the shared strategies never set.""" + renter = { + "age": 20, + "employment_income": 2_000.0, + "rent": 6_000.0, + "lives_with_claiming_taxpayer": True, + } + earner = {"age": 30, "person_id": 1, "employment_income": 20_000.0} + cases = [] + for state in STATES: + for claimed in CLAIM_PATTERNS: + cases.append( + { + "state": state, + "adults": [ + {**renter, "person_id": 1}, + {**renter, "person_id": 2, "age": 22}, + ], + "dependents": [], + "claimed": claimed, + } + ) + # Parent id 1 is the first adult; 99 is a parent outside the + # household; no id leaves the relationship unknown. + for parent in (1, 99, None): + dependent = {"age": 8, "is_disabled": True, "person_id": 3} + if parent is not None: + dependent["parent_1_id"] = parent + cases.append( + { + "state": state, + "adults": [earner, {"age": 32, "person_id": 2}], + "dependents": [dependent], + "claimed": claimed, + } + ) + return cases + + @st.composite def couples(draw): return { @@ -97,6 +139,10 @@ def test_az_ar_ca_claimable_filer_rules_are_label_free(year, units): @pytest.mark.parametrize("year", YEARS) def test_az_ar_ca_claimable_filer_rules_seeded_population(year): - units = _seeded_couples(STATES, per_state=3) + _crafted_cases(STATES) + units = ( + _seeded_couples(STATES, per_state=3) + + _crafted_cases(STATES) + + _claimable_rule_cases() + ) check_swap(units, year, OUTPUTS, _identities) check_monotone(units, year, MONOTONE, _identities) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml new file mode 100644 index 00000000000..87a69669c3e --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml @@ -0,0 +1,66 @@ +# Standard Deduction Worksheet for Dependents (2025 Form 1040 instructions, +# p.35): earned income is Form 1040 line 1z plus Schedule 1 lines 3, 6, 8r, +# 8t and 8u, less Schedule 1 line 15 (the deductible part of +# self-employment tax), for the filers only. + +- name: 2025 wages count in full + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + tax_units: + tax_unit: + members: [filer] + output: + dependent_standard_deduction_earned_income: 2_000 + +- name: 2025 farm income counts, less the deductible part of self-employment tax + period: 2025 + absolute_error_margin: 0.01 + input: + people: + filer: + age: 19 + farm_operations_income: 2_000 + tax_units: + tax_unit: + members: [filer] + output: + # $2,000 x 0.9235 x 0.153 / 2 = $141.30 deductible. + dependent_standard_deduction_earned_income: 1_858.70 + +- name: 2025 joint return adds both spouses' earnings and leaves out a dependent's + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 1_000 + person_b: + age: 22 + employment_income: 1_500 + child: + age: 16 + employment_income: 5_000 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + output: + dependent_standard_deduction_earned_income: 2_500 + +- name: 2025 a farm loss larger than wages leaves zero + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 1_000 + farm_operations_income: -3_000 + tax_units: + tax_unit: + members: [filer] + output: + dependent_standard_deduction_earned_income: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml index 42e399e18b4..d77a4855722 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml @@ -455,3 +455,37 @@ state_code: AR output: ar_personal_credit_disabled_dependent: [0, 0, 500] + +- name: 2025 parent ids elsewhere in the household do not decide whose child an unlinked disabled dependent is + period: 2025 + input: + people: + filer_a: + age: 19 + person_id: 1 + claimed_as_dependent_on_another_return: true + child_a: + age: 6 + person_id: 2 + is_disabled: true + adult_b: + age: 40 + person_id: 3 + child_b: + age: 10 + person_id: 4 + parent_1_id: 3 + tax_units: + tax_unit_a: + members: [filer_a, child_a] + filing_status: SINGLE + tax_unit_b: + members: [adult_b, child_b] + households: + household: + members: [filer_a, child_a, adult_b, child_b] + state_code: AR + output: + # child_a has no parent ids of their own, so the relationship is unknown + # and the child route stays open; child_b is not disabled. + ar_personal_credit_disabled_dependent: [0, 500, 0, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml index ac919a722fc..5375c33ab3f 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_family_tax_credit_potential.yaml @@ -146,3 +146,57 @@ output: # $40 x 3. az_family_tax_credit_potential: 120 + +- name: 2025 joint return with one claimable spouse and a tax unit size input counts only the filers (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + tax_unit_size: 4 + households: + household: + members: [person_a, person_b] + state_code: AZ + output: + # $40 x 2 filers. A tax unit size of 4 does not say who the + # other two are; a return with a claimable filer counts no dependents. + az_family_tax_credit_potential: 80 + +- name: 2025 joint return with one claimable spouse and a tax unit size input counts only the filers (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + tax_unit_size: 4 + households: + household: + members: [person_b, person_a] + state_code: AZ + output: + # $40 x 2 filers. A tax unit size of 4 does not say who the + # other two are; a return with a claimable filer counts no dependents. + az_family_tax_credit_potential: 80 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml index a813e364ba0..729598d9408 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml @@ -349,3 +349,57 @@ output: # $25 x 3. az_increased_excise_tax_credit: 75 + +- name: 2025 joint return with one claimable spouse and a tax unit size input counts only the filers (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + tax_unit_size: 4 + households: + household: + members: [person_a, person_b] + state_code: AZ + output: + # $25 for the spouse who cannot be claimed. A tax unit size of 4 does not say who the + # other two are; a return with a claimable filer counts no dependents. + az_increased_excise_tax_credit: 25 + +- name: 2025 joint return with one claimable spouse and a tax unit size input counts only the filers (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + tax_unit_size: 4 + households: + household: + members: [person_b, person_a] + state_code: AZ + output: + # $25 for the spouse who cannot be claimed. A tax unit size of 4 does not say who the + # other two are; a return with a claimable filer counts no dependents. + az_increased_excise_tax_credit: 25 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml index 40d42d87826..91ad27a3aa1 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml @@ -146,15 +146,19 @@ output: az_dependent_tax_credit_potential: 100 -- name: 2026 joint return with one claimable spouse gets no dependent credit +- name: 2026 joint return with one claimable spouse gets no dependent credit (the claimable spouse is the head) period: 2026 input: people: person_a: age: 20 claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false person_b: age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true child: age: 5 tax_units: @@ -169,6 +173,33 @@ output: az_dependent_tax_credit_potential: 0 +- name: 2026 joint return with one claimable spouse gets no dependent credit (the claimable spouse is the spouse) + period: 2026 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + adjusted_gross_income: 10_000 + households: + household: + members: [person_b, person_a, child] + state_code: AZ + output: + az_dependent_tax_credit_potential: 0 + - name: 2026 joint return with neither spouse claimable gets $125 for a child period: 2026 input: diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml index 0440cde47fc..9e629ea4553 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml @@ -215,3 +215,25 @@ output: # min($4,803, max($1,100, $3,000 + $350)). ca_standard_deduction: 3_350 + +- name: 2025 single filer who can be claimed counts farm income as earned income on the dependent worksheet + period: 2025 + absolute_error_margin: 0.01 + input: + people: + filer: + age: 19 + farm_operations_income: 2_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # Federal worksheet earned income includes Schedule 1 line 6 (farm) less + # line 15: $2,000 - $2,000 x 0.9235 x 0.153 / 2 = $1,858.70; plus $450. + ca_standard_deduction: 2_308.70 diff --git a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml index 2c9f3842667..d894bfde11b 100644 --- a/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml +++ b/policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml @@ -151,3 +151,44 @@ output: # Baseline keeps the dependent add: 7,600 + 1 x 1,000 + 6,800 = 15,400. ma_income_tax_exemption_threshold: 15_400 + +# California keeps its personal credits under the repeal, with the baseline's +# rule that a filer who can be claimed as a dependent gets none (RTC 17054; +# Form 540 line 7). 2025: $153 per credit. +- name: California single filer who can be claimed keeps no personal credit under the repeal + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + filer: {age: 30, claimed_as_dependent_on_another_return: true} + tax_units: {tax_unit: {members: [filer], filing_status: SINGLE}} + households: {household: {members: [filer], state_code: CA}} + output: + ca_exemptions: 0 + +- name: California joint return with one claimable spouse keeps one personal credit under the repeal (the claimable spouse is the head) + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + person_a: {age: 30, claimed_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 30, is_tax_unit_head: false, is_tax_unit_spouse: true} + tax_units: {tax_unit: {members: [person_a, person_b], filing_status: JOINT}} + households: {household: {members: [person_a, person_b], state_code: CA}} + output: + ca_exemptions: 153 + +- name: California joint return with one claimable spouse keeps one personal credit under the repeal (the claimable spouse is the spouse) + period: 2025 + reforms: policyengine_us.reforms.state_dependent_exemptions.repeal_state_dependent_exemptions.repeal_state_dependent_exemptions + input: + gov.contrib.repeal_state_dependent_exemptions.in_effect: true + people: + person_b: {age: 30, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 30, claimed_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + tax_units: {tax_unit: {members: [person_b, person_a], filing_status: JOINT}} + households: {household: {members: [person_b, person_a], state_code: CA}} + output: + ca_exemptions: 153 diff --git a/policyengine_us/tests/policy/contrib/states/ar/dependent_credit_reform_test.yaml b/policyengine_us/tests/policy/contrib/states/ar/dependent_credit_reform_test.yaml index 5f2473f69f6..126c4c24b55 100644 --- a/policyengine_us/tests/policy/contrib/states/ar/dependent_credit_reform_test.yaml +++ b/policyengine_us/tests/policy/contrib/states/ar/dependent_credit_reform_test.yaml @@ -185,3 +185,44 @@ # Dependent one year under the limit (12 < 13) receives the credit. # Head personal credit 29 + 1 dependent * 29 = 58. output: {ar_personal_credits: 58} + +# With default settings the reform keeps the baseline's rule for a filer who +# can be claimed as a dependent: no dependent credits (IRC 152(b)(1)), while +# each filer keeps their own $29 credit. +- name: AR dependent credit reform - default keeps only the own credit for a single filer who can be claimed + period: 2025 + reforms: policyengine_us.reforms.states.ar.dependent_credit.ar_dependent_credit_reform.ar_dependent_credit_reform + input: + gov.contrib.states.ar.dependent_credit.in_effect: true + people: + filer: {age: 30, claimed_as_dependent_on_another_return: true} + child: {age: 5} + tax_units: {tax_unit: {members: [filer, child], filing_status: SINGLE}} + households: {household: {members: [filer, child], state_name: AR}} + output: {ar_personal_credits_potential: 29} + +- name: AR dependent credit reform - default keeps both own credits but no dependent credit on a joint return with a claimable spouse (the claimable spouse is the head) + period: 2025 + reforms: policyengine_us.reforms.states.ar.dependent_credit.ar_dependent_credit_reform.ar_dependent_credit_reform + input: + gov.contrib.states.ar.dependent_credit.in_effect: true + people: + person_a: {age: 30, claimed_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 30, is_tax_unit_head: false, is_tax_unit_spouse: true} + child: {age: 5} + tax_units: {tax_unit: {members: [person_a, person_b, child], filing_status: JOINT}} + households: {household: {members: [person_a, person_b, child], state_name: AR}} + output: {ar_personal_credits_potential: 58} + +- name: AR dependent credit reform - default keeps both own credits but no dependent credit on a joint return with a claimable spouse (the claimable spouse is the spouse) + period: 2025 + reforms: policyengine_us.reforms.states.ar.dependent_credit.ar_dependent_credit_reform.ar_dependent_credit_reform + input: + gov.contrib.states.ar.dependent_credit.in_effect: true + people: + person_b: {age: 30, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 30, claimed_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + child: {age: 5} + tax_units: {tax_unit: {members: [person_b, person_a, child], filing_status: JOINT}} + households: {household: {members: [person_b, person_a, child], state_name: AR}} + output: {ar_personal_credits_potential: 58} diff --git a/policyengine_us/tests/policy/contrib/states/az/dependent_credit_reform_test.yaml b/policyengine_us/tests/policy/contrib/states/az/dependent_credit_reform_test.yaml index b2c60223698..365fd09780c 100644 --- a/policyengine_us/tests/policy/contrib/states/az/dependent_credit_reform_test.yaml +++ b/policyengine_us/tests/policy/contrib/states/az/dependent_credit_reform_test.yaml @@ -71,3 +71,44 @@ households: {household: {members: [parent, child1], state_name: AZ}} # Dependent one year under the limit (12 < 13) receives the credit. output: {az_dependent_tax_credit_potential: 100} + +# With default settings the reform keeps the baseline's rule for a filer who +# can be claimed as a dependent: such a return has no dependents (A.R.S. +# 43-1001(3), IRC 152(b)(1)). +- name: AZ dependent credit reform - default keeps no dependent credit for a single filer who can be claimed + period: 2025 + reforms: policyengine_us.reforms.states.az.dependent_credit.az_dependent_credit_reform.az_dependent_credit_reform + input: + gov.contrib.states.az.dependent_credit.in_effect: true + people: + filer: {age: 19, claimed_as_dependent_on_another_return: true} + child: {age: 5} + tax_units: {tax_unit: {members: [filer, child], filing_status: SINGLE, adjusted_gross_income: 10_000}} + households: {household: {members: [filer, child], state_name: AZ}} + output: {az_dependent_tax_credit_potential: 0} + +- name: AZ dependent credit reform - default keeps no dependent credit on a joint return with a claimable spouse (the claimable spouse is the head) + period: 2025 + reforms: policyengine_us.reforms.states.az.dependent_credit.az_dependent_credit_reform.az_dependent_credit_reform + input: + gov.contrib.states.az.dependent_credit.in_effect: true + people: + person_a: {age: 20, claimed_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 22, is_tax_unit_head: false, is_tax_unit_spouse: true} + child: {age: 5} + tax_units: {tax_unit: {members: [person_a, person_b, child], filing_status: JOINT, adjusted_gross_income: 10_000}} + households: {household: {members: [person_a, person_b, child], state_name: AZ}} + output: {az_dependent_tax_credit_potential: 0} + +- name: AZ dependent credit reform - default keeps no dependent credit on a joint return with a claimable spouse (the claimable spouse is the spouse) + period: 2025 + reforms: policyengine_us.reforms.states.az.dependent_credit.az_dependent_credit_reform.az_dependent_credit_reform + input: + gov.contrib.states.az.dependent_credit.in_effect: true + people: + person_b: {age: 22, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 20, claimed_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + child: {age: 5} + tax_units: {tax_unit: {members: [person_b, person_a, child], filing_status: JOINT, adjusted_gross_income: 10_000}} + households: {household: {members: [person_b, person_a, child], state_name: AZ}} + output: {az_dependent_tax_credit_potential: 0} diff --git a/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml b/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml index 760f94e4e75..e63768d4b34 100644 --- a/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml +++ b/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml @@ -208,3 +208,50 @@ output: # ca_standard_deduction is defined_for=CA, so non-CA returns 0 ca_standard_deduction: 0 + +# The dependent worksheet (RTC 17073.5(c)(2), IRC 63(c)(5)) still limits the +# deduction of a filer who can be claimed as a dependent: in a year the +# election is not in effect (the baseline amount), and, assuming the bill +# leaves (c)(2) in place, on the elected amount. +- name: Single filer who can be claimed uses the dependent worksheet in a year the election is not in effect. + period: 2025 + reforms: policyengine_us.reforms.states.ca.ab2591.ab2591.ca_ab2591 + input: + people: + person1: + age: 19 + employment_income: 2_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + households: + household: + members: [person1] + state_code: CA + output: + # max($1,350, $2,000 + $450) = $2,450 < $5,706. + ca_standard_deduction: 2_450 + +- name: Single filer who can be claimed and has no earnings is limited to the dependent minimum under the election. + period: 2027 + absolute_error_margin: 1 + reforms: policyengine_us.reforms.states.ca.ab2591.ab2591.ca_ab2591 + input: + gov.contrib.states.ca.ab2591.in_effect: true + people: + person1: + age: 19 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person1] + filing_status: SINGLE + households: + household: + members: [person1] + state_code: CA + output: + # min($16,334 one-person FPL, max($1,400, $0 + $500)) = $1,400. + ca_standard_deduction: 1_400 diff --git a/policyengine_us/tests/policy/contrib/states/ca/dependent_credit_reform_test.yaml b/policyengine_us/tests/policy/contrib/states/ca/dependent_credit_reform_test.yaml index 26038834ab8..dd0430a8a48 100644 --- a/policyengine_us/tests/policy/contrib/states/ca/dependent_credit_reform_test.yaml +++ b/policyengine_us/tests/policy/contrib/states/ca/dependent_credit_reform_test.yaml @@ -86,3 +86,44 @@ households: {household: {members: [parent, child1], state_name: CA}} # Dependent one year under the limit (12 < 13) is re-priced to the reform amount. output: {ca_exemptions: 1_153} # 153 personal + 1,000 young + +# With default settings the reform keeps the baseline's rules for a filer who +# can be claimed as a dependent: no own personal credit for that filer +# (RTC 17054; Form 540 line 7) and no dependent credits (IRC 152(b)(1)). +- name: CA dependent credit reform - default keeps no exemption credits for a single filer who can be claimed + period: 2025 + reforms: policyengine_us.reforms.states.ca.dependent_credit.ca_dependent_credit_reform.ca_dependent_credit_reform + input: + gov.contrib.states.ca.dependent_credit.in_effect: true + people: + filer: {age: 30, claimed_as_dependent_on_another_return: true} + child: {age: 5} + tax_units: {tax_unit: {members: [filer, child], filing_status: SINGLE}} + households: {household: {members: [filer, child], state_name: CA}} + output: {ca_exemptions: 0} + +- name: CA dependent credit reform - default keeps only the other spouse's personal credit on a joint return with a claimable spouse (the claimable spouse is the head) + period: 2025 + reforms: policyengine_us.reforms.states.ca.dependent_credit.ca_dependent_credit_reform.ca_dependent_credit_reform + input: + gov.contrib.states.ca.dependent_credit.in_effect: true + people: + person_a: {age: 30, claimed_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 30, is_tax_unit_head: false, is_tax_unit_spouse: true} + child: {age: 5} + tax_units: {tax_unit: {members: [person_a, person_b, child], filing_status: JOINT}} + households: {household: {members: [person_a, person_b, child], state_name: CA}} + output: {ca_exemptions: 153} + +- name: CA dependent credit reform - default keeps only the other spouse's personal credit on a joint return with a claimable spouse (the claimable spouse is the spouse) + period: 2025 + reforms: policyengine_us.reforms.states.ca.dependent_credit.ca_dependent_credit_reform.ca_dependent_credit_reform + input: + gov.contrib.states.ca.dependent_credit.in_effect: true + people: + person_b: {age: 30, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 30, claimed_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + child: {age: 5} + tax_units: {tax_unit: {members: [person_b, person_a, child], filing_status: JOINT}} + households: {household: {members: [person_b, person_a, child], state_name: CA}} + output: {ca_exemptions: 153} diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py new file mode 100644 index 00000000000..7e6f0bacdcb --- /dev/null +++ b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py @@ -0,0 +1,35 @@ +from policyengine_us.model_api import * + + +class dependent_standard_deduction_earned_income(Variable): + value_type = float + entity = TaxUnit + label = "Earned income for the standard deduction worksheet for dependents" + unit = USD + documentation = ( + "The filers' earned income as the Standard Deduction Worksheet for " + "Dependents defines it: wages, self-employment income and farm " + "income, less the deductible part of self-employment tax, and not " + "below zero." + ) + definition_period = YEAR + reference = ( + "https://www.law.cornell.edu/uscode/text/26/63#c_5", + # Standard Deduction Worksheet for Dependents, earned income note: + # Form 1040 line 1z and Schedule 1 lines 3, 6, 8r, 8t and 8u, less + # Schedule 1 line 15. + "https://www.irs.gov/pub/irs-prior/i1040gi--2025.pdf#page=35", + ) + + def formula(tax_unit, period, parameters): + person = tax_unit.members + filer = person("is_tax_unit_head_or_spouse", period) + # earned_income leaves out Schedule F farm income, which the + # worksheet counts (Schedule 1 line 6). + earned = person("earned_income", period) + person( + "farm_operations_income", period + ) + return max_( + tax_unit.sum(filer * earned) - tax_unit("self_employment_tax_ald", period), + 0, + ) diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py index 6e0520f2f1a..8af79bf01d2 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py @@ -1,6 +1,6 @@ from policyengine_us.model_api import * from policyengine_us.variables.household.demographic.person._parent_links import ( - household_has_parent_ids, + has_parent_ids, tax_unit_parent_indices, ) @@ -24,24 +24,26 @@ def formula(person, period, parameters): dependent = person("is_tax_unit_dependent", period) disabled = person("is_disabled", period) # The credit covers an individual who is "a child of the taxpayer's - # blood, an adopted child, or a dependent" in the IRC 152 sense (Act - # 417 of 1999). A return on which the filer (or, if joint, either + # blood, an adopted child, or a dependent" in the IRC 152 sense (Ark. + # Code 26-51-503, Act 417 of 1999). A return on which the filer (or, if joint, either # spouse) can be claimed as a dependent has no IRC 152 dependents # (IRC 152(b)(1)), so only the filers' own children still qualify. filer_is_dependent = person.tax_unit( "head_or_spouse_is_dependent_elsewhere", period ) # A filer's child: a parent id that names a head or spouse of the - # tax unit. Parent ids also name step-parents, which on a joint - # return covers the other spouse's own child. Without parent ids the - # model cannot tell a filer's child from another dependent and keeps - # the child route open. + # tax unit. Parent ids name natural, adoptive and step-parents alike, + # so a single filer's stepchild also passes here, though the + # statute's child route covers only blood and adopted children; on a + # joint return a stepchild of one spouse is usually the other's own + # child. A dependent with no parent ids of their own leaves the + # relationship unknown, and the child route stays open. filer = person("is_tax_unit_head_or_spouse", period) first, second = tax_unit_parent_indices(person, period) child_of_filer = np.where(first >= 0, filer[first], False) | np.where( second >= 0, filer[second], False ) - relationship_unknown = ~household_has_parent_ids(person, period) + relationship_unknown = ~has_parent_ids(person, period) qualifies = ~filer_is_dependent | child_of_filer | relationship_unknown disabled_dependent = disabled & dependent & qualifies p = parameters(period).gov.states.ar.tax.income.credits.personal.amount diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py index c091d75dfed..5f97ff1f927 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py @@ -28,17 +28,11 @@ def formula(tax_unit, period, parameters): # filer whom another taxpayer can claim is not counted, and a return # on which the filer (or, if joint, either spouse) can be claimed # counts no dependents (IRC 152(b)(1)). - person = tax_unit.members - filers = tax_unit.sum(person("is_tax_unit_head_or_spouse", period)) - claimed_filers = filers - tax_unit( - "head_spouse_count_not_dependent_elsewhere", period - ) filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) - disallowed_dependents = where( - filer_is_dependent, tax_unit("tax_unit_dependents", period), 0 - ) - persons = ( - tax_unit("tax_unit_size", period) - claimed_filers - disallowed_dependents + persons = where( + filer_is_dependent, + tax_unit("head_spouse_count_not_dependent_elsewhere", period), + tax_unit("tax_unit_size", period), ) uncapped_credit = persons * p.amount return min_(uncapped_credit, p.max_amount) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py index 59dc9591156..6424f33e22f 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py @@ -26,9 +26,8 @@ def formula(tax_unit, period, parameters): # 43-1001(3)), so under IRC 152(b)(1) a return on which the filer (or, # if joint, either spouse) can be claimed counts no dependents. filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) - disallowed_dependents = where( - filer_is_dependent, tax_unit("tax_unit_dependents", period), 0 - ) - persons = tax_unit("tax_unit_size", period) - disallowed_dependents + person = tax_unit.members + filers = tax_unit.sum(person("is_tax_unit_head_or_spouse", period)) + persons = where(filer_is_dependent, filers, tax_unit("tax_unit_size", period)) amount = p.per_person * persons return min_(amount, p.cap[filing_status]) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py b/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py index d6a4126be48..3aab87acefd 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.py @@ -1,6 +1,23 @@ from policyengine_us.model_api import * +def ca_dependent_standard_deduction_limit(tax_unit, period, parameters, amount): + """Apply the California Standard Deduction Worksheet for Dependents. + + RTC 17073.5(c)(2) applies the IRC 63(c)(5) limit, and the Form 540 + worksheet for dependents applies "only if your parent, or someone else, + can claim you (or your spouse/RDP) as a dependent": the deduction is the + smaller of the California amount and the larger of the federal minimum + or earned income plus the federal addition (line 1 carries line 2 of the + federal worksheet). + """ + dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + p = parameters(period).gov.irs.deductions.standard.dependent + earned_income = tax_unit("dependent_standard_deduction_earned_income", period) + limit = max_(p.amount, earned_income + p.additional_earned_income) + return where(dependent_elsewhere, min_(amount, limit), amount) + + class ca_standard_deduction(Variable): value_type = float entity = TaxUnit @@ -18,27 +35,6 @@ class ca_standard_deduction(Variable): def formula(tax_unit, period, parameters): p = parameters(period).gov.states.ca.tax.income.deductions.standard filing_status = tax_unit("filing_status", period) - standard = p.amount[filing_status] - # RTC 17073.5 applies the IRC 63(c)(5) limit, and the Form 540 - # worksheet for dependents applies "only if your parent, or someone - # else, can claim you (or your spouse/RDP) as a dependent": the - # deduction is the smaller of the California amount and the larger of - # the federal minimum or earned income plus the federal addition - # (line 1 carries line 2 of the federal worksheet). - dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) - p_dependent = parameters(period).gov.irs.deductions.standard.dependent - # Federal worksheet earned income: wages and self-employment income - # minus the deductible part of self-employment tax. - earned_income = max_( - tax_unit("tax_unit_earned_income", period) - - tax_unit("self_employment_tax_ald", period), - 0, - ) - dependent_standard = min_( - standard, - max_( - p_dependent.amount, - earned_income + p_dependent.additional_earned_income, - ), + return ca_dependent_standard_deduction_limit( + tax_unit, period, parameters, p.amount[filing_status] ) - return where(dependent_elsewhere, dependent_standard, standard) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py index 2ee5000732b..f50dad2636a 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py @@ -1,6 +1,33 @@ from policyengine_us.model_api import * +def ca_personal_aged_blind_exemption_count(tax_unit, period, p, filing_status): + """Number of personal, blind and senior exemption credits. + + A filer whom another taxpayer can claim as a dependent gets no personal, + blind or senior credit (RTC 17054). The Form 540 line 7 instructions + enter 0 for a single, separate or head of household filer who can be + claimed and, on a joint return, 1 when only one spouse can be claimed and + 0 when both can; lines 8 and 9 say "Do not claim this credit if someone + else can claim you as a dependent". + """ + person = tax_unit.members + filer = person("is_tax_unit_head_or_spouse", period) + claimed = person("claimed_as_dependent_on_another_return", period) + dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + personal_exemption_count = where( + dependent_elsewhere, + tax_unit("head_spouse_count_not_dependent_elsewhere", period), + p.personal_scale[filing_status], + ) + claimed_aged_blind_count = tax_unit.sum( + (filer & claimed) + * (person("is_irs_aged", period).astype(int) + person("is_blind", period)) + ) + aged_blind_count = tax_unit("aged_blind_count", period) - claimed_aged_blind_count + return personal_exemption_count + aged_blind_count + + class ca_exemptions(Variable): value_type = float entity = TaxUnit @@ -25,31 +52,9 @@ def formula(tax_unit, period, parameters): increments = np.ceil(over_agi_threshold / p.phase_out.increment[filing_status]) exemption_reduction = increments * p.phase_out.amount - # A filer whom another taxpayer can claim as a dependent gets no - # personal, blind or senior credit (RTC 17054). The Form 540 line 7 - # instructions enter 0 for a single, separate or head of household - # filer who can be claimed and, on a joint return, 1 when only one - # spouse can be claimed and 0 when both can; lines 8 and 9 say "Do - # not claim this credit if someone else can claim you as a - # dependent". - person = tax_unit.members - filer = person("is_tax_unit_head_or_spouse", period) - claimed = person("claimed_as_dependent_on_another_return", period) - dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) - personal_exemption_count = where( - dependent_elsewhere, - tax_unit("head_spouse_count_not_dependent_elsewhere", period), - p.personal_scale[filing_status], - ) - claimed_aged_blind_count = tax_unit.sum( - (filer & claimed) - * (person("is_irs_aged", period).astype(int) + person("is_blind", period)) - ) - aged_blind_count = ( - tax_unit("aged_blind_count", period) - claimed_aged_blind_count - ) - personal_aged_blind_exemption_count = ( - personal_exemption_count + aged_blind_count + # Personal, blind and senior exemptions + personal_aged_blind_exemption_count = ca_personal_aged_blind_exemption_count( + tax_unit, period, p, filing_status ) personal_aged_blind_exemption = max_( 0, @@ -59,6 +64,7 @@ def formula(tax_unit, period, parameters): # Dependent exemptions: the dependents must be those claimed on the # federal return, and a return on which the filer (or, if joint, # either spouse) can be claimed has none (IRC 152(b)(1)). + dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) dependents = where( dependent_elsewhere, 0, tax_unit("tax_unit_dependents", period) ) From 5fe95ac0ebe2577b833100b5bf2a4b441b4c4d19 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 11 Oct 2026 12:19:33 -0400 Subject: [PATCH 6/8] Read the split claimability inputs from the federal base claimable-filer-federal (35a2cbcbb9) split the input: the plain helpers mean claimability, `claimed_as_dependent_on_another_return` means actually claimed, and `..._without_filing_exception` applies IRC 152(b)(1) with the refund-only exception (Publication 501). So: - Dependent counts (AZ dependent and family credits and 2021 rebate, AR dependent and generic disabled-dependent credits and low-income tables, CA dependent exemption credits, the three dependent credit reforms) and the childless CalEITC read the filing-exception helper. - California's own personal, senior and blind credits and its standard deduction read claimability. - Arizona's excise credit counts only filers who are not actually claimed (A.R.S. 43-1072.01/.02: "not claimed"); California's renter exclusion reads the actual claim (RTC 17053.5(d)(2): "claimed"). - Arkansas's care credit reads cdcc_qualifying_childcare_expenses, so a claimable return without a qualifying child counts no childcare. Co-Authored-By: Claude Opus 5.5 --- .../ar_dependent_credit_reform.py | 4 ++- .../az_dependent_credit_reform.py | 4 ++- .../ca_dependent_credit_reform.py | 4 ++- .../ar/tax/income/credits/ar_federal_cdcc.py | 5 ++- .../personal/ar_personal_credit_dependent.py | 4 ++- .../ar_personal_credit_disabled_dependent.py | 4 ++- .../low_income/ar_low_income_tax_joint.py | 4 ++- .../income/credits/az_families_tax_rebate.py | 6 +++- .../credits/az_increased_excise_tax_credit.py | 31 ++++++++++++------- ...az_increased_excise_tax_credit_eligible.py | 13 ++++---- .../az_dependent_tax_credit_potential.py | 6 +++- .../az_family_tax_credit_eligible.py | 6 +++- .../az_family_tax_credit_potential.py | 6 +++- .../ca/tax/income/credits/ca_renter_credit.py | 9 +++--- .../credits/earned_income/ca_eitc_eligible.py | 6 +++- .../ca/tax/income/exemptions/ca_exemptions.py | 15 +++++---- .../person/lives_with_claiming_taxpayer.py | 6 ++-- 17 files changed, 90 insertions(+), 43 deletions(-) diff --git a/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py b/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py index 2e62c73fc61..0225d496bd4 100644 --- a/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py +++ b/policyengine_us/reforms/states/ar/dependent_credit/ar_dependent_credit_reform.py @@ -20,8 +20,10 @@ def formula(person, period, parameters): p = parameters(period).gov.contrib.states.ar.dependent_credit # As in the baseline, a return on which the filer (or, if joint, # either spouse) can be claimed has no dependents (IRC 152(b)(1)). + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. filer_is_dependent = person.tax_unit( - "head_or_spouse_is_dependent_elsewhere", period + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) is_dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent if p.age_limit.in_effect: diff --git a/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py b/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py index 02395b753db..9021e4cc595 100644 --- a/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py +++ b/policyengine_us/reforms/states/az/dependent_credit/az_dependent_credit_reform.py @@ -24,8 +24,10 @@ def formula(tax_unit, period, parameters): # As in the baseline, a return on which the filer (or, if joint, # either spouse) can be claimed has no dependents (A.R.S. # 43-1001(3), IRC 152(b)(1)). + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. filer_is_dependent = tax_unit( - "head_or_spouse_is_dependent_elsewhere", period + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( filer_is_dependent diff --git a/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py b/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py index 5b62c271a95..c773745e64d 100644 --- a/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py +++ b/policyengine_us/reforms/states/ca/dependent_credit/ca_dependent_credit_reform.py @@ -47,8 +47,10 @@ def formula(tax_unit, period, parameters): age = person("age", period) # As in the baseline, a return on which the filer (or, if joint, # either spouse) can be claimed has no dependents (IRC 152(b)(1)). + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. filer_is_dependent = tax_unit( - "head_or_spouse_is_dependent_elsewhere", period + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) is_dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( filer_is_dependent diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_federal_cdcc.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_federal_cdcc.py index 781301b7760..68d6867a843 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_federal_cdcc.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/ar_federal_cdcc.py @@ -28,7 +28,10 @@ def formula(tax_unit, period, parameters): # AR2441 header: the IRC ยง 21(e)(2) and (4) special rules apply. eligible = tax_unit("cdcc_filing_status_eligible", period) # AR2441 lines 2-3: qualified expenses, capped per qualifying person. - childcare = tax_unit("tax_unit_childcare_expenses", period) + # Childcare counts only for a qualifying individual (IRC 21(b)(2)(A)); + # cdcc_qualifying_childcare_expenses leaves it out when a filer can be + # claimed as a dependent and no child qualifies. + childcare = tax_unit("cdcc_qualifying_childcare_expenses", period) adult_care = add(tax_unit, period, ["care_expenses"]) expenses = childcare + adult_care count_eligible = min_( diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py index 877498e6ac7..70db28210b7 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_dependent.py @@ -21,8 +21,10 @@ def formula(person, period, parameters): # 152 (Act 675 of 2005, sec. 14), and under IRC 152(b)(1) a return on # which the filer (or, if joint, either spouse) can be claimed as a # dependent has no dependents. The filers' own credits remain. + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. filer_is_dependent = person.tax_unit( - "head_or_spouse_is_dependent_elsewhere", period + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) dependent = person("is_tax_unit_dependent", period) & ~filer_is_dependent p = parameters(period).gov.states.ar.tax.income.credits.personal.amount diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py index 8af79bf01d2..496b4ce1954 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py @@ -28,8 +28,10 @@ def formula(person, period, parameters): # Code 26-51-503, Act 417 of 1999). A return on which the filer (or, if joint, either # spouse) can be claimed as a dependent has no IRC 152 dependents # (IRC 152(b)(1)), so only the filers' own children still qualify. + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. filer_is_dependent = person.tax_unit( - "head_or_spouse_is_dependent_elsewhere", period + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) # A filer's child: a parent id that names a head or spouse of the # tax unit. Parent ids name natural, adoptive and step-parents alike, diff --git a/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py b/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py index 31a75dac553..bff1a9815f5 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/low_income/ar_low_income_tax_joint.py @@ -21,8 +21,10 @@ def formula(person, period, parameters): # which the filer (or, if joint, either spouse) can be claimed as a # dependent has none (IRC 152(b)(1)). This changes only which table # applies, not the filing status. + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. filer_is_dependent = person.tax_unit( - "head_or_spouse_is_dependent_elsewhere", period + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) dependents = where( filer_is_dependent, 0, person.tax_unit("tax_unit_dependents", period) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py index c846662852a..43fbe37b630 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_families_tax_rebate.py @@ -53,7 +53,11 @@ def formula(tax_unit, period, parameters): # (or, if joint, either spouse) can be claimed as a dependent has none # (IRC 152(b)(1)). The rebate is computed on the 2021 return, so this # reads the 2021 inputs. - filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. + filer_is_dependent = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( filer_is_dependent ) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py index 5f97ff1f927..43140a8a89b 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.py @@ -21,18 +21,27 @@ def formula(tax_unit, period, parameters): # personal or dependent exemption can be claimed for # (A.R.S. 43-1072.01(C)); from 2021, 43-1072.02(C) allows $25 for each # person "who is either the taxpayer, the taxpayer's spouse who does - # not file a return or a dependent". The Form 140 worksheet counts the - # filers and the dependents "provided that person(s) qualifies as a - # dependent for federal purposes", and the instructions let a joint - # filer claim the credit but not for a spouse who is barred. So a - # filer whom another taxpayer can claim is not counted, and a return - # on which the filer (or, if joint, either spouse) can be claimed - # counts no dependents (IRC 152(b)(1)). - filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + # not file a return or a dependent". Both sections allow it only "for + # a taxpayer who is not claimed as a dependent by any other + # taxpayer", and the Form 140 instructions let a joint filer claim the + # credit but not for a spouse who is barred, so a filer whom another + # taxpayer claims is not counted. The worksheet counts dependents + # "provided that person(s) qualifies as a dependent for federal + # purposes": none on a return on which the filer (or, if joint, + # either spouse) can be claimed (IRC 152(b)(1)), unless the would-be + # claimant files only for a refund (Publication 501). + person = tax_unit.members + filer = person("is_tax_unit_head_or_spouse", period) + claimed = person("claimed_as_dependent_on_another_return", period) + claimed_filers = tax_unit.sum(filer & claimed) + unclaimed_filers = tax_unit.sum(filer & ~claimed) + no_dependents = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) persons = where( - filer_is_dependent, - tax_unit("head_spouse_count_not_dependent_elsewhere", period), - tax_unit("tax_unit_size", period), + no_dependents, + unclaimed_filers, + tax_unit("tax_unit_size", period) - claimed_filers, ) uncapped_credit = persons * p.amount return min_(uncapped_credit, p.max_amount) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py index 9c4b90ad87a..9c2eba49a6d 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/az_increased_excise_tax_credit_eligible.py @@ -21,9 +21,10 @@ def formula(tax_unit, period, parameters): max_income = p.income_threshold[filing_status] # A.R.S. 43-1072.01(A) and, from 2021, 43-1072.02(A) allow the credit # only "for a taxpayer who is not claimed as a dependent by any other - # taxpayer". On a joint return a spouse who is not claimed can still - # claim it. - every_filer_is_dependent = tax_unit( - "every_filer_is_dependent_elsewhere", period - ) - return (agi <= max_income) & ~every_filer_is_dependent + # taxpayer" (actually claimed). On a joint return a spouse who is not + # claimed can still claim it. + person = tax_unit.members + filer = person("is_tax_unit_head_or_spouse", period) + claimed = person("claimed_as_dependent_on_another_return", period) + has_unclaimed_filer = tax_unit.any(filer & ~claimed) + return (agi <= max_income) & has_unclaimed_filer diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py b/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py index 9483c70f3b1..150e0922fdd 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.py @@ -20,7 +20,11 @@ def formula(tax_unit, period, parameters): # A.R.S. 43-1001(3) gives "dependent" the IRC 152 meaning, and under # IRC 152(b)(1) a return on which the filer (or, if joint, either # spouse) can be claimed as a dependent has no dependents. - filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. + filer_is_dependent = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) dependent = person("is_tax_unit_dependent", period) & ~tax_unit.project( filer_is_dependent ) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py index e35ae45f124..b28a49436db 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_eligible.py @@ -25,7 +25,11 @@ def formula(tax_unit, period, parameters): # The thresholds count dependents in the IRC 152 sense (A.R.S. # 43-1001(3)); a return on which the filer (or, if joint, either # spouse) can be claimed as a dependent has none (IRC 152(b)(1)). - filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. + filer_is_dependent = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) dependents = where( filer_is_dependent, 0, tax_unit("tax_unit_dependents", period) ) diff --git a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py index 6424f33e22f..005d83c1390 100644 --- a/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py +++ b/policyengine_us/variables/gov/states/az/tax/income/credits/family_tax_credit/az_family_tax_credit_potential.py @@ -25,7 +25,11 @@ def formula(tax_unit, period, parameters): # the taxpayer, but "dependent" has the IRC 152 meaning (A.R.S. # 43-1001(3)), so under IRC 152(b)(1) a return on which the filer (or, # if joint, either spouse) can be claimed counts no dependents. - filer_is_dependent = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 501) restores the dependents. + filer_is_dependent = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) person = tax_unit.members filers = tax_unit.sum(person("is_tax_unit_head_or_spouse", period)) persons = where(filer_is_dependent, filers, tax_unit("tax_unit_size", period)) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py b/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py index 86c28f97713..e8c72796bd8 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_renter_credit.py @@ -25,11 +25,10 @@ def formula(tax_unit, period, parameters): # RTC 17053.5(d)(2): a qualified renter does not include "an # individual whose principal place of residence for more than 50 # percent of the taxable year is with another person who claimed that - # individual as a dependent" (the qualification record asks whether - # someone can claim you and, if so, whether you lived in that - # person's home for more than half the year). Being claimable alone - # does not bar the credit, and on a joint return a spouse who is a - # qualified renter still gets the joint amount (17053.5(a)(1)(A)). + # individual as a dependent", read as actually claimed (the + # qualification record words it as "can claim you"). Being claimable + # alone does not bar the credit, and on a joint return a spouse who is + # a qualified renter still gets the joint amount (17053.5(a)(1)(A)). person = tax_unit.members filer = person("is_tax_unit_head_or_spouse", period) excluded = person("claimed_as_dependent_on_another_return", period) & person( diff --git a/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py b/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py index 438626a3bc9..971e9f31658 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/credits/earned_income/ca_eitc_eligible.py @@ -49,7 +49,11 @@ def formula(tax_unit, period, parameters): has_qualifying_child = tax_unit.any( person("ca_is_qualifying_child_for_caleitc", period) ) - dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + # The would-be claimant's filing exception (not required to file and + # filing only for a refund, Publication 596) restores the credit. + dependent_elsewhere = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) meets_dependency_requirements = has_qualifying_child | ~dependent_elsewhere return ( diff --git a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py index f50dad2636a..e36cc370acf 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/exemptions/ca_exemptions.py @@ -13,18 +13,18 @@ def ca_personal_aged_blind_exemption_count(tax_unit, period, p, filing_status): """ person = tax_unit.members filer = person("is_tax_unit_head_or_spouse", period) - claimed = person("claimed_as_dependent_on_another_return", period) + claimable = person("claimable_as_dependent_on_another_return", period) dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) personal_exemption_count = where( dependent_elsewhere, tax_unit("head_spouse_count_not_dependent_elsewhere", period), p.personal_scale[filing_status], ) - claimed_aged_blind_count = tax_unit.sum( - (filer & claimed) + claimable_aged_blind_count = tax_unit.sum( + (filer & claimable) * (person("is_irs_aged", period).astype(int) + person("is_blind", period)) ) - aged_blind_count = tax_unit("aged_blind_count", period) - claimed_aged_blind_count + aged_blind_count = tax_unit("aged_blind_count", period) - claimable_aged_blind_count return personal_exemption_count + aged_blind_count @@ -63,8 +63,11 @@ def formula(tax_unit, period, parameters): # Dependent exemptions: the dependents must be those claimed on the # federal return, and a return on which the filer (or, if joint, - # either spouse) can be claimed has none (IRC 152(b)(1)). - dependent_elsewhere = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + # either spouse) can be claimed has none (IRC 152(b)(1)), unless the + # would-be claimant files only for a refund (Publication 501). + dependent_elsewhere = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) dependents = where( dependent_elsewhere, 0, tax_unit("tax_unit_dependents", period) ) diff --git a/policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py b/policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py index 59d7cc8de4d..4d2c4d0ad55 100644 --- a/policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py +++ b/policyengine_us/variables/household/demographic/person/lives_with_claiming_taxpayer.py @@ -5,11 +5,11 @@ class lives_with_claiming_taxpayer(Variable): value_type = bool entity = Person definition_period = YEAR - label = "Lives with the taxpayer who can claim them as a dependent" + label = "Lives with the taxpayer who claims them as a dependent" documentation = ( "Whether, for more than half the year, the person's principal place " - "of residence was the home of the taxpayer who can claim them as a " + "of residence was the home of the taxpayer who claims them as a " "dependent (see claimed_as_dependent_on_another_return). Rules read " - "it only for a person who can be claimed." + "it only for a person who is claimed." ) reference = ("https://www.ftb.ca.gov/forms/2025/2025-540-booklet.pdf#page=25",) From 3ed80a0d94cfba603f44ba102c4850f142f4223d Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 11 Oct 2026 12:21:15 -0400 Subject: [PATCH 7/8] Add filing-exception, actual-claim and Arkansas care cases; clarify the property test's excise identity Co-Authored-By: Claude Opus 5.5 --- ...est_claimable_filer_az_ar_ca_invariants.py | 4 +- .../tax/income/credits/ar_cdcc_potential.yaml | 28 ++++++++++++ .../az_increased_excise_tax_credit.yaml | 44 +++++++++++++++++++ .../az_dependent_tax_credit_potential.yaml | 24 ++++++++++ .../credits/renter/ca_renter_credit.yaml | 24 ++++++++++ 5 files changed, 123 insertions(+), 1 deletion(-) diff --git a/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py b/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py index 6e45ea4059b..c5b9f1a8812 100644 --- a/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py +++ b/policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py @@ -18,7 +18,9 @@ deduction or eligibility below. 3. Identities: a return with a claimable filer gets no Arizona dependent credit or families rebate and no Arkansas dependent credit, and a return - on which every filer can be claimed gets no Arizona excise credit. + on which every filer is claimed gets no Arizona excise credit (the cases + set the claim input, so claimability follows it and the filing exception + is off). """ import numpy as np diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml index 3541dea11ec..f13782bdccd 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/ar_cdcc_potential.yaml @@ -421,3 +421,31 @@ state_code: AR output: ar_cdcc_potential: 40 + +- name: 2025 single filer who can be claimed counts no childcare for a child who is not a qualifying person + period: 2025 + input: + people: + filer: + age: 30 + employment_income: 50_000 + claimed_as_dependent_on_another_return: true + disabled_adult: + age: 30 + is_incapable_of_self_care: true + child: + age: 2 + tax_units: + tax_unit: + members: [filer, disabled_adult, child] + filing_status: SINGLE + tax_unit_childcare_expenses: 1_000 + households: + household: + members: [filer, disabled_adult, child] + state_code: AR + output: + # The disabled adult is a qualifying person (IRC 21(b)(1)(B)), but the + # child's care is not for a qualifying individual (21(b)(2)(A)), and the + # adult has no care expenses: $0. + ar_cdcc_potential: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml index 729598d9408..6a9f5414780 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/az_increased_excise_tax_credit.yaml @@ -403,3 +403,47 @@ # $25 for the spouse who cannot be claimed. A tax unit size of 4 does not say who the # other two are; a return with a claimable filer counts no dependents. az_increased_excise_tax_credit: 25 + +- name: 2025 single filer who can be claimed but is not claimed gets the excise credit + period: 2025 + input: + people: + filer: + age: 19 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: AZ + output: + # 43-1072.02(A) bars a taxpayer "claimed as a dependent", not one who + # merely can be claimed: $25 x 1. + az_increased_excise_tax_credit: 25 + +- name: 2025 single filer who can be claimed but is not claimed counts no child + period: 2025 + input: + people: + filer: + age: 19 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + households: + household: + members: [filer, child] + state_code: AZ + output: + # The filer counts ($25), but the child is not a federal dependent of a + # claimable filer (IRC 152(b)(1)). + az_increased_excise_tax_credit: 25 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml index 91ad27a3aa1..8edd2f9024b 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/tax/income/credits/dependent_credit/az_dependent_tax_credit_potential.yaml @@ -221,3 +221,27 @@ state_code: AZ output: az_dependent_tax_credit_potential: 125 + +- name: 2025 single filer who can be claimed by a claimant who files only for a refund gets $100 for a child + period: 2025 + input: + people: + filer: + age: 19 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + child: + age: 5 + tax_units: + tax_unit: + members: [filer, child] + filing_status: SINGLE + adjusted_gross_income: 10_000 + households: + household: + members: [filer, child] + state_code: AZ + output: + # Publication 501, Dependent Taxpayer Test: the exception restores the + # filer's own dependents. + az_dependent_tax_credit_potential: 100 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml index cce211742cf..5d1a91aa908 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/renter/ca_renter_credit.yaml @@ -264,3 +264,27 @@ state_code: CA output: ca_renter_credit: 0 + +- name: 2025 single filer who can be claimed but is not claimed is a qualified renter even living with that person + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + rent: 6_000 + claimable_as_dependent_on_another_return: true + claimed_as_dependent_on_another_return: false + lives_with_claiming_taxpayer: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # 17053.5(d)(2) excludes an individual living with "another person who + # claimed that individual as a dependent". + ca_renter_credit: 60 From ff5a45308b522db1075e41fd98aa470df7151439 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 11 Oct 2026 14:34:15 -0400 Subject: [PATCH 8/8] Address review r2: taxable wages in the dependent worksheet, a stepchild input for Arkansas, joint AB 2591 cases - dependent_standard_deduction_earned_income uses irs_employment_income (after elective deferrals, Form 1040 line 1z) plus self-employment and farm income, less the deductible part of self-employment tax. - ar_personal_credit_disabled_child_of_filer (new, overridable) carries the credit's birth-or-adoption child route, defaulting from parent ids (or true without ids); an input marks a stepchild. - Joint AB 2591 cases under both labellings, election off and on; 401(k) and stepchild cases; changelog matches the split inputs. Co-Authored-By: Claude Opus 5.5 --- changelog.d/claimable-filer-az-ar-ca.fixed.md | 2 +- ...dent_standard_deduction_earned_income.yaml | 34 +++++++++ ...rsonal_credit_disabled_child_of_filer.yaml | 51 +++++++++++++ ...ar_personal_credit_disabled_dependent.yaml | 26 +++++++ .../standard/ca_standard_deduction.yaml | 73 +++++++++++++++++++ .../contrib/states/ca/ab2591/ca_ab2591.yaml | 54 ++++++++++++++ ...endent_standard_deduction_earned_income.py | 22 ++++-- ...personal_credit_disabled_child_of_filer.py | 33 +++++++++ .../ar_personal_credit_disabled_dependent.py | 26 ++----- 9 files changed, 293 insertions(+), 28 deletions(-) create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.yaml create mode 100644 policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.py diff --git a/changelog.d/claimable-filer-az-ar-ca.fixed.md b/changelog.d/claimable-filer-az-ar-ca.fixed.md index ea05dfaab95..b120802c414 100644 --- a/changelog.d/claimable-filer-az-ar-ca.fixed.md +++ b/changelog.d/claimable-filer-az-ar-ca.fixed.md @@ -1 +1 @@ -Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent. A return on which the filer (or, if joint, either spouse) can be claimed counts no dependents for Arizona's dependent credit, family credit and 2021 families rebate, Arkansas's dependent credit, disabled-dependent credit (except for a filer's own child) and low-income tables, or California's dependent exemption credit, and gets no childless CalEITC or foster youth credit. A claimable filer loses California's personal, senior and blind credits and is not counted for Arizona's excise credit. California's standard deduction follows its dependent worksheet, and its renter credit excludes a claimable filer who lived in the claimer's home (new input `lives_with_claiming_taxpayer`). California's 2025 joint renter credit income limit is now $107,988. Arizona's 2021 families rebate counts at most three dependents on a joint return, as on every other return (Laws 2023, ch. 147, sec. 3(E)). The Arizona, Arkansas and California dependent credit reforms, the state dependent exemption repeal and California's AB 2591 reform keep these rules, and the California dependent worksheet counts farm income as earned income (new `dependent_standard_deduction_earned_income`). +Apply Arizona, Arkansas and California rules for a filer who can be claimed as a dependent. A return on which the filer (or, if joint, either spouse) can be claimed, unless the would-be claimant files only for a refund, counts no dependents for Arizona's dependent credit, family credit and 2021 families rebate, Arkansas's dependent credit, disabled-dependent credit (except for a filer's own child, new input `ar_personal_credit_disabled_child_of_filer`) and low-income tables, or California's dependent exemption credit, and gets no childless CalEITC or foster youth credit. A claimable filer loses California's personal, senior and blind credits, and California's standard deduction follows its dependent worksheet, with earned income from the new `dependent_standard_deduction_earned_income` (taxable wages, self-employment and farm income). A filer who is claimed is not counted for Arizona's excise credit and, if they lived in the claimer's home, is not a qualified renter for California's renter credit (new input `lives_with_claiming_taxpayer`). Arkansas's care credit counts only childcare for a qualifying person. The Arizona, Arkansas and California dependent credit reforms, the state dependent exemption repeal and California's AB 2591 reform keep these rules. Arizona's 2021 families rebate counts at most three dependents on a joint return, as on every other return (Laws 2023, ch. 147, sec. 3(E)), and California's 2025 joint renter credit income limit is now $107,988. diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml index 87a69669c3e..368b25ed4c3 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.yaml @@ -64,3 +64,37 @@ members: [filer] output: dependent_standard_deduction_earned_income: 0 + +- name: 2025 wages count after elective 401(k) deferrals + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + traditional_401k_contributions: 1_000 + tax_units: + tax_unit: + members: [filer] + output: + # Form 1040 line 1z (W-2 box 1) leaves out elective deferrals. + dependent_standard_deduction_earned_income: 1_000 + +- name: 2025 joint return counts each spouse's taxable wages + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 2_000 + traditional_401k_contributions: 1_000 + person_b: + age: 22 + employment_income: 500 + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + output: + # $1,000 + $500. + dependent_standard_deduction_earned_income: 1_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.yaml new file mode 100644 index 00000000000..8a3a8f9111b --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.yaml @@ -0,0 +1,51 @@ +# Defaults: a parent id that names a head or spouse of the tax unit, or no +# parent ids at all (the relationship is unknown). Parent ids also name +# step-parents, so a stepchild needs the input set to false. + +- name: 2025 a parent id naming the filer makes the dependent the filer's child + period: 2025 + input: + people: + filer: {age: 30, person_id: 1} + child: {age: 8, person_id: 2, parent_1_id: 1} + tax_units: + tax_unit: + members: [filer, child] + households: + household: + members: [filer, child] + state_code: AR + output: + ar_personal_credit_disabled_child_of_filer: [false, true] + +- name: 2025 a parent id naming someone outside the tax unit does not + period: 2025 + input: + people: + filer: {age: 30, person_id: 1} + niece: {age: 8, person_id: 2, parent_1_id: 99} + tax_units: + tax_unit: + members: [filer, niece] + households: + household: + members: [filer, niece] + state_code: AR + output: + ar_personal_credit_disabled_child_of_filer: [false, false] + +- name: 2025 a dependent without parent ids is treated as the filer's child + period: 2025 + input: + people: + filer: {age: 30} + child: {age: 8} + tax_units: + tax_unit: + members: [filer, child] + households: + household: + members: [filer, child] + state_code: AR + output: + ar_personal_credit_disabled_child_of_filer: [true, true] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml index d77a4855722..60cac84e283 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.yaml @@ -489,3 +489,29 @@ # child_a has no parent ids of their own, so the relationship is unknown # and the child route stays open; child_b is not disabled. ar_personal_credit_disabled_dependent: [0, 500, 0, 0] + +- name: 2025 single filer who can be claimed gets no credit for a disabled stepchild marked as not their child by birth or adoption + period: 2025 + input: + people: + filer: + age: 30 + person_id: 1 + claimed_as_dependent_on_another_return: true + stepchild: + age: 8 + person_id: 2 + parent_1_id: 1 + is_disabled: true + ar_personal_credit_disabled_child_of_filer: false + tax_units: + tax_unit: + members: [filer, stepchild] + filing_status: SINGLE + households: + household: + members: [filer, stepchild] + state_code: AR + output: + # A stepchild needs the dependent route, which IRC 152(b)(1) bars here. + ar_personal_credit_disabled_dependent: [0, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml index 9e629ea4553..8904fcfb164 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/deductions/standard/ca_standard_deduction.yaml @@ -237,3 +237,76 @@ # Federal worksheet earned income includes Schedule 1 line 6 (farm) less # line 15: $2,000 - $2,000 x 0.9235 x 0.153 / 2 = $1,858.70; plus $450. ca_standard_deduction: 2_308.70 + +- name: 2025 single filer who can be claimed counts wages after a 401(k) deferral on the dependent worksheet + period: 2025 + input: + people: + filer: + age: 19 + employment_income: 2_000 + traditional_401k_contributions: 1_000 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + filing_status: SINGLE + households: + household: + members: [filer] + state_code: CA + output: + # max($1,350, $1,000 + $450) = $1,450. + ca_standard_deduction: 1_450 + +- name: 2025 joint return with one claimable spouse counts wages after a 401(k) deferral (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 20 + employment_income: 2_000 + traditional_401k_contributions: 1_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 22 + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: CA + output: + ca_standard_deduction: 1_450 + +- name: 2025 joint return with one claimable spouse counts wages after a 401(k) deferral (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 22 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + employment_income: 2_000 + traditional_401k_contributions: 1_000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + households: + household: + members: [person_b, person_a] + state_code: CA + output: + ca_standard_deduction: 1_450 diff --git a/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml b/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml index e63768d4b34..9ad2730a836 100644 --- a/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml +++ b/policyengine_us/tests/policy/contrib/states/ca/ab2591/ca_ab2591.yaml @@ -255,3 +255,57 @@ output: # min($16,334 one-person FPL, max($1,400, $0 + $500)) = $1,400. ca_standard_deduction: 1_400 + +- name: Joint return with one claimable spouse uses the dependent worksheet in a year the election is not in effect (the claimable spouse is the head). + period: 2025 + reforms: policyengine_us.reforms.states.ca.ab2591.ab2591.ca_ab2591 + input: + people: + person_a: {age: 20, employment_income: 1_000, claimed_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 22, employment_income: 1_000, is_tax_unit_head: false, is_tax_unit_spouse: true} + tax_units: {tax_unit: {members: [person_a, person_b], filing_status: JOINT}} + households: {household: {members: [person_a, person_b], state_code: CA}} + output: + # max($1,350, $2,000 + $450) = $2,450 < $11,412. + ca_standard_deduction: 2_450 + +- name: Joint return with one claimable spouse uses the dependent worksheet in a year the election is not in effect (the claimable spouse is the spouse). + period: 2025 + reforms: policyengine_us.reforms.states.ca.ab2591.ab2591.ca_ab2591 + input: + people: + person_b: {age: 22, employment_income: 1_000, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 20, employment_income: 1_000, claimed_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + tax_units: {tax_unit: {members: [person_b, person_a], filing_status: JOINT}} + households: {household: {members: [person_b, person_a], state_code: CA}} + output: + ca_standard_deduction: 2_450 + +- name: Joint return with one claimable spouse and no earnings is limited to the dependent minimum under the election (the claimable spouse is the head). + period: 2027 + absolute_error_margin: 1 + reforms: policyengine_us.reforms.states.ca.ab2591.ab2591.ca_ab2591 + input: + gov.contrib.states.ca.ab2591.in_effect: true + people: + person_a: {age: 20, claimed_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 22, is_tax_unit_head: false, is_tax_unit_spouse: true} + tax_units: {tax_unit: {members: [person_a, person_b], filing_status: JOINT}} + households: {household: {members: [person_a, person_b], state_code: CA}} + output: + # min($22,147 two-person FPL, max($1,400, $0 + $500)) = $1,400. + ca_standard_deduction: 1_400 + +- name: Joint return with one claimable spouse and no earnings is limited to the dependent minimum under the election (the claimable spouse is the spouse). + period: 2027 + absolute_error_margin: 1 + reforms: policyengine_us.reforms.states.ca.ab2591.ab2591.ca_ab2591 + input: + gov.contrib.states.ca.ab2591.in_effect: true + people: + person_b: {age: 22, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 20, claimed_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + tax_units: {tax_unit: {members: [person_b, person_a], filing_status: JOINT}} + households: {household: {members: [person_b, person_a], state_code: CA}} + output: + ca_standard_deduction: 1_400 diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py index 7e6f0bacdcb..18c8aca88f9 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/standard_deduction/dependent_standard_deduction_earned_income.py @@ -8,9 +8,9 @@ class dependent_standard_deduction_earned_income(Variable): unit = USD documentation = ( "The filers' earned income as the Standard Deduction Worksheet for " - "Dependents defines it: wages, self-employment income and farm " - "income, less the deductible part of self-employment tax, and not " - "below zero." + "Dependents defines it: taxable wages (after pre-tax payroll " + "deductions), self-employment income and farm income, less the " + "deductible part of self-employment tax, and not below zero." ) definition_period = YEAR reference = ( @@ -24,10 +24,18 @@ class dependent_standard_deduction_earned_income(Variable): def formula(tax_unit, period, parameters): person = tax_unit.members filer = person("is_tax_unit_head_or_spouse", period) - # earned_income leaves out Schedule F farm income, which the - # worksheet counts (Schedule 1 line 6). - earned = person("earned_income", period) + person( - "farm_operations_income", period + # Form 1040 line 1z carries taxable wages (W-2 box 1, after elective + # deferrals); Schedule 1 lines 3 and 6 carry business and farm + # income. earned_income has gross wages and leaves out farm income. + earned = add( + person, + period, + [ + "irs_employment_income", + "self_employment_income", + "sstb_self_employment_income", + "farm_operations_income", + ], ) return max_( tax_unit.sum(filer * earned) - tax_unit("self_employment_tax_ald", period), diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.py new file mode 100644 index 00000000000..ecdf97261ae --- /dev/null +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_child_of_filer.py @@ -0,0 +1,33 @@ +from policyengine_us.model_api import * +from policyengine_us.variables.household.demographic.person._parent_links import ( + has_parent_ids, + tax_unit_parent_indices, +) + + +class ar_personal_credit_disabled_child_of_filer(Variable): + value_type = bool + entity = Person + label = "Child of a filer by birth or adoption for the Arkansas developmentally disabled credit" + documentation = ( + "Whether the person is a child of the head or spouse by birth or " + "adoption, the credit's route that does not need an IRC 152 " + "dependent. Defaults to whether a parent id names a head or spouse of " + "the tax unit, and to true when the person has no parent ids (the " + "relationship is unknown). Parent ids also name step-parents, so set " + "this to false for a stepchild who is no filer's child by birth or " + "adoption." + ) + definition_period = YEAR + reference = ( + "https://www.arkleg.state.ar.us/Home/FTPDocument?path=%2FACTS%2F1999%2FPublic%2FACT417.pdf#page=2", + ) + defined_for = StateCode.AR + + def formula(person, period, parameters): + filer = person("is_tax_unit_head_or_spouse", period) + first, second = tax_unit_parent_indices(person, period) + names_filer = np.where(first >= 0, filer[first], False) | np.where( + second >= 0, filer[second], False + ) + return names_filer | ~has_parent_ids(person, period) diff --git a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py index 496b4ce1954..82403c4b368 100644 --- a/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py +++ b/policyengine_us/variables/gov/states/ar/tax/income/credits/personal/ar_personal_credit_disabled_dependent.py @@ -1,8 +1,4 @@ from policyengine_us.model_api import * -from policyengine_us.variables.household.demographic.person._parent_links import ( - has_parent_ids, - tax_unit_parent_indices, -) class ar_personal_credit_disabled_dependent(Variable): @@ -25,28 +21,18 @@ def formula(person, period, parameters): disabled = person("is_disabled", period) # The credit covers an individual who is "a child of the taxpayer's # blood, an adopted child, or a dependent" in the IRC 152 sense (Ark. - # Code 26-51-503, Act 417 of 1999). A return on which the filer (or, if joint, either - # spouse) can be claimed as a dependent has no IRC 152 dependents + # Code 26-51-503, Act 417 of 1999). A return on which the filer (or, + # if joint, either spouse) can be claimed has no IRC 152 dependents # (IRC 152(b)(1)), so only the filers' own children still qualify. # The would-be claimant's filing exception (not required to file and # filing only for a refund, Publication 501) restores the dependents. filer_is_dependent = person.tax_unit( "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) - # A filer's child: a parent id that names a head or spouse of the - # tax unit. Parent ids name natural, adoptive and step-parents alike, - # so a single filer's stepchild also passes here, though the - # statute's child route covers only blood and adopted children; on a - # joint return a stepchild of one spouse is usually the other's own - # child. A dependent with no parent ids of their own leaves the - # relationship unknown, and the child route stays open. - filer = person("is_tax_unit_head_or_spouse", period) - first, second = tax_unit_parent_indices(person, period) - child_of_filer = np.where(first >= 0, filer[first], False) | np.where( - second >= 0, filer[second], False - ) - relationship_unknown = ~has_parent_ids(person, period) - qualifies = ~filer_is_dependent | child_of_filer | relationship_unknown + # The child route: a filer's child by birth or adoption (from parent + # ids by default; an input can mark a stepchild). + child_of_filer = person("ar_personal_credit_disabled_child_of_filer", period) + qualifies = ~filer_is_dependent | child_of_filer disabled_dependent = disabled & dependent & qualifies p = parameters(period).gov.states.ar.tax.income.credits.personal.amount return disabled_dependent * p.disabled_dependent