diff --git a/changelog.d/claimable-filer-federal.fixed.md b/changelog.d/claimable-filer-federal.fixed.md new file mode 100644 index 00000000000..82a77ce8992 --- /dev/null +++ b/changelog.d/claimable-filer-federal.fixed.md @@ -0,0 +1 @@ +Apply the federal rules for a filer who can be claimed as a dependent on another return: no child tax credit, credit for other dependents or under-13 care qualifying child (or that child's care expenses) on such a return (IRC 24, 21, 152(b)(1)), no personal exemption for that filer (IRC 151(d)(2)) in the exemption count Rhode Island, Delaware, Ohio, Wisconsin, Oregon, Hawaii and New Mexico read, no recovery rebate for that filer, including under the Armed Forces exception, no tuition and fees deduction (IRC 222(c)(3)), and no education credits or student loan interest deduction on a return with a claimed filer (IRC 25A(g)(3), 221(c)). diff --git a/policyengine_us/reforms/cdcc/cdcc_single_parent_work_requirement.py b/policyengine_us/reforms/cdcc/cdcc_single_parent_work_requirement.py index b83cb1ab43d..a84182005de 100644 --- a/policyengine_us/reforms/cdcc/cdcc_single_parent_work_requirement.py +++ b/policyengine_us/reforms/cdcc/cdcc_single_parent_work_requirement.py @@ -30,7 +30,7 @@ class cdcc_relevant_expenses(Variable): ) def formula(tax_unit, period, parameters): - expenses = tax_unit("tax_unit_childcare_expenses", period) + expenses = tax_unit("cdcc_qualifying_childcare_expenses", period) cdcc_limit = tax_unit("cdcc_limit", period) eligible_capped_expenses = min_(expenses, cdcc_limit) diff --git a/policyengine_us/reforms/reconciliation/reconciled_ssn_for_llc_and_aoc.py b/policyengine_us/reforms/reconciliation/reconciled_ssn_for_llc_and_aoc.py index 86740f80b31..b145dbd15f7 100644 --- a/policyengine_us/reforms/reconciliation/reconciled_ssn_for_llc_and_aoc.py +++ b/policyengine_us/reforms/reconciliation/reconciled_ssn_for_llc_and_aoc.py @@ -25,8 +25,15 @@ def formula(tax_unit, period, parameters): is_aoc_eligible = person( "is_eligible_for_american_opportunity_credit", period ) + # This reform leaves the dependency rules of IRC 25A(g)(3) and + # 25A(f)(1)(A)(iii) in place. + barred_by_dependency = person( + "is_barred_from_education_credits_by_dependency", period + ) eligible_expenses = tax_unit.sum( - person("qualified_tuition_expenses", period) * ~is_aoc_eligible + person("qualified_tuition_expenses", period) + * ~is_aoc_eligible + * ~barred_by_dependency ) capped_expenses = min_(llc.expense_limit, eligible_expenses) maximum_amount = llc.rate * capped_expenses diff --git a/policyengine_us/reforms/states/ga/ctc/ga_ctc_reform.py b/policyengine_us/reforms/states/ga/ctc/ga_ctc_reform.py index 6ff5bf1eb8a..8b8f54bc4c6 100644 --- a/policyengine_us/reforms/states/ga/ctc/ga_ctc_reform.py +++ b/policyengine_us/reforms/states/ga/ctc/ga_ctc_reform.py @@ -33,12 +33,7 @@ def formula(tax_unit, period, parameters): unused_credit = max_(potential - non_refundable, 0) # Cap the refund at amount per eligible child (same child count as # ga_ctc_potential: qualifying children under the age threshold). - baseline = parameters(period).gov.states.ga.tax.income.credits.ctc - person = tax_unit.members - age = person("age", period) - ctc_eligible_child = person("ctc_qualifying_child", period) - ga_child_age_eligible = age < baseline.age_threshold - eligible_children = tax_unit.sum(ctc_eligible_child & ga_child_age_eligible) + eligible_children = add(tax_unit, period, ["ga_ctc_eligible_child"]) refund_limit = p.refundable.amount * eligible_children refundable_credit = min_(unused_credit, refund_limit) # Only pay the refund in periods where the reform is in effect. The diff --git a/policyengine_us/reforms/states/ga/sb520/ga_sb520_reform.py b/policyengine_us/reforms/states/ga/sb520/ga_sb520_reform.py index c6b4cfb0fc5..cabfb410d6c 100644 --- a/policyengine_us/reforms/states/ga/sb520/ga_sb520_reform.py +++ b/policyengine_us/reforms/states/ga/sb520/ga_sb520_reform.py @@ -89,12 +89,8 @@ def formula(tax_unit, period, parameters): sb520_active = p_sb520.in_effect - person = tax_unit.members - age = person("age", period) - ctc_eligible_child = person("ctc_qualifying_child", period) - # SB 520 preserves baseline GA CTC age threshold (under 6) - ga_child_age_eligible = age < p.age_threshold - eligible_children = tax_unit.sum(ctc_eligible_child & ga_child_age_eligible) + # SB 520 preserves the baseline GA CTC child test (under 6) + eligible_children = add(tax_unit, period, ["ga_ctc_eligible_child"]) sb520_amount = p_sb520.credits.ctc.amount baseline_amount = p.amount diff --git a/policyengine_us/reforms/states/hi/dependent_exemption/hi_dependent_exemption_reform.py b/policyengine_us/reforms/states/hi/dependent_exemption/hi_dependent_exemption_reform.py index c2ec738773b..d1b0283f0b2 100644 --- a/policyengine_us/reforms/states/hi/dependent_exemption/hi_dependent_exemption_reform.py +++ b/policyengine_us/reforms/states/hi/dependent_exemption/hi_dependent_exemption_reform.py @@ -15,7 +15,11 @@ def formula(tax_unit, period, parameters): person = tax_unit.members age = person("age", period) - is_dependent = person("is_tax_unit_dependent", period) + # A return on which the filer (or, if joint, either spouse) can be + # claimed as a dependent has no dependents (IRC 152(b)(1)). + is_dependent = person("is_tax_unit_dependent", period) & ~person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) # Apply age limit if in effect if p.age_limit.in_effect: @@ -49,7 +53,11 @@ class hi_older_dependents_count(Variable): def formula(tax_unit, period, parameters): person = tax_unit.members - is_dependent = person("is_tax_unit_dependent", period) + # A return on which the filer (or, if joint, either spouse) can be + # claimed as a dependent has no dependents (IRC 152(b)(1)). + is_dependent = person("is_tax_unit_dependent", period) & ~person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) total_dependents = tax_unit.sum(is_dependent) eligible_dependent_exemptions = tax_unit( "hi_eligible_dependents_count", period @@ -66,14 +74,16 @@ class hi_regular_exemptions(Variable): defined_for = StateCode.HI def formula(tax_unit, period, parameters): - exemptions_count = tax_unit("exemptions_count", period) p = parameters(period).gov.states.hi.tax.income.exemptions - # Personal exemptions exclude the dependent portion. Over-age - # dependents fall back to the personal count. - dependents = tax_unit("tax_unit_dependents", period) + # Personal exemptions exclude the dependent portion: the filers' + # own exemptions (none for a filer who can be claimed as a + # dependent). Over-age dependents fall back to the personal count. + own_exemptions = tax_unit( + "head_spouse_count_not_dependent_elsewhere", period + ) older_dependents = tax_unit("hi_older_dependents_count", period) - personal_count = exemptions_count - dependents + older_dependents + personal_count = own_exemptions + older_dependents # Aged heads and spouses get an extra base exemption (preserved # exactly as the baseline computes it). diff --git a/policyengine_us/reforms/states/wi/dependent_exemption/wi_dependent_exemption_reform.py b/policyengine_us/reforms/states/wi/dependent_exemption/wi_dependent_exemption_reform.py index cf44d6a86f2..0471bac9c9a 100644 --- a/policyengine_us/reforms/states/wi/dependent_exemption/wi_dependent_exemption_reform.py +++ b/policyengine_us/reforms/states/wi/dependent_exemption/wi_dependent_exemption_reform.py @@ -15,7 +15,11 @@ def formula(tax_unit, period, parameters): person = tax_unit.members age = person("age", period) - is_dependent = person("is_tax_unit_dependent", period) + # A return on which the filer (or, if joint, either spouse) can be + # claimed as a dependent has no dependents (IRC 152(b)(1)). + is_dependent = person("is_tax_unit_dependent", period) & ~person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) # Apply age limit if in effect if p.age_limit.in_effect: @@ -49,7 +53,11 @@ class wi_older_dependents_count(Variable): def formula(tax_unit, period, parameters): person = tax_unit.members - is_dependent = person("is_tax_unit_dependent", period) + # A return on which the filer (or, if joint, either spouse) can be + # claimed as a dependent has no dependents (IRC 152(b)(1)). + is_dependent = person("is_tax_unit_dependent", period) & ~person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) total_dependents = tax_unit.sum(is_dependent) eligible_dependent_exemptions = tax_unit( "wi_eligible_dependents_count", period @@ -68,12 +76,13 @@ def formula(tax_unit, period, parameters): p_base = parameters(period).gov.states.wi.tax.income # Personal exemptions exclude the dependent portion. - total_exemptions_count = tax_unit("exemptions_count", period) - dependents = tax_unit("tax_unit_dependents", period) - older_dependents = tax_unit("wi_older_dependents_count", period) - personal_exemptions_count = ( - total_exemptions_count - dependents + older_dependents + # These are the filers' own exemptions (none for a filer who can + # be claimed as a dependent) plus over-age dependents. + own_exemptions = tax_unit( + "head_spouse_count_not_dependent_elsewhere", period ) + older_dependents = tax_unit("wi_older_dependents_count", period) + personal_exemptions_count = own_exemptions + older_dependents personal_exemption_amount = ( personal_exemptions_count * p_base.exemption.base ) diff --git a/policyengine_us/reforms/treasury/repeal_dependent_exemptions.py b/policyengine_us/reforms/treasury/repeal_dependent_exemptions.py index ab54afe5e89..fbfd6b94c1e 100644 --- a/policyengine_us/reforms/treasury/repeal_dependent_exemptions.py +++ b/policyengine_us/reforms/treasury/repeal_dependent_exemptions.py @@ -13,7 +13,15 @@ class exemptions_count(Variable): def formula(tax_unit, period, parameters): total_unit_size = tax_unit("tax_unit_size", period) dependents = tax_unit("tax_unit_dependents", period) - return total_unit_size - dependents + # Only the filers' own exemptions remain; a filer who can be + # claimed as a dependent has none (IRC 151(d)(2)). + dependent_filer = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + independent_filers = tax_unit( + "head_spouse_count_not_dependent_elsewhere", period + ) + return where( + dependent_filer, independent_filers, total_unit_size - dependents + ) class reform(Reform): def apply(self): diff --git a/policyengine_us/tests/core/test_claimable_filer_federal_invariants.py b/policyengine_us/tests/core/test_claimable_filer_federal_invariants.py new file mode 100644 index 00000000000..aab5f3a0156 --- /dev/null +++ b/policyengine_us/tests/core/test_claimable_filer_federal_invariants.py @@ -0,0 +1,167 @@ +"""Federal rules for a filer who can be claimed as a dependent elsewhere. + +A filer who can be claimed as a dependent on another return is treated as +having no dependents (IRC 152(b)(1); on a joint return, if either spouse can be +claimed, "you and your spouse can't claim any dependents", Publication 501) and +has no personal exemption (IRC 151(d)(2)). So: + +- `exemptions_count` counts only the filers who cannot be claimed, plus the + dependents when no filer can be claimed; +- `ctc_qualifying_child` and the credit for other dependents are zero on a + return with a claimable filer; +- a child under 13 is not a child and dependent care qualifying person on such + a return (a disabled person still is, IRC 21(b)(1)(B)); +- recovery rebates leave out a claimable filer and, on such a return, the + dependents; +- the state amounts that read the exemption count follow it (Georgia's two + credits keep their own count). + +For couples with either, both or neither spouse claimed, in 2021-2026: + +1. Swap invariance: each output is the same under either head/spouse + labelling (Hypothesis batches and the seeded population). +2. Monotonicity: marking another filer as claimed never raises any of the + amounts or counts below (seeded population only). +3. Identities: `exemptions_count` equals the filers who cannot be claimed plus + the dependents when no filer can be claimed, and a return with a claimable + filer has no CTC-qualifying child and no credit for other dependents + (both populations). + +The generated adults have no tuition or student loan interest, so the education +credit, tuition deduction and student loan interest gates are covered by YAML +cases only, as are the contributed reforms. +""" + +import numpy as np +import pytest +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st + +from policyengine_us import Simulation +from policyengine_us.tests.core.test_dependent_elsewhere_head_spouse_swap_invariance import ( + CLAIM_PATTERNS, + TOLERANCE, + YEARS, + _calc, + _crafted_cases, + _monotone_variants, + _seeded_couples, + _situation, + _swap_variants, + adults, + dependents, +) + +# Texas has no income tax; the others read the federal exemption count. +STATES = ["TX", "OR", "HI", "NM", "GA", "RI", "DE", "OH", "WI"] +# State amounts that read the federal exemption count; each is zero outside +# its state. +STATE_OUTPUTS = [ + "ri_exemptions", + "de_personal_credit_potential", + "oh_personal_exemptions", + "wi_base_exemption", + "or_regular_exemptions", + "hi_regular_exemptions", + "nm_low_and_middle_income_exemption", + "nm_low_income_comprehensive_tax_rebate", + "ga_ctc_potential", + "ga_low_income_credit_potential", +] +# Amounts that marking another filer as claimed must never raise. +MONOTONE = [ + "ctc_maximum", + "ctc_qualifying_children", + "capped_count_cdcc_eligible", + "cdcc_relevant_expenses", + "exemptions_count", + "rrc_arpa", +] + STATE_OUTPUTS +OUTPUTS = ["income_tax"] + MONOTONE + + +@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)), + } + + +def check_swap(units, year, outputs, identities=None): + """Each output is the same under either head/spouse labelling.""" + sim = Simulation(situation=_situation(units, year, _swap_variants)) + for name in outputs: + values = _calc(sim, name, year) + assert np.isfinite(values).all(), f"{name} in {year} is not finite" + drawn, swapped = values[0::2], values[1::2] + differs = ~(np.abs(swapped - drawn) <= TOLERANCE) + assert not differs.any(), ( + f"{name} in {year} changes when the head and spouse labels are " + "exchanged: " + + ", ".join( + f"{units[i]['state']} claimed={units[i]['claimed']} " + f"{drawn[i]:.2f} -> {swapped[i]:.2f}" + for i in np.flatnonzero(differs)[:10] + ) + ) + if identities is not None: + identities(sim, year) + + +def check_monotone(units, year, outputs, identities=None): + """Marking another filer as claimed never raises an output.""" + sim = Simulation(situation=_situation(units, year, _monotone_variants)) + for name in outputs: + values = _calc(sim, name, year).reshape(-1, 4) + nobody, first, second, both = values.T + for more, fewer, label in ( + (first, nobody, "first adult"), + (second, nobody, "second adult"), + (both, first, "both after first"), + (both, second, "both after second"), + ): + rises = more > fewer + TOLERANCE + assert not rises.any(), ( + f"{name} in {year} rises when the {label} is claimed " + "elsewhere: " + + ", ".join( + f"{units[i]['state']} {fewer[i]:.2f} -> {more[i]:.2f}" + for i in np.flatnonzero(rises)[:10] + ) + ) + if identities is not None: + identities(sim, year) + + +def _federal_identities(sim, year): + claimed_filer = _calc(sim, "head_or_spouse_is_dependent_elsewhere", year) > 0 + independent = _calc(sim, "head_spouse_count_not_dependent_elsewhere", year) + dependents_count = _calc(sim, "tax_unit_count_dependents", year) + expected = independent + np.where(claimed_filer, 0, dependents_count) + np.testing.assert_array_equal(_calc(sim, "exemptions_count", year), expected) + assert not _calc(sim, "ctc_qualifying_children", year)[claimed_filer].any() + odc = np.asarray( + sim.calculate("ctc_adult_individual_maximum", year, map_to="tax_unit") + ) + assert not odc[claimed_filer].any() + + +@settings( + max_examples=4, + 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=15)) +def test_claimable_filer_federal_rules_are_label_free(year, units): + check_swap(units, year, OUTPUTS, _federal_identities) + + +@pytest.mark.parametrize("year", YEARS) +def test_claimable_filer_federal_rules_seeded_population(year): + units = _seeded_couples(STATES, per_state=2) + _crafted_cases(STATES) + check_swap(units, year, OUTPUTS, _federal_identities) + check_monotone(units, year, MONOTONE, _federal_identities) diff --git a/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/cdcc_relevant_expenses.yaml b/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/cdcc_relevant_expenses.yaml index 8ed8c1ecdd6..d772de304e6 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/cdcc_relevant_expenses.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/cdcc_relevant_expenses.yaml @@ -40,3 +40,231 @@ min_head_spouse_earned: 10_000 output: cdcc_relevant_expenses: 3_000 # 1_000 childcare + 2_000 adult care + +# IRC 21(b)(2)(A)(ii): only expenses for the care of a qualifying individual count. +# The child of a return on which a filer can be claimed is not one (IRC 152(b)(1)), +# while the incapacitated relative still is (IRC 21(b)(1)(B)). +- name: 2025 childcare for the child of a claimable single filer does not count + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 5000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + relative: + age: 40 + is_incapable_of_self_care: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, child, relative] + tax_unit_childcare_expenses: 3000 + households: + household: + members: [person_a, child, relative] + state_code: TX + output: + count_cdcc_eligible: 1 + cdcc_relevant_expenses: 0 + +- name: 2025 childcare for the child of a joint return with one claimable spouse does not count (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 5000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + employment_income: 5000 + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + relative: + age: 40 + is_incapable_of_self_care: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, child, relative] + filing_status: JOINT + tax_unit_childcare_expenses: 3000 + households: + household: + members: [person_a, person_b, child, relative] + state_code: TX + output: + count_cdcc_eligible: 1 + cdcc_relevant_expenses: 0 + +- name: 2025 childcare for the child of a joint return with one claimable spouse does not count (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 30 + employment_income: 5000 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + employment_income: 5000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + relative: + age: 40 + is_incapable_of_self_care: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_b, person_a, child, relative] + filing_status: JOINT + tax_unit_childcare_expenses: 3000 + households: + household: + members: [person_b, person_a, child, relative] + state_code: TX + output: + count_cdcc_eligible: 1 + cdcc_relevant_expenses: 0 + +- name: 2025 care expenses for the incapacitated relative of a claimable filer still count + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 5000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + relative: + age: 40 + is_incapable_of_self_care: true + pre_subsidy_care_expenses: 2000 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, child, relative] + tax_unit_childcare_expenses: 3000 + households: + household: + members: [person_a, child, relative] + state_code: TX + output: + cdcc_relevant_expenses: 2000 + +- name: 2025 the same household with nobody claimable counts the childcare + period: 2025 + input: + people: + person_a: + age: 30 + employment_income: 5000 + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + relative: + age: 40 + is_incapable_of_self_care: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, child, relative] + tax_unit_childcare_expenses: 3000 + households: + household: + members: [person_a, child, relative] + state_code: TX + output: + count_cdcc_eligible: 2 + cdcc_relevant_expenses: 3000 + +# Publication 501, Dependent Taxpayer Test: a filer whose would-be claimant is not +# required to file and files no return or only for a refund can claim dependents. +- name: 2025 childcare for the child of a claimable filer within the filing exception counts + period: 2025 + input: + people: + parent: + age: 30 + employment_income: 5000 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child] + tax_unit_childcare_expenses: 3000 + households: + household: + members: [parent, child] + state_code: TX + output: + count_cdcc_eligible: 1 + cdcc_relevant_expenses: 3000 + +# IRC 21(b)(1)(B): a dependent incapable of self-care is a qualifying individual at +# any age, determined without regard to IRC 152(b)(1), so the childcare of an +# incapacitated 14-year-old counts on a return with a claimable filer. +- name: 2025 childcare for the incapacitated teenager of a claimable filer counts + period: 2025 + input: + people: + parent: + age: 40 + employment_income: 5000 + claimable_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 14 + is_incapable_of_self_care: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child] + tax_unit_childcare_expenses: 1000 + households: + household: + members: [parent, child] + state_code: TX + output: + count_cdcc_eligible: 1 + cdcc_relevant_expenses: 1000 diff --git a/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/is_cdcc_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/is_cdcc_eligible.yaml index 9a4d8616b69..1c590c6f3cf 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/is_cdcc_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/is_cdcc_eligible.yaml @@ -54,3 +54,99 @@ is_tax_unit_spouse: false output: is_cdcc_eligible: true + +- name: 2025 child under 13 is not a qualifying person when the single filer can be claimed as a dependent + period: 2025 + input: + people: + parent: + age: 20 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + # Publication 503: "Your qualifying child who is your dependent and who + # was under age 13"; IRC 152(b)(1). + is_cdcc_eligible: [false, false] + +- name: 2025 joint return with one claimable spouse has no under-13 qualifying person (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: 20 + 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: TX + output: + is_cdcc_eligible: [false, false, false] + +- name: 2025 joint return with one claimable spouse has no under-13 qualifying person (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 20 + 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: TX + output: + is_cdcc_eligible: [false, false, false] + +- name: 2025 disabled person still qualifies when the filer can be claimed as a dependent + period: 2025 + input: + people: + filer: + age: 30 + claimed_as_dependent_on_another_return: true + relative: + age: 60 + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [filer, relative] + households: + household: + members: [filer, relative] + state_code: TX + output: + # IRC 21(b)(1)(B) determines dependency "without regard to subsections + # (b)(1), (b)(2), and (d)(1)(B)" of section 152; Publication 503 item + # 3(b)(iii). + is_cdcc_eligible: [false, true] diff --git a/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/ctc_qualifying_child.yaml b/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/ctc_qualifying_child.yaml index 3f4a66e3619..fc96d52a969 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/ctc_qualifying_child.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/ctc_qualifying_child.yaml @@ -56,3 +56,190 @@ members: [adult, child, child2] output: ctc_qualifying_child: [False, True, False] + +- name: 2025 single filer who can be claimed as a dependent has no CTC-qualifying child + period: 2025 + input: + people: + parent: + age: 20 + employment_income: 5_000 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + # IRC 24(a), 152(b)(1); Publication 501, Dependent Taxpayer Test. + ctc_qualifying_child: [false, false] + ctc_maximum: 0 + +- name: 2025 joint return with one claimable spouse has no CTC-qualifying 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: 20 + claimed_as_dependent_on_another_return: false + 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: TX + output: + # "If you are filing a joint return and your spouse can be claimed as a + # dependent by another taxpayer, you and your spouse can't claim any + # dependents on your joint return" (Publication 501). + ctc_qualifying_child: [false, false, false] + ctc_maximum: 0 + +- name: 2025 joint return with one claimable spouse has no CTC-qualifying child (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 20 + claimed_as_dependent_on_another_return: false + 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: TX + output: + ctc_qualifying_child: [false, false, false] + ctc_maximum: 0 + +- name: 2025 joint return with neither spouse claimable keeps the CTC-qualifying child + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 20 + 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: TX + output: + ctc_qualifying_child: [false, false, true] + ctc_maximum: 2_200 + +# Publication 501, Dependent Taxpayer Test: a filer whose would-be claimant is not +# required to file and files no return or only for a refund can claim dependents. +- name: 2025 claimable single filer within the filing exception keeps the CTC-qualifying child + period: 2025 + input: + people: + parent: + age: 30 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + ctc_qualifying_child: [false, true] + +- name: 2025 joint return whose claimable spouse is within the filing exception keeps the CTC-qualifying child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: 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 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: TX + output: + ctc_qualifying_child: [false, false, true] + +- name: 2025 joint return whose claimable spouse is within the filing exception keeps the CTC-qualifying child (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 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: TX + output: + ctc_qualifying_child: [false, false, true] diff --git a/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.yaml b/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.yaml index fec059bb2d7..79cfb1685d3 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.yaml @@ -43,3 +43,96 @@ ctc_child_individual_maximum: 0 output: ctc_adult_individual_maximum: 500 + +- name: 2025 single filer who can be claimed as a dependent gets no credit for other dependents + period: 2025 + input: + people: + filer: + age: 22 + claimed_as_dependent_on_another_return: true + sibling: + age: 18 + tax_units: + tax_unit: + members: [filer, sibling] + households: + household: + members: [filer, sibling] + state_code: TX + output: + # IRC 24(h)(4)(A) "each dependent of the taxpayer"; IRC 152(b)(1). + ctc_adult_individual_maximum: [0, 0] + +- name: 2025 joint return with one claimable spouse gets no credit for other dependents (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 22 + 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 + sibling: + age: 18 + tax_units: + tax_unit: + members: [person_a, person_b, sibling] + filing_status: JOINT + households: + household: + members: [person_a, person_b, sibling] + state_code: TX + output: + ctc_adult_individual_maximum: [0, 0, 0] + +- name: 2025 joint return with one claimable spouse gets no credit for other dependents (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: 22 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + sibling: + age: 18 + tax_units: + tax_unit: + members: [person_b, person_a, sibling] + filing_status: JOINT + households: + household: + members: [person_b, person_a, sibling] + state_code: TX + output: + ctc_adult_individual_maximum: [0, 0, 0] + +- name: 2025 joint return with neither spouse claimable gets the credit for other dependents + period: 2025 + input: + people: + person_a: + age: 22 + person_b: + age: 22 + sibling: + age: 18 + tax_units: + tax_unit: + members: [person_a, person_b, sibling] + filing_status: JOINT + households: + household: + members: [person_a, person_b, sibling] + state_code: TX + output: + ctc_adult_individual_maximum: [0, 0, 500] diff --git a/policyengine_us/tests/policy/baseline/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.yaml b/policyengine_us/tests/policy/baseline/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.yaml index 0d102e18b78..5544205c3d5 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.yaml @@ -177,3 +177,323 @@ has_tin: true output: is_eligible_for_american_opportunity_credit: false + +- name: 2024 student claimed as a dependent elsewhere cannot claim the credit + period: 2024 + input: + people: + student: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [student] + households: + household: + members: [student] + state_code: TX + output: + # IRC 25A(g)(3); Form 8863: "You're claimed as a dependent on another + # person's tax return". + is_eligible_for_american_opportunity_credit: false + +- name: 2024 joint return with one spouse claimed elsewhere cannot claim the credit for either spouse (the claimable spouse is the head) + period: 2024 + input: + people: + person_a: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: 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: TX + output: + # Form 1040 instructions: "or your spouse if filing jointly". + is_eligible_for_american_opportunity_credit: [false, false] + +- name: 2024 joint return with one spouse claimed elsewhere cannot claim the credit for either spouse (the claimable spouse is the spouse) + period: 2024 + input: + people: + person_b: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: 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: TX + output: + is_eligible_for_american_opportunity_credit: [false, false] + +- name: 2024 joint return with neither spouse claimed keeps both students' eligibility + period: 2024 + input: + people: + person_a: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + person_b: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: [true, true] + +# IRC 25A(g)(3) and 26 CFR 1.25A-1(f): the bar applies to a student who is +# claimed; a student who can be claimed but is not keeps the credit. +- name: 2024 student who can be claimed but is not claimed keeps the credit + period: 2024 + input: + people: + person_a: + age: 20 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + claimable_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a] + households: + household: + members: [person_a] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: true + +# IRC 25A(f)(1)(A)(iii): a dependent's tuition counts only if the taxpayer is +# allowed a section 151 deduction for the dependent, and a return on which a filer +# can be claimed has no dependents (IRC 152(b)(1)), unless the would-be claimant +# meets the filing exception (Publication 501). +- name: 2024 dependent student of a filer who can be claimed is not eligible + period: 2024 + input: + people: + parent: + age: 45 + has_tin: true + claimable_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + student: + age: 19 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, student] + households: + household: + members: [parent, student] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: [false, false] + +- name: 2024 dependent student of a claimable filer within the filing exception is eligible + period: 2024 + input: + people: + parent: + age: 45 + has_tin: true + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: true + is_tax_unit_spouse: false + student: + age: 19 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, student] + households: + household: + members: [parent, student] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: [false, true] + +- name: 2024 dependent student of a filer who cannot be claimed is eligible + period: 2024 + input: + people: + parent: + age: 45 + has_tin: true + is_tax_unit_head: true + is_tax_unit_spouse: false + student: + age: 19 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, student] + households: + household: + members: [parent, student] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: [false, true] + +- name: 2024 dependent student of a joint return with one claimable spouse is not eligible (the claimable spouse is the head) + period: 2024 + input: + people: + person_a: + age: 45 + has_tin: true + claimable_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 45 + has_tin: true + is_tax_unit_head: false + is_tax_unit_spouse: true + student: + age: 19 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, student] + filing_status: JOINT + households: + household: + members: [person_a, person_b, student] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: [false, false, false] + +- name: 2024 dependent student of a joint return with one claimable spouse is not eligible (the claimable spouse is the spouse) + period: 2024 + input: + people: + person_b: + age: 45 + has_tin: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 45 + has_tin: true + claimable_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + student: + age: 19 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + has_tin: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_b, person_a, student] + filing_status: JOINT + households: + household: + members: [person_b, person_a, student] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: [false, false, false] diff --git a/policyengine_us/tests/policy/baseline/gov/irs/credits/education/lifetime_learning_credit/is_eligible_for_lifetime_learning_credit.yaml b/policyengine_us/tests/policy/baseline/gov/irs/credits/education/lifetime_learning_credit/is_eligible_for_lifetime_learning_credit.yaml index 72ca159a702..4bff0f55a7d 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/credits/education/lifetime_learning_credit/is_eligible_for_lifetime_learning_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/credits/education/lifetime_learning_credit/is_eligible_for_lifetime_learning_credit.yaml @@ -70,3 +70,110 @@ has_tin: true output: is_eligible_for_lifetime_learning_credit: false + + +- name: 2024 student claimed as a dependent elsewhere cannot claim the credit + period: 2024 + input: + people: + student: + age: 30 + attends_eligible_educational_institution_for_lifetime_learning_credit: true + has_lifetime_learning_credit_1098_t_or_exception: true + has_tin: true + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [student] + households: + household: + members: [student] + state_code: TX + output: + # IRC 25A(g)(3). + is_eligible_for_lifetime_learning_credit: false + +- name: 2024 joint return with one spouse claimed elsewhere cannot claim the credit for either spouse (the claimable spouse is the head) + period: 2024 + input: + people: + person_a: + age: 30 + attends_eligible_educational_institution_for_lifetime_learning_credit: true + has_lifetime_learning_credit_1098_t_or_exception: true + has_tin: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + attends_eligible_educational_institution_for_lifetime_learning_credit: true + has_lifetime_learning_credit_1098_t_or_exception: true + has_tin: 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: TX + output: + is_eligible_for_lifetime_learning_credit: [false, false] + +- name: 2024 joint return with one spouse claimed elsewhere cannot claim the credit for either spouse (the claimable spouse is the spouse) + period: 2024 + input: + people: + person_b: + age: 30 + attends_eligible_educational_institution_for_lifetime_learning_credit: true + has_lifetime_learning_credit_1098_t_or_exception: true + has_tin: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + attends_eligible_educational_institution_for_lifetime_learning_credit: true + has_lifetime_learning_credit_1098_t_or_exception: true + has_tin: 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: TX + output: + is_eligible_for_lifetime_learning_credit: [false, false] + +- name: 2024 joint return with neither spouse claimed keeps both students' eligibility + period: 2024 + input: + people: + person_a: + age: 30 + attends_eligible_educational_institution_for_lifetime_learning_credit: true + has_lifetime_learning_credit_1098_t_or_exception: true + has_tin: true + person_b: + age: 30 + attends_eligible_educational_institution_for_lifetime_learning_credit: true + has_lifetime_learning_credit_1098_t_or_exception: true + has_tin: true + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: TX + output: + is_eligible_for_lifetime_learning_credit: [true, true] diff --git a/policyengine_us/tests/policy/baseline/gov/irs/credits/recovery_rebate_credit/recovery_rebate_credit.yaml b/policyengine_us/tests/policy/baseline/gov/irs/credits/recovery_rebate_credit/recovery_rebate_credit.yaml index e84c1db994a..01ed4209665 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/credits/recovery_rebate_credit/recovery_rebate_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/credits/recovery_rebate_credit/recovery_rebate_credit.yaml @@ -47,3 +47,382 @@ members: [parent, child_1, child_2] output: recovery_rebate_credit: 3_920 # https://www.efile.com/stimulus-check-three/ + +- name: 2021 single filer who can be claimed as a dependent gets no ARPA rebate + period: 2021 + input: + people: + filer: + age: 20 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + households: + household: + members: [filer] + state_code: TX + output: + # IRC 6428B(c)(2): an eligible individual excludes "any individual who is a + # dependent of another taxpayer". + rrc_arpa: 0 + +- name: 2021 claimable single filer's child adds no ARPA rebate + period: 2021 + input: + people: + parent: + age: 20 + claimed_as_dependent_on_another_return: true + child: + age: 2 + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + # IRC 152(b)(1): such a filer has no dependents. + rrc_arpa: 0 + +- name: 2021 joint return with one claimable spouse gets the other spouse's ARPA rebate (the claimable spouse is the head) + period: 2021 + 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: TX + output: + # Each spouse is an eligible individual or not on their own; $1,400 for + # the spouse who cannot be claimed. + rrc_arpa: 1_400 + +- name: 2021 joint return with one claimable spouse gets the other spouse's ARPA rebate (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 + 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: TX + output: + rrc_arpa: 1_400 + +- name: 2021 joint return with neither spouse claimable gets both rebates and the child's + period: 2021 + input: + people: + person_a: + age: 20 + person_b: + age: 22 + child: + age: 2 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: TX + output: + # 3 x $1,400. + rrc_arpa: 4_200 + +# The Armed Forces exception (IRC 6428B(e)(2)(E)) waives the identification rule +# for the other spouse; it does not make a dependent of another taxpayer an +# eligible individual (IRC 6428B(c)(2)). +- name: 2021 military joint return with one claimable spouse gets one ARPA rebate (the claimable spouse is the head) + period: 2021 + input: + people: + person_a: + age: 30 + is_military: true + 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: TX + output: + rrc_arpa: 1400 + +- name: 2021 military joint return with one claimable spouse gets one ARPA rebate (the claimable spouse is the spouse) + period: 2021 + input: + people: + person_b: + age: 30 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + is_military: 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: TX + output: + rrc_arpa: 1400 + +- name: 2021 military joint return whose other spouse is claimable gets one ARPA rebate (the claimable spouse is the head) + period: 2021 + 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_military: 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: TX + output: + rrc_arpa: 1400 + +- name: 2021 military joint return whose other spouse is claimable gets one ARPA rebate (the claimable spouse is the spouse) + period: 2021 + input: + people: + person_b: + age: 30 + is_military: true + 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: TX + output: + rrc_arpa: 1400 + +- name: 2021 military joint return with both spouses claimable gets no ARPA rebate + period: 2021 + input: + people: + person_a: + age: 30 + is_military: true + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + 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_a, person_b] + filing_status: JOINT + households: + household: + members: [person_a, person_b] + state_code: TX + output: + rrc_arpa: 0 + +- name: 2021 military joint return with neither spouse claimable gets both ARPA rebates + period: 2021 + input: + people: + person_a: + age: 30 + is_military: 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: TX + output: + rrc_arpa: 2800 + +# IRC 6428B(c)(2): an individual "who is a dependent of another taxpayer" is not +# eligible, whether or not that taxpayer claims them. +- name: 2021 single filer who can be claimed but is not claimed gets no ARPA rebate + period: 2021 + input: + people: + person_a: + age: 20 + claimable_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a] + households: + household: + members: [person_a] + state_code: TX + output: + rrc_arpa: 0 + +# IRC 6428B(a) allows the credit to an eligible individual, so a return whose only +# filer is a dependent of another taxpayer gets none, even when the filing +# exception lets that filer claim the child. +- name: 2021 claimable single filer within the filing exception gets no ARPA rebate for the child + period: 2021 + input: + people: + parent: + age: 30 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + rrc_arpa: 0 + +# IRC 6428(g)(1)(C) and 6428A(g)(3): children count when a spouse has a valid SSN, +# whether or not that spouse is an eligible individual. Here the spouse with the +# SSN can be claimed (within the filing exception) and serves in the Armed +# Forces; the other spouse has no SSN. +- name: 2020 child payments need a spouse with an SSN, not an eligible spouse with one (the claimable spouse is the head) + period: 2020 + input: + people: + person_a: + age: 30 + is_military: true + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 30 + ssn_card_type: NONE + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: TX + output: + # One adult payment under the Armed Forces exception plus the child's. + rrc_cares: 1700 + rrc_caa: 1200 + +- name: 2020 child payments need a spouse with an SSN, not an eligible spouse with one (the claimable spouse is the spouse) + period: 2020 + input: + people: + person_b: + age: 30 + ssn_card_type: NONE + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + is_military: true + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: TX + output: + rrc_cares: 1700 + rrc_caa: 1200 diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/student_loan_interest/student_loan_interest_ald_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/student_loan_interest/student_loan_interest_ald_eligible.yaml index ca6f654768e..e161077097f 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/student_loan_interest/student_loan_interest_ald_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/student_loan_interest/student_loan_interest_ald_eligible.yaml @@ -37,3 +37,89 @@ filing_status: SEPARATE output: student_loan_interest_ald_eligible: false + +- name: 2024 single filer claimed as a dependent elsewhere cannot deduct student loan interest + period: 2024 + input: + people: + filer: + age: 24 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + households: + household: + members: [filer] + state_code: TX + output: + # IRC 221(c). + student_loan_interest_ald_eligible: false + +- name: 2024 joint return with one spouse claimed elsewhere cannot deduct student loan interest (the claimable spouse is the head) + period: 2024 + input: + people: + person_a: + age: 24 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 24 + 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: TX + output: + # Form 1040 instructions: "you, or your spouse if filing jointly, aren't + # claimed as a dependent". + student_loan_interest_ald_eligible: [false, false] + +- name: 2024 joint return with one spouse claimed elsewhere cannot deduct student loan interest (the claimable spouse is the spouse) + period: 2024 + input: + people: + person_b: + age: 24 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 24 + 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: TX + output: + student_loan_interest_ald_eligible: [false, false] + +# IRC 221(c): the bar applies to an individual who is claimed. +- name: 2024 single filer who can be claimed but is not claimed can deduct student loan interest + period: 2024 + input: + people: + person_a: + age: 22 + claimable_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a] + households: + household: + members: [person_a] + state_code: TX + output: + student_loan_interest_ald_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.yaml index 4912f0155de..c55f696055c 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.yaml @@ -26,3 +26,111 @@ output: tuition_and_fees_deduction_eligible: false # Can't claim this deduction if the household has taken the American Oppportunity or Lifetime Learning Credit. + +# IRC 222(c)(3): no deduction to an individual for whom a section 151 deduction +# may be allowed to another taxpayer. +- name: 2020 single filer who can be claimed as a dependent is not eligible + period: 2020 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a] + households: + household: + members: [person_a] + state_code: TX + output: + tuition_and_fees_deduction_eligible: false + +- name: 2020 joint return with one claimable spouse is not eligible (the claimable spouse is the head) + period: 2020 + 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: TX + output: + tuition_and_fees_deduction_eligible: false + +- name: 2020 joint return with one claimable spouse is not eligible (the claimable spouse is the spouse) + period: 2020 + 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: TX + output: + tuition_and_fees_deduction_eligible: false + +- name: 2020 joint return with neither spouse claimable is eligible + period: 2020 + input: + people: + person_a: + age: 20 + 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: TX + output: + tuition_and_fees_deduction_eligible: true + +- name: 2020 single filer who can be claimed but is not claimed is not eligible + period: 2020 + input: + people: + person_a: + age: 20 + claimable_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person_a] + households: + household: + members: [person_a] + state_code: TX + output: + # IRC 222(c)(3): a section 151 deduction "may be allowed to another taxpayer". + tuition_and_fees_deduction_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/exemptions/exemptions_count.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/exemptions/exemptions_count.yaml new file mode 100644 index 00000000000..40ce1bf5142 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/exemptions/exemptions_count.yaml @@ -0,0 +1,242 @@ +- name: 2025 single filer with a child counts both + period: 2025 + input: + people: + parent: + age: 30 + child: + age: 5 + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + exemptions_count: 2 + +- name: 2025 single filer who can be claimed as a dependent has no exemptions + period: 2025 + input: + people: + parent: + age: 20 + claimed_as_dependent_on_another_return: true + child: + age: 5 + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + # IRC 151(d)(2) for the filer; IRC 152(b)(1) for the child. + exemptions_count: 0 + +- name: 2025 joint return with one claimable spouse counts only 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: 20 + 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: TX + output: + exemptions_count: 1 + +- name: 2025 joint return with one claimable spouse counts only the other spouse (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 20 + 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: TX + output: + exemptions_count: 1 + +- name: 2025 joint return with both spouses claimable has no exemptions + period: 2025 + input: + people: + person_a: + age: 20 + claimed_as_dependent_on_another_return: true + person_b: + age: 20 + 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: TX + output: + exemptions_count: 0 + +- name: 2025 joint return with neither spouse claimable counts everyone + period: 2025 + input: + people: + person_a: + age: 20 + person_b: + age: 20 + 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: TX + output: + exemptions_count: 3 + +# Publication 501, Dependent Taxpayer Test: a filer whose would-be claimant is not +# required to file and files no return or only for a refund can claim dependents. +# The filer's own exemption is still zero (IRC 151(d)(2)). +- name: 2025 claimable single filer within the filing exception counts the child but not themselves + period: 2025 + input: + people: + parent: + age: 30 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + exemptions_count: 1 + +- name: 2025 joint return whose claimable spouse is within the filing exception counts the other spouse and the child (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 30 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: 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 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: TX + output: + exemptions_count: 2 + +- name: 2025 joint return whose claimable spouse is within the filing exception counts the other spouse and the child (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 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + households: + household: + members: [person_b, person_a, child] + state_code: TX + output: + exemptions_count: 2 + +- name: 2025 filer who can be claimed but is not claimed has no own exemption and no dependents + period: 2025 + input: + people: + parent: + age: 30 + claimable_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: TX + output: + # Exemptions turn on whether the filer can be claimed, not on an actual claim. + exemptions_count: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc_relevant_expenses.yaml b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc_relevant_expenses.yaml index 6bb2e240946..c53fa606220 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc_relevant_expenses.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ca/tax/income/credits/child_dependent_care/ca_cdcc_relevant_expenses.yaml @@ -268,3 +268,64 @@ ca_federal_cdcc: 100 ca_federal_capped_cdcc: 100 ca_cdcc: 34 + +# FTB 3506 counts expenses for qualifying persons. The child of a filer who can be +# claimed as a dependent is not one (IRC 152(b)(1)); the incapacitated relative is. +- name: 2025 childcare for the child of a claimable filer does not count + period: 2025 + input: + people: + parent: + age: 30 + employment_income: 5000 + claimable_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + relative: + age: 40 + is_incapable_of_self_care: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child, relative] + tax_unit_childcare_expenses: 3000 + households: + household: + members: [parent, child, relative] + state_code: CA + output: + ca_cdcc_relevant_expenses: 0 + +- name: 2025 the same household with a filer who cannot be claimed counts the childcare + period: 2025 + input: + people: + parent: + age: 30 + employment_income: 5000 + is_tax_unit_head: true + is_tax_unit_spouse: false + child: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + relative: + age: 40 + is_incapable_of_self_care: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, child, relative] + tax_unit_childcare_expenses: 3000 + households: + household: + members: [parent, child, relative] + state_code: CA + output: + ca_cdcc_relevant_expenses: 3000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.yaml b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.yaml index 406b0d0f8f9..5964fe8cf76 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.yaml @@ -71,3 +71,54 @@ output: # Equal capacity: split evenly (both columns can absorb their share) de_personal_credit_indv: [110, 110] + + +- name: 2025 spouse who can be claimed as a dependent has no personal credit (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + de_income_tax_before_non_refundable_credits_indv: 1000 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + de_income_tax_before_non_refundable_credits_indv: 1000 + 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: DE + output: + # 30 Del. C. 1110(b)(1): $110 for each personal exemption to which the + # individual is entitled for federal purposes; IRC 151(d)(2). + de_personal_credit_indv: [0, 110] + +- name: 2025 spouse who can be claimed as a dependent has no personal credit (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + de_income_tax_before_non_refundable_credits_indv: 1000 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + de_income_tax_before_non_refundable_credits_indv: 1000 + 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: DE + output: + de_personal_credit_indv: [110, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credits.yaml index fd12e7c01ce..b13f8f2f86d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credits.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/personal/de_personal_credits.yaml @@ -30,3 +30,58 @@ de_income_tax_before_non_refundable_credits_unit: 1000000 output: de_personal_credit: 0 + + +- name: 2025 joint return with one claimable spouse gets one 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: DE + output: + # Federal exemptions: the other spouse only; IRC 152(b)(1) leaves no + # dependents. + de_personal_credit_potential: 110 + +- name: 2025 joint return with one claimable spouse gets one 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: DE + output: + de_personal_credit_potential: 110 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_ctc.yaml b/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_ctc.yaml index 658c2647ad9..0690ba455ca 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_ctc.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_ctc.yaml @@ -6,7 +6,6 @@ age: 30 child: age: 2 - ctc_qualifying_child: true tax_units: tax_unit: members: @@ -30,7 +29,6 @@ age: 30 child: age: 6 - ctc_qualifying_child: true tax_units: tax_unit: members: @@ -54,10 +52,8 @@ age: 32 child1: age: 1 - ctc_qualifying_child: true child2: age: 5 - ctc_qualifying_child: true tax_units: tax_unit: members: @@ -83,7 +79,6 @@ age: 30 child: age: 2 - ctc_qualifying_child: true tax_units: tax_unit: members: @@ -107,7 +102,6 @@ age: 30 child: age: 2 - ctc_qualifying_child: true tax_units: tax_unit: members: @@ -123,3 +117,27 @@ state_code: GA output: ga_non_refundable_credits: 0 + + +- name: 2026 GA CTC still counts the child of a filer who can be claimed as a dependent + period: 2026 + input: + people: + parent: + age: 20 + claimed_as_dependent_on_another_return: true + child: + age: 2 + tax_units: + tax_unit: + members: [parent, child] + filing_status: SINGLE + ga_income_tax_before_non_refundable_credits: 10000 + households: + household: + members: [parent, child] + state_code: GA + output: + # Georgia uses the IRC 24(c) qualifying-child definition only; whether IRC + # 152(b)(1) reaches it is not settled, so the child test is kept. + ga_ctc: 250 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_low_income_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_low_income_credit.yaml index 5a059239e46..2a410aa94df 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_low_income_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_low_income_credit.yaml @@ -5,7 +5,7 @@ adjusted_gross_income: 14000 age_head: 67 age_spouse: 70 - exemptions_count: 2 + tax_unit_size: 2 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 32 @@ -16,7 +16,7 @@ adjusted_gross_income: 4000 age_head: 67 age_spouse: 56 - exemptions_count: 2 + tax_unit_size: 2 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 78 @@ -27,7 +27,7 @@ adjusted_gross_income: 15500 age_head: 80 age_spouse: 75 - exemptions_count: 3 + tax_unit_size: 3 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 25 @@ -38,7 +38,7 @@ adjusted_gross_income: 4000 age_head: 67 age_spouse: 56 - exemptions_count: 0 + tax_unit_size: 0 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 26 @@ -49,7 +49,7 @@ adjusted_gross_income: 10500 age_head: 67 age_spouse: 56 - exemptions_count: 0 + tax_unit_size: 0 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 8 @@ -60,7 +60,7 @@ adjusted_gross_income: 10500 age_head: 56 age_spouse: 56 - exemptions_count: 0 + tax_unit_size: 0 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 0 @@ -71,7 +71,7 @@ adjusted_gross_income: 10500 age_head: 65 age_spouse: 64 - exemptions_count: 1 + tax_unit_size: 1 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 16 @@ -82,7 +82,7 @@ adjusted_gross_income: 10000 age_head: 64 age_spouse: 64 - exemptions_count: 2 + tax_unit_size: 2 ga_income_tax_before_non_refundable_credits: 1000000 output: ga_low_income_credit: 16 diff --git a/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.yaml b/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.yaml index 25fa5e14ce5..cc6de0fb9ea 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.yaml @@ -166,3 +166,129 @@ state_code: HI output: hi_tax_credit_for_low_income_household_renters: 150 + +# Schedule X counts only people who cannot be claimed as a dependent by another +# taxpayer, so a child in the household who can be claimed elsewhere adds no +# exemption. +- name: Joint return with a child who can be claimed elsewhere counts the two filers + period: 2021 + input: + people: + person_a: + age: 30 + 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_1: + age: 5 + claimable_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, child_1] + filing_status: JOINT + adjusted_gross_income: 4000 + hi_tax_credit_for_low_income_household_renters_eligible: true + households: + household: + members: [person_a, person_b, child_1] + state_code: HI + output: + hi_tax_credit_for_low_income_household_renters: 100 + +- name: Joint return with a child who cannot be claimed elsewhere counts the child + period: 2021 + input: + people: + person_a: + age: 30 + 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_1: + age: 5 + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, child_1] + filing_status: JOINT + adjusted_gross_income: 4000 + hi_tax_credit_for_low_income_household_renters_eligible: true + households: + household: + members: [person_a, person_b, child_1] + state_code: HI + output: + hi_tax_credit_for_low_income_household_renters: 150 + +- name: Joint return within the filing exception with a child who can be claimed elsewhere counts only the other spouse (the claimable spouse is the head) + period: 2021 + input: + people: + person_a: + age: 30 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: 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_1: + age: 5 + claimable_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, child_1] + filing_status: JOINT + adjusted_gross_income: 4000 + hi_tax_credit_for_low_income_household_renters_eligible: true + households: + household: + members: [person_a, person_b, child_1] + state_code: HI + output: + hi_tax_credit_for_low_income_household_renters: 50 + +- name: Joint return within the filing exception with a child who can be claimed elsewhere counts only the other spouse (the claimable spouse is the spouse) + period: 2021 + input: + people: + person_b: + age: 30 + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 30 + claimable_as_dependent_on_another_return: true + dependent_claimant_filing_exception: true + is_tax_unit_head: false + is_tax_unit_spouse: true + child_1: + age: 5 + claimable_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_b, person_a, child_1] + filing_status: JOINT + adjusted_gross_income: 4000 + hi_tax_credit_for_low_income_household_renters_eligible: true + households: + household: + members: [person_b, person_a, child_1] + state_code: HI + output: + hi_tax_credit_for_low_income_household_renters: 50 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.yaml index f4acfca8392..5f236216e86 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.yaml @@ -27,3 +27,102 @@ exemptions_count: 3 output: nm_low_and_middle_income_exemption: 4_500 + + +- name: 2025 single filer who can be claimed as a dependent has no exemptions + period: 2025 + input: + people: + filer: + age: 30 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [filer] + adjusted_gross_income: 10_000 + households: + household: + members: [filer] + state_code: NM + output: + # NMSA 7-2-5.8 counts federal exemptions; IRC 151(d)(2). + nm_low_and_middle_income_exemption: 0 + +- name: 2025 joint return with one claimable spouse counts only the other spouse (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 + adjusted_gross_income: 10_000 + households: + household: + members: [person_a, person_b, child] + state_code: NM + output: + # One exemption (the child is not a dependent, IRC 152(b)(1)) x $2,500. + nm_low_and_middle_income_exemption: 2_500 + +- name: 2025 joint return with one claimable spouse counts only the other spouse (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 + adjusted_gross_income: 10_000 + households: + household: + members: [person_b, person_a, child] + state_code: NM + output: + # One exemption (the child is not a dependent, IRC 152(b)(1)) x $2,500. + nm_low_and_middle_income_exemption: 2_500 + +- name: 2025 joint return with neither spouse claimable counts everyone + 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 + adjusted_gross_income: 10_000 + households: + household: + members: [person_a, person_b, child] + state_code: NM + output: + # 3 exemptions x $2,500. + nm_low_and_middle_income_exemption: 7_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.yaml b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.yaml index 7bcd28c10fa..84ae85e14bf 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.yaml @@ -246,3 +246,112 @@ state_code: NM output: nm_low_income_comprehensive_tax_rebate: 583 + +- name: 2025 single filer who can be claimed as a dependent gets no rebate + period: 2025 + input: + people: + person: + age: 20 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person] + nm_modified_gross_income: 5_000 + households: + household: + members: [person] + state_code: NM + output: + # NMSA 7-2-14(A): only a resident "who is not a dependent of another + # individual" may claim the rebate. + nm_low_income_comprehensive_tax_rebate: 0 + +- name: 2025 single filer who cannot be claimed gets the one-exemption rebate + period: 2025 + input: + people: + person: + age: 20 + tax_units: + tax_unit: + members: [person] + nm_modified_gross_income: 5_000 + households: + household: + members: [person] + state_code: NM + output: + # $1,000-$7,500 row, one exemption. + nm_low_income_comprehensive_tax_rebate: 252 + +- name: 2025 single filer aged 65 or older who can be claimed as a dependent gets no rebate + period: 2025 + input: + people: + person: + age: 70 + claimed_as_dependent_on_another_return: true + tax_units: + tax_unit: + members: [person] + nm_modified_gross_income: 5_000 + households: + household: + members: [person] + state_code: NM + output: + # The age-65 exemptions do not make a dependent of another individual a + # claimant (NMSA 7-2-14(A)). + nm_low_income_comprehensive_tax_rebate: 0 + +- name: 2025 joint return with one claimable spouse keeps the rebate with the couple's combined income (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 + tax_units: + tax_unit: + members: [person_a, person_b] + filing_status: JOINT + nm_modified_gross_income: 8500 + households: + household: + members: [person_a, person_b] + state_code: NM + output: + # One exemption; the $8,000-$9,000 row of the one-exemption table. + nm_low_income_comprehensive_tax_rebate: 212 + +- name: 2025 joint return with one claimable spouse keeps the rebate with the couple's combined income (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 + tax_units: + tax_unit: + members: [person_b, person_a] + filing_status: JOINT + nm_modified_gross_income: 8500 + households: + household: + members: [person_b, person_a] + state_code: NM + output: + nm_low_income_comprehensive_tax_rebate: 212 diff --git a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.yaml b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.yaml index 5b10b5cf2d8..6fa092fcffe 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.yaml @@ -24,3 +24,104 @@ blind_head: true output: nm_low_income_comprehensive_tax_rebate_exemptions: 2 + +- name: 2025 single filer who can be claimed as a dependent has no rebate exemptions + period: 2025 + input: + people: + parent: + age: 20 + claimed_as_dependent_on_another_return: true + child: + age: 2 + tax_units: + tax_unit: + members: [parent, child] + households: + household: + members: [parent, child] + state_code: NM + output: + # NMSA 7-2-14(A),(C); PIT-RC line 2a. + nm_low_income_comprehensive_tax_rebate_exemptions: 0 + +- name: 2025 joint return with one claimable spouse drops its ordinary exemption and the dependents (the claimable spouse is the head) + period: 2025 + input: + people: + person_a: + age: 70 + claimed_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 40 + claimed_as_dependent_on_another_return: false + 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 + households: + household: + members: [person_a, person_b, child] + state_code: NM + output: + # "the non-qualifying spouse is not eligible" (PIT-RC line 2a) and a + # return on which a filer can be claimed has no dependents (IRC + # 152(b)(1)), leaving 1 ordinary exemption; NMSA 7-2-14(C) still adds 2 + # for "each individual ... included in the return who is sixty-five years + # of age or older". + nm_low_income_comprehensive_tax_rebate_exemptions: 3 + +- name: 2025 joint return with one claimable spouse drops its ordinary exemption and the dependents (the claimable spouse is the spouse) + period: 2025 + input: + people: + person_b: + age: 40 + claimed_as_dependent_on_another_return: false + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 70 + 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 + households: + household: + members: [person_b, person_a, child] + state_code: NM + output: + nm_low_income_comprehensive_tax_rebate_exemptions: 3 + +- name: 2025 joint return with neither spouse claimable counts everyone plus the age-65 exemptions + period: 2025 + input: + people: + person_a: + age: 70 + person_b: + age: 40 + child: + age: 2 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + households: + household: + members: [person_a, person_b, child] + state_code: NM + output: + # 3 federal exemptions + 2 for the spouse aged 65 or older. + nm_low_income_comprehensive_tax_rebate_exemptions: 5 diff --git a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/exemptions/personal/oh_personal_exemptions_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/exemptions/personal/oh_personal_exemptions_eligible.yaml index d9fe76117ae..676c54bab9c 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/exemptions/personal/oh_personal_exemptions_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/exemptions/personal/oh_personal_exemptions_eligible.yaml @@ -38,3 +38,56 @@ claimable_as_dependent_on_another_return: true output: oh_personal_exemptions_eligible_person: false + +- name: 2025 joint return with one claimable spouse makes neither that spouse nor the child eligible (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: OH + output: + # Ohio R.C. 5747.025; IRC 152(b)(1) leaves the return no dependents. + oh_personal_exemptions_eligible_person: [false, true, false] + +- name: 2025 joint return with one claimable spouse makes neither that spouse nor the child eligible (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: OH + output: + oh_personal_exemptions_eligible_person: [true, false, false] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/exemption/ri_exemptions.yaml b/policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/exemption/ri_exemptions.yaml index 874ee89a624..539a40f00a6 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/exemption/ri_exemptions.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/exemption/ri_exemptions.yaml @@ -135,3 +135,82 @@ exemptions_count: 2 output: ri_exemptions: 0 + + +- name: 2025 joint return with one claimable spouse counts only the other spouse (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 + ri_agi: 10000 + households: + household: + members: [person_a, person_b, child] + state_code: RI + output: + # R.I. Gen. Laws 44-30-2.6: "If someone else can claim you on their return, + # your exemption amount is zero"; IRC 152(b)(1). + ri_exemptions: 5_100 + +- name: 2025 joint return with one claimable spouse counts only the other spouse (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 + ri_agi: 10000 + households: + household: + members: [person_b, person_a, child] + state_code: RI + output: + ri_exemptions: 5_100 + +- name: 2025 joint return with neither spouse claimable counts everyone + 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 + ri_agi: 10000 + households: + household: + members: [person_a, person_b, child] + state_code: RI + output: + ri_exemptions: 15_300 diff --git a/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml index 9e54d8bd87f..f1f8087f317 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml @@ -5,3 +5,79 @@ state_code: WI output: wi_base_exemption: 5 * 700 + + +- name: 2025 joint return with one claimable spouse counts only the other spouse (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: WI + output: + # Form 1 instructions: "either you or your spouse (not both) can be claimed"; + # IRC 152(b)(1). + wi_base_exemption: 700 + +- name: 2025 joint return with one claimable spouse counts only the other spouse (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: WI + output: + wi_base_exemption: 700 + +- name: 2025 joint return with neither spouse claimable counts everyone + 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: WI + output: + wi_base_exemption: 2_100 diff --git a/policyengine_us/tests/policy/contrib/reconciliation/reconciled_ssn_for_llc_and_aoc.yaml b/policyengine_us/tests/policy/contrib/reconciliation/reconciled_ssn_for_llc_and_aoc.yaml index 8a61f5667d5..4740dfe0d8e 100644 --- a/policyengine_us/tests/policy/contrib/reconciliation/reconciled_ssn_for_llc_and_aoc.yaml +++ b/policyengine_us/tests/policy/contrib/reconciliation/reconciled_ssn_for_llc_and_aoc.yaml @@ -73,3 +73,165 @@ output: american_opportunity_credit: 1_000 lifetime_learning_credit: 0 + +# The reform keeps the dependency rules: a dependent student's tuition does not +# count on a return whose filer can be claimed as a dependent (IRC +# 25A(f)(1)(A)(iii), 152(b)(1)), under either credit. +- name: Dependent student of a filer who can be claimed gets neither credit + period: 2026 + reforms: policyengine_us.reforms.reconciliation.reconciled_ssn_for_llc_and_aoc.reconciled_ssn_for_llc_and_aoc + input: + gov.contrib.reconciliation.ssn_for_llc_and_aoc.in_effect: true + people: + parent: + age: 45 + ssn_card_type: CITIZEN + has_tin: true + claimable_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + student: + age: 19 + ssn_card_type: CITIZEN + has_tin: true + qualified_tuition_expenses: 4_000 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, student] + filing_status: HEAD_OF_HOUSEHOLD + households: + household: + members: [parent, student] + state_code: TX + output: + american_opportunity_credit: 0 + lifetime_learning_credit: 0 + +- name: Dependent student of a joint return with one claimable spouse gets neither credit (the claimable spouse is the head) + period: 2026 + reforms: policyengine_us.reforms.reconciliation.reconciled_ssn_for_llc_and_aoc.reconciled_ssn_for_llc_and_aoc + input: + gov.contrib.reconciliation.ssn_for_llc_and_aoc.in_effect: true + people: + person_a: + age: 45 + ssn_card_type: CITIZEN + has_tin: true + claimable_as_dependent_on_another_return: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_b: + age: 45 + ssn_card_type: CITIZEN + has_tin: true + is_tax_unit_head: false + is_tax_unit_spouse: true + student: + age: 19 + ssn_card_type: CITIZEN + has_tin: true + qualified_tuition_expenses: 4_000 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_a, person_b, student] + filing_status: JOINT + households: + household: + members: [person_a, person_b, student] + state_code: TX + output: + american_opportunity_credit: 0 + lifetime_learning_credit: 0 + +- name: Dependent student of a joint return with one claimable spouse gets neither credit (the claimable spouse is the spouse) + period: 2026 + reforms: policyengine_us.reforms.reconciliation.reconciled_ssn_for_llc_and_aoc.reconciled_ssn_for_llc_and_aoc + input: + gov.contrib.reconciliation.ssn_for_llc_and_aoc.in_effect: true + people: + person_b: + age: 45 + ssn_card_type: CITIZEN + has_tin: true + is_tax_unit_head: true + is_tax_unit_spouse: false + person_a: + age: 45 + ssn_card_type: CITIZEN + has_tin: true + claimable_as_dependent_on_another_return: true + is_tax_unit_head: false + is_tax_unit_spouse: true + student: + age: 19 + ssn_card_type: CITIZEN + has_tin: true + qualified_tuition_expenses: 4_000 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [person_b, person_a, student] + filing_status: JOINT + households: + household: + members: [person_b, person_a, student] + state_code: TX + output: + american_opportunity_credit: 0 + lifetime_learning_credit: 0 + +- name: Dependent student of a filer who cannot be claimed is eligible for the American Opportunity Credit, not the Lifetime Learning Credit + period: 2026 + reforms: policyengine_us.reforms.reconciliation.reconciled_ssn_for_llc_and_aoc.reconciled_ssn_for_llc_and_aoc + input: + gov.contrib.reconciliation.ssn_for_llc_and_aoc.in_effect: true + people: + parent: + age: 45 + ssn_card_type: CITIZEN + has_tin: true + is_tax_unit_head: true + is_tax_unit_spouse: false + student: + age: 19 + ssn_card_type: CITIZEN + has_tin: true + qualified_tuition_expenses: 4_000 + is_pursuing_credential_for_american_opportunity_credit: true + attends_eligible_educational_institution_for_american_opportunity_credit: true + is_enrolled_at_least_half_time_for_american_opportunity_credit: true + has_american_opportunity_credit_1098_t_or_exception: true + has_american_opportunity_credit_institution_ein: true + is_tax_unit_head: false + is_tax_unit_spouse: false + tax_units: + tax_unit: + members: [parent, student] + filing_status: HEAD_OF_HOUSEHOLD + households: + household: + members: [parent, student] + state_code: TX + output: + is_eligible_for_american_opportunity_credit: [false, true] + lifetime_learning_credit: 0 diff --git a/policyengine_us/tests/policy/contrib/states/ga/ctc/ga_ctc_reform.yaml b/policyengine_us/tests/policy/contrib/states/ga/ctc/ga_ctc_reform.yaml index 77fcd5db26d..c236fb692d2 100644 --- a/policyengine_us/tests/policy/contrib/states/ga/ctc/ga_ctc_reform.yaml +++ b/policyengine_us/tests/policy/contrib/states/ga/ctc/ga_ctc_reform.yaml @@ -127,3 +127,93 @@ # $10k liability fully absorbs the $250 nonrefundable credit, leaving # nothing unused to refund. ga_refundable_ctc: 0 + +# The refund cap counts the same children as ga_ctc_potential (Georgia's own +# IRC 24(c) child test), not children allowed the federal credit. +- name: Refund cap keeps the child of a filer who can be claimed as a dependent + period: 2026 + absolute_error_margin: 0.01 + reforms: policyengine_us.reforms.states.ga.ctc.ga_ctc_reform.ga_ctc_reform + input: + gov.contrib.states.ga.ctc.refundable.in_effect: true + people: + parent: + age: 30 + claimed_as_dependent_on_another_return: true + child: + age: 2 + tax_units: + tax_unit: + members: [parent, child] + filing_status: SINGLE + ga_income_tax_before_non_refundable_credits: 0 + households: + household: + members: [parent, child] + state_code: GA + output: + ctc_qualifying_child: [false, false] + ga_ctc_potential: 250 + ga_refundable_ctc: 250 + +- name: Refund cap keeps the child of a joint return with one claimable spouse (the claimable spouse is the head) + period: 2026 + absolute_error_margin: 0.01 + reforms: policyengine_us.reforms.states.ga.ctc.ga_ctc_reform.ga_ctc_reform + input: + gov.contrib.states.ga.ctc.refundable.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: 2 + tax_units: + tax_unit: + members: [person_a, person_b, child] + filing_status: JOINT + ga_income_tax_before_non_refundable_credits: 0 + households: + household: + members: [person_a, person_b, child] + state_code: GA + output: + ga_ctc_potential: 250 + ga_refundable_ctc: 250 + +- name: Refund cap keeps the child of a joint return with one claimable spouse (the claimable spouse is the spouse) + period: 2026 + absolute_error_margin: 0.01 + reforms: policyengine_us.reforms.states.ga.ctc.ga_ctc_reform.ga_ctc_reform + input: + gov.contrib.states.ga.ctc.refundable.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: 2 + tax_units: + tax_unit: + members: [person_b, person_a, child] + filing_status: JOINT + ga_income_tax_before_non_refundable_credits: 0 + households: + household: + members: [person_b, person_a, child] + state_code: GA + output: + ga_ctc_potential: 250 + ga_refundable_ctc: 250 diff --git a/policyengine_us/tests/policy/contrib/states/hi/dependent_exemption_reform_test.yaml b/policyengine_us/tests/policy/contrib/states/hi/dependent_exemption_reform_test.yaml index 8a11f290155..398865a7a4d 100644 --- a/policyengine_us/tests/policy/contrib/states/hi/dependent_exemption_reform_test.yaml +++ b/policyengine_us/tests/policy/contrib/states/hi/dependent_exemption_reform_test.yaml @@ -150,3 +150,57 @@ # exemptions from 3,432 to 1,144, widening taxable income and raising HI # income tax from 2,855.97 to 3,029.86 (about +173.89). output: {hi_income_tax: 3029.86} + +# As in the baseline, a filer who can be claimed as a dependent has no exemption of +# their own and, outside the claimant filing exception, no dependents. +- name: HI dependent exemption reform - claimable single filer has no exemptions + period: 2025 + reforms: policyengine_us.reforms.states.hi.dependent_exemption.hi_dependent_exemption_reform.hi_dependent_exemption_reform + input: + gov.contrib.states.hi.dependent_exemption.in_effect: true + people: + parent: {age: 40, employment_income: 60_000, claimable_as_dependent_on_another_return: true} + child1: {age: 10, is_tax_unit_dependent: true} + child2: {age: 12, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [parent, child1, child2], filing_status: SINGLE}} + households: {household: {members: [parent, child1, child2], state_name: HI}} + output: {hi_regular_exemptions: 0} + +- name: HI dependent exemption reform - the filing exception keeps the dependents only + period: 2025 + reforms: policyengine_us.reforms.states.hi.dependent_exemption.hi_dependent_exemption_reform.hi_dependent_exemption_reform + input: + gov.contrib.states.hi.dependent_exemption.in_effect: true + people: + parent: {age: 40, employment_income: 60_000, claimable_as_dependent_on_another_return: true, dependent_claimant_filing_exception: true} + child1: {age: 10, is_tax_unit_dependent: true} + child2: {age: 12, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [parent, child1, child2], filing_status: SINGLE}} + households: {household: {members: [parent, child1, child2], state_name: HI}} + output: {hi_regular_exemptions: 2_288} + +- name: HI dependent exemption reform - joint return with one claimable spouse keeps the other spouse only (the claimable spouse is the head) + period: 2025 + reforms: policyengine_us.reforms.states.hi.dependent_exemption.hi_dependent_exemption_reform.hi_dependent_exemption_reform + input: + gov.contrib.states.hi.dependent_exemption.in_effect: true + people: + person_a: {age: 40, claimable_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 40, employment_income: 60_000, is_tax_unit_head: false, is_tax_unit_spouse: true} + child1: {age: 10, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [person_a, person_b, child1], filing_status: JOINT}} + households: {household: {members: [person_a, person_b, child1], state_name: HI}} + output: {hi_regular_exemptions: 1_144} + +- name: HI dependent exemption reform - joint return with one claimable spouse keeps the other spouse only (the claimable spouse is the spouse) + period: 2025 + reforms: policyengine_us.reforms.states.hi.dependent_exemption.hi_dependent_exemption_reform.hi_dependent_exemption_reform + input: + gov.contrib.states.hi.dependent_exemption.in_effect: true + people: + person_b: {age: 40, employment_income: 60_000, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 40, claimable_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + child1: {age: 10, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [person_b, person_a, child1], filing_status: JOINT}} + households: {household: {members: [person_b, person_a, child1], state_name: HI}} + output: {hi_regular_exemptions: 1_144} diff --git a/policyengine_us/tests/policy/contrib/states/wi/dependent_exemption_reform_test.yaml b/policyengine_us/tests/policy/contrib/states/wi/dependent_exemption_reform_test.yaml index 05709219f00..c6cfa3a680a 100644 --- a/policyengine_us/tests/policy/contrib/states/wi/dependent_exemption_reform_test.yaml +++ b/policyengine_us/tests/policy/contrib/states/wi/dependent_exemption_reform_test.yaml @@ -137,3 +137,57 @@ # 50,594. Wis. Stat. 71.06(1r): 3.5% x 14,680 + 4.4% x (50,480 - 14,680) # + 5.3% x (50,594 - 50,480) = 2,095.04 (baseline 2,032.42). output: {wi_income_tax: 2095.04} + +# As in the baseline, a filer who can be claimed as a dependent has no exemption of +# their own and, outside the claimant filing exception, no dependents. +- name: WI dependent exemption reform - claimable single filer has no exemptions + period: 2025 + reforms: policyengine_us.reforms.states.wi.dependent_exemption.wi_dependent_exemption_reform.wi_dependent_exemption_reform + input: + gov.contrib.states.wi.dependent_exemption.in_effect: true + people: + parent: {age: 40, employment_income: 60_000, claimable_as_dependent_on_another_return: true} + child1: {age: 10, is_tax_unit_dependent: true} + child2: {age: 12, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [parent, child1, child2], filing_status: SINGLE}} + households: {household: {members: [parent, child1, child2], state_name: WI}} + output: {wi_base_exemption: 0} + +- name: WI dependent exemption reform - the filing exception keeps the dependents only + period: 2025 + reforms: policyengine_us.reforms.states.wi.dependent_exemption.wi_dependent_exemption_reform.wi_dependent_exemption_reform + input: + gov.contrib.states.wi.dependent_exemption.in_effect: true + people: + parent: {age: 40, employment_income: 60_000, claimable_as_dependent_on_another_return: true, dependent_claimant_filing_exception: true} + child1: {age: 10, is_tax_unit_dependent: true} + child2: {age: 12, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [parent, child1, child2], filing_status: SINGLE}} + households: {household: {members: [parent, child1, child2], state_name: WI}} + output: {wi_base_exemption: 1_400} + +- name: WI dependent exemption reform - joint return with one claimable spouse keeps the other spouse only (the claimable spouse is the head) + period: 2025 + reforms: policyengine_us.reforms.states.wi.dependent_exemption.wi_dependent_exemption_reform.wi_dependent_exemption_reform + input: + gov.contrib.states.wi.dependent_exemption.in_effect: true + people: + person_a: {age: 40, claimable_as_dependent_on_another_return: true, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_b: {age: 40, employment_income: 60_000, is_tax_unit_head: false, is_tax_unit_spouse: true} + child1: {age: 10, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [person_a, person_b, child1], filing_status: JOINT}} + households: {household: {members: [person_a, person_b, child1], state_name: WI}} + output: {wi_base_exemption: 700} + +- name: WI dependent exemption reform - joint return with one claimable spouse keeps the other spouse only (the claimable spouse is the spouse) + period: 2025 + reforms: policyengine_us.reforms.states.wi.dependent_exemption.wi_dependent_exemption_reform.wi_dependent_exemption_reform + input: + gov.contrib.states.wi.dependent_exemption.in_effect: true + people: + person_b: {age: 40, employment_income: 60_000, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 40, claimable_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + child1: {age: 10, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [person_b, person_a, child1], filing_status: JOINT}} + households: {household: {members: [person_b, person_a, child1], state_name: WI}} + output: {wi_base_exemption: 700} diff --git a/policyengine_us/tests/policy/contrib/treasury/repeal_dependent_exemptions.yaml b/policyengine_us/tests/policy/contrib/treasury/repeal_dependent_exemptions.yaml index ec4d5fb575f..42c59a9621b 100644 --- a/policyengine_us/tests/policy/contrib/treasury/repeal_dependent_exemptions.yaml +++ b/policyengine_us/tests/policy/contrib/treasury/repeal_dependent_exemptions.yaml @@ -63,3 +63,46 @@ output: exemptions_count: 2 exemptions: 0 + +# The personal exemptions that remain are the filers' own, and a filer who can be +# claimed as a dependent has none (IRC 151(d)(2)). +- name: Claimable single filer with a child has no personal exemption + period: 2022 + reforms: policyengine_us.reforms.treasury.repeal_dependent_exemptions.repeal_dependent_exemptions + input: + gov.contrib.treasury.repeal_dependent_exemptions: true + people: + parent: {age: 30, claimable_as_dependent_on_another_return: true} + child: {age: 5, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [parent, child]}} + households: {household: {members: [parent, child], state_code: TX}} + output: + exemptions_count: 0 + +- name: Joint return with one claimable spouse keeps the other spouse's exemption (the claimable spouse is the head) + period: 2022 + reforms: policyengine_us.reforms.treasury.repeal_dependent_exemptions.repeal_dependent_exemptions + input: + gov.contrib.treasury.repeal_dependent_exemptions: true + people: + person_a: {age: 30, claimable_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, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [person_a, person_b, child], filing_status: JOINT}} + households: {household: {members: [person_a, person_b, child], state_code: TX}} + output: + exemptions_count: 1 + +- name: Joint return with one claimable spouse keeps the other spouse's exemption (the claimable spouse is the spouse) + period: 2022 + reforms: policyengine_us.reforms.treasury.repeal_dependent_exemptions.repeal_dependent_exemptions + input: + gov.contrib.treasury.repeal_dependent_exemptions: true + people: + person_b: {age: 30, is_tax_unit_head: true, is_tax_unit_spouse: false} + person_a: {age: 30, claimable_as_dependent_on_another_return: true, is_tax_unit_head: false, is_tax_unit_spouse: true} + child: {age: 5, is_tax_unit_dependent: true} + tax_units: {tax_unit: {members: [person_b, person_a, child], filing_status: JOINT}} + households: {household: {members: [person_b, person_a, child], state_code: TX}} + output: + exemptions_count: 1 diff --git a/policyengine_us/tests/policy/reform/cdcc_single_parent_work_requirement.yaml b/policyengine_us/tests/policy/reform/cdcc_single_parent_work_requirement.yaml index b19d62d4314..5de44b287cf 100644 --- a/policyengine_us/tests/policy/reform/cdcc_single_parent_work_requirement.yaml +++ b/policyengine_us/tests/policy/reform/cdcc_single_parent_work_requirement.yaml @@ -152,3 +152,60 @@ min_head_spouse_earned: 0 # Reform: min($8,000, $3,000, max($0, $60,000)) = min($8,000, $3,000, $60,000) = $3,000 cdcc_relevant_expenses: 3_000 + +# The reform changes the earnings test only. Childcare for the child of a filer +# who can be claimed as a dependent still does not count (IRC 21(b)(2)(A)(ii)). +- name: Reform keeps out childcare for the child of a filer who can be claimed + period: 2024 + reforms: policyengine_us.reforms.cdcc.cdcc_single_parent_work_requirement.cdcc_single_parent_work_requirement + input: + people: + adult1: + age: 35 + is_tax_unit_head: true + employment_income: 50_000 + claimable_as_dependent_on_another_return: true + child: + age: 5 + is_tax_unit_dependent: true + relative: + age: 40 + is_tax_unit_dependent: true + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [adult1, child, relative] + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [adult1, child, relative] + state_code: TX + output: + cdcc_relevant_expenses: 0 + +- name: Reform counts the childcare when the filer cannot be claimed + period: 2024 + reforms: policyengine_us.reforms.cdcc.cdcc_single_parent_work_requirement.cdcc_single_parent_work_requirement + input: + people: + adult1: + age: 35 + is_tax_unit_head: true + employment_income: 50_000 + child: + age: 5 + is_tax_unit_dependent: true + relative: + age: 40 + is_tax_unit_dependent: true + is_incapable_of_self_care: true + tax_units: + tax_unit: + members: [adult1, child, relative] + tax_unit_childcare_expenses: 3_000 + households: + household: + members: [adult1, child, relative] + state_code: TX + output: + cdcc_relevant_expenses: 3_000 diff --git a/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_eligible.py b/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_eligible.py index 82861496784..c7dbc104092 100644 --- a/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_eligible.py +++ b/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_eligible.py @@ -9,6 +9,9 @@ class is_cdcc_eligible(Variable): reference = ( "https://www.law.cornell.edu/uscode/text/26/21#b_1", "https://www.law.cornell.edu/uscode/text/26/21#e_5", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + # Publication 503, Who Is a Qualifying Person? + "https://www.irs.gov/pub/irs-prior/p503--2025.pdf#page=3", ) def formula(person, period, parameters): @@ -21,8 +24,20 @@ def formula(person, period, parameters): # qualifying individual even when the noncustodial parent claims the # dependent, so any under-age member other than the head or spouse # qualifies. - qualifies_by_age = ~head_or_spouse & (age < p.child_age) - # Subsections (b)(1)(B) (dependent) and (b)(1)(C) (spouse). + # A child qualifies only as the filer's dependent ("Your qualifying + # child who is your dependent", Publication 503), 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 model has no + # input for an IRC 152(e) release, so the 21(e)(5) child of a + # custodial parent who can be claimed is not kept. + filer_is_dependent = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + qualifies_by_age = ~head_or_spouse & (age < p.child_age) & ~filer_is_dependent + # Subsections (b)(1)(B) (dependent) and (b)(1)(C) (spouse). Subsection + # (b)(1)(B) determines dependency "without regard to subsections + # (b)(1), (b)(2), and (d)(1)(B)" of section 152, so a disabled person + # still qualifies when the filer can be claimed as a dependent. disabled = person("is_incapable_of_self_care", period) married = person.tax_unit("tax_unit_married", period) qualifies_by_disability = disabled & (is_dependent | (head_or_spouse & married)) diff --git a/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_qualifying_childcare_expenses.py b/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_qualifying_childcare_expenses.py new file mode 100644 index 00000000000..f7885005bbf --- /dev/null +++ b/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_qualifying_childcare_expenses.py @@ -0,0 +1,32 @@ +from policyengine_us.model_api import * + + +class cdcc_qualifying_childcare_expenses(Variable): + value_type = float + entity = TaxUnit + label = "Childcare expenses that count for the child and dependent care credit" + unit = USD + definition_period = YEAR + reference = ( + "https://www.law.cornell.edu/uscode/text/26/21#b_2_A", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + ) + + def formula(tax_unit, period, parameters): + childcare = tax_unit("tax_unit_childcare_expenses", period) + # IRC 21(b)(2)(A)(ii) counts only expenses "for the care of a + # qualifying individual". A return on which a filer can be claimed as + # a dependent (outside the claimant filing exception) has no + # qualifying child unless the child is incapable of self-care, so its + # childcare expenses do not count otherwise. Childcare expenses are + # those of the tax unit's children under 18, recorded as a tax-unit + # total, so one child's share cannot be left out when another child + # qualifies. + person = tax_unit.members + qualifying_child = person("is_cdcc_eligible", period) & person( + "is_child", period + ) + dependent_filer = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + return where(dependent_filer & ~tax_unit.any(qualifying_child), 0, childcare) diff --git a/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_relevant_expenses.py b/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_relevant_expenses.py index 797f2bbcf39..aa020f78a20 100644 --- a/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_relevant_expenses.py +++ b/policyengine_us/variables/gov/irs/credits/cdcc/cdcc_relevant_expenses.py @@ -18,7 +18,10 @@ def formula(tax_unit, period, parameters): # (tax_unit_childcare_expenses) plus care for a disabled qualifying # individual of any age — a disabled adult dependent or spouse # (care_expenses, a person-level yearly input). - childcare = tax_unit("tax_unit_childcare_expenses", period) + # cdcc_qualifying_childcare_expenses leaves out childcare for a child + # who is not a qualifying individual because a filer can be claimed + # as a dependent. + childcare = tax_unit("cdcc_qualifying_childcare_expenses", period) adult_care = add(tax_unit, period, ["care_expenses"]) expenses = childcare + adult_care cdcc_limit = tax_unit("cdcc_limit", period) diff --git a/policyengine_us/variables/gov/irs/credits/ctc/maximum/ctc_qualifying_child.py b/policyengine_us/variables/gov/irs/credits/ctc/maximum/ctc_qualifying_child.py index ae2c1bfab24..f8906588f5d 100644 --- a/policyengine_us/variables/gov/irs/credits/ctc/maximum/ctc_qualifying_child.py +++ b/policyengine_us/variables/gov/irs/credits/ctc/maximum/ctc_qualifying_child.py @@ -8,7 +8,13 @@ class ctc_qualifying_child(Variable): documentation = "Child qualifies for the Child Tax Credit" definition_period = YEAR defined_for = "is_tax_unit_dependent" - reference = "https://www.law.cornell.edu/uscode/text/26/24#c" + reference = ( + # Subsections (a) and (c). + "https://www.law.cornell.edu/uscode/text/26/24#c", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + # Publication 501, Dependent Taxpayer Test. + "https://www.irs.gov/pub/irs-prior/p501--2025.pdf#page=11", + ) def formula(person, period, parameters): age = person("age", period) @@ -18,4 +24,12 @@ def formula(person, period, parameters): meets_identification_requirements = person( "meets_ctc_child_identification_requirements", period ) - return age_eligible & meets_identification_requirements + # IRC 24(a) allows the credit only for a qualifying child for whom the + # taxpayer is allowed a deduction under section 151. Under IRC + # 152(b)(1) a taxpayer who can be claimed as a dependent is treated as + # having no dependents, and on a joint return neither spouse may be + # claimable (Publication 501, Dependent Taxpayer Test). + filer_is_dependent = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + return age_eligible & meets_identification_requirements & ~filer_is_dependent diff --git a/policyengine_us/variables/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.py b/policyengine_us/variables/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.py index 4caaab2f978..13c2ffd4c52 100644 --- a/policyengine_us/variables/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.py +++ b/policyengine_us/variables/gov/irs/credits/ctc/maximum/individual/ctc_adult_individual_maximum.py @@ -15,6 +15,7 @@ class ctc_adult_individual_maximum(Variable): "https://www.law.cornell.edu/uscode/text/26/24#a", "https://www.law.cornell.edu/uscode/text/26/24#h", "https://www.law.cornell.edu/uscode/text/26/24#i", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", ) def formula(person, period, parameters): @@ -24,9 +25,16 @@ def formula(person, period, parameters): filer_meets_tin_requirement = person.tax_unit( "filer_meets_ctc_identification_requirements", period ) + # IRC 24(h)(4)(A) gives the credit for "each dependent of the taxpayer"; + # 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 = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) return ( is_adult * dependent_has_tin * filer_meets_tin_requirement + * ~filer_is_dependent * p.amount.adult_dependent ) diff --git a/policyengine_us/variables/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.py b/policyengine_us/variables/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.py index 6509aa1f045..b3d5406e196 100644 --- a/policyengine_us/variables/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.py +++ b/policyengine_us/variables/gov/irs/credits/education/american_opportunity_credit/is_eligible_for_american_opportunity_credit.py @@ -18,6 +18,12 @@ def formula(person, period, parameters): filing_status = tax_unit("filing_status", period) filing_status_values = filing_status.possible_values filing_status_eligible = filing_status != filing_status_values.SEPARATE + # The dependency rules of IRC 25A(g)(3) and 25A(f)(1)(A)(iii): a + # claimed filer bars the return, and a dependent student needs the + # return to have dependents. + barred_by_dependency = person( + "is_barred_from_education_credits_by_dependency", period + ) requires_1098_t = aoc.eligibility.requires_1098_t_or_exception has_1098_t_or_exception = ( person("has_american_opportunity_credit_1098_t_or_exception", period) @@ -66,4 +72,5 @@ def formula(person, period, parameters): period, ) & filing_status_eligible + & ~barred_by_dependency ) diff --git a/policyengine_us/variables/gov/irs/credits/education/is_barred_from_education_credits_by_dependency.py b/policyengine_us/variables/gov/irs/credits/education/is_barred_from_education_credits_by_dependency.py new file mode 100644 index 00000000000..6a08d71c198 --- /dev/null +++ b/policyengine_us/variables/gov/irs/credits/education/is_barred_from_education_credits_by_dependency.py @@ -0,0 +1,34 @@ +from policyengine_us.model_api import * + + +class is_barred_from_education_credits_by_dependency(Variable): + value_type = bool + entity = Person + label = "Barred from the education credits by the dependency rules" + definition_period = YEAR + reference = ( + # Subsections (f)(1)(A)(iii) and (g)(3). + "https://www.law.cornell.edu/uscode/text/26/25A#g_3", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + "https://www.ecfr.gov/current/title-26/section-1.25A-1", + ) + + def formula(person, period, parameters): + tax_unit = person.tax_unit + # IRC 25A(g)(3): no credit to an individual for whom a section 151 + # deduction "is allowed to another taxpayer", and the Form 1040 + # instructions extend this to "your spouse if filing jointly", so + # either filer being claimed bars the return's credit. This turns on + # an actual claim (26 CFR 1.25A-1(f)), so it reads the claimed input + # rather than a claimability helper. + filer = person("is_tax_unit_head_or_spouse", period) + claimed = person("claimed_as_dependent_on_another_return", period) + filer_claimed = tax_unit.any(filer & claimed) + # IRC 25A(f)(1)(A)(iii) counts the tuition of a dependent only if the + # taxpayer "is allowed a deduction under section 151" for them, and a + # return on which a filer can be claimed as a dependent (outside the + # claimant filing exception) has no dependents (IRC 152(b)(1)). + dependent_student_barred = person("is_tax_unit_dependent", period) & tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + return filer_claimed | dependent_student_barred diff --git a/policyengine_us/variables/gov/irs/credits/education/is_eligible_for_lifetime_learning_credit.py b/policyengine_us/variables/gov/irs/credits/education/is_eligible_for_lifetime_learning_credit.py index 3d80f23da5f..1a7bbf0a847 100644 --- a/policyengine_us/variables/gov/irs/credits/education/is_eligible_for_lifetime_learning_credit.py +++ b/policyengine_us/variables/gov/irs/credits/education/is_eligible_for_lifetime_learning_credit.py @@ -19,6 +19,12 @@ def formula(person, period, parameters): filing_status = tax_unit("filing_status", period) filing_status_values = filing_status.possible_values filing_status_eligible = filing_status != filing_status_values.SEPARATE + # The dependency rules of IRC 25A(g)(3) and 25A(f)(1)(A)(iii): a + # claimed filer bars the return, and a dependent student needs the + # return to have dependents. + barred_by_dependency = person( + "is_barred_from_education_credits_by_dependency", period + ) requires_1098_t = llc.eligibility.requires_1098_t_or_exception has_1098_t_or_exception = ( person("has_lifetime_learning_credit_1098_t_or_exception", period) @@ -45,4 +51,5 @@ def formula(person, period, parameters): period, ) & filing_status_eligible + & ~barred_by_dependency ) diff --git a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_adult_count_with_valid_ssn.py b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_adult_count_with_valid_ssn.py index 2250e5d6698..81b908901fd 100644 --- a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_adult_count_with_valid_ssn.py +++ b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_adult_count_with_valid_ssn.py @@ -7,12 +7,12 @@ class rrc_adult_count_with_valid_ssn(Variable): definition_period = YEAR label = "Count of tax unit head/spouse with valid SSN for RRC" reference = ( - "https://www.law.cornell.edu/uscode/text/26/6428#g_1_A", - "https://www.law.cornell.edu/uscode/text/26/6428#g_1_B", + # Subsections (d)(2) and (g)(1)(A)-(B). + "https://www.law.cornell.edu/uscode/text/26/6428#g_1", + # Subsections (d)(2) and (g)(1)-(2). "https://www.law.cornell.edu/uscode/text/26/6428A#g_1", - "https://www.law.cornell.edu/uscode/text/26/6428A#g_2", - "https://www.law.cornell.edu/uscode/text/26/6428B#e_2_A", - "https://www.law.cornell.edu/uscode/text/26/6428B#e_2_B", + # Subsections (c)(2) and (e)(2)(A)-(B). + "https://www.law.cornell.edu/uscode/text/26/6428B#e_2", ) def formula(tax_unit, period, parameters): @@ -20,4 +20,9 @@ def formula(tax_unit, period, parameters): head_or_spouse = person("is_tax_unit_head_or_spouse", period) # Reuse existing EITC SSN check - identical definition (SSN required) has_valid_ssn = person("meets_eitc_identification_requirements", period) - return tax_unit.sum(head_or_spouse & has_valid_ssn) + # An "eligible individual" excludes "any individual with respect to + # whom a deduction under section 151 is allowable to another + # taxpayer" (IRC 6428(d)(2), 6428A(d)(2)) or "who is a dependent of + # another taxpayer" (IRC 6428B(c)(2)): a claimability test. + claimable = person("claimable_as_dependent_on_another_return", period) + return tax_unit.sum(head_or_spouse & has_valid_ssn & ~claimable) diff --git a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa.py b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa.py index 252017448f7..e5f35eb2829 100644 --- a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa.py +++ b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa.py @@ -26,9 +26,17 @@ def formula(tax_unit, period, parameters): ) is_joint = tax_unit("tax_unit_is_joint", period) adults_with_ssn = tax_unit("rrc_adult_count_with_valid_ssn", period) + # The exception waives the identification rule, not the exclusion of + # a spouse who is another taxpayer's dependent. + person = tax_unit.members + dependent_filers = tax_unit.sum( + person("is_tax_unit_head_or_spouse", period) + & person("claimable_as_dependent_on_another_return", period) + ) count_adults = where( armed_forces_exception, - 2, # Joint filers always have 2 adults (structural constant) + # Joint filers always have 2 adults (structural constant) + max_(2 - dependent_filers, 0), where(is_joint, adults_with_ssn, min_(adults_with_ssn, 1)), ) max_payment = ( @@ -39,4 +47,8 @@ def formula(tax_unit, period, parameters): excess = max_(0, agi - rrc.arpa.phase_out.threshold[filing_status]) payment_reduction_percent = excess / phase_out_length payment_reduction = max_payment * payment_reduction_percent - return max_(0, max_payment - payment_reduction) + # IRC 6428B(a) allows the credit to "an eligible individual", so a + # return whose every filer is a dependent of another taxpayer gets + # none, even for its own dependents. + no_eligible_filer = tax_unit("every_filer_is_dependent_elsewhere", period) + return where(no_eligible_filer, 0, max_(0, max_payment - payment_reduction)) diff --git a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa_dependents_with_valid_ssn.py b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa_dependents_with_valid_ssn.py index 00b05333a86..45245ce16a2 100644 --- a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa_dependents_with_valid_ssn.py +++ b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_arpa_dependents_with_valid_ssn.py @@ -13,6 +13,12 @@ class rrc_arpa_dependents_with_valid_ssn(Variable): def formula(tax_unit, period, parameters): person = tax_unit.members - is_dependent = person("is_tax_unit_dependent", period) + # IRC 6428B(b)(2) counts "the number of dependents of the taxpayer", and + # under 152(b)(1) a return on which the filer (or, if joint, either + # spouse) can be claimed as a dependent has none. + dependent_filer = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + is_dependent = person("is_tax_unit_dependent", period) & ~dependent_filer has_valid_ssn = person("meets_eitc_identification_requirements", period) return tax_unit.sum(is_dependent & has_valid_ssn) diff --git a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_caa.py b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_caa.py index 577228072bb..7bd14989385 100644 --- a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_caa.py +++ b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_caa.py @@ -23,9 +23,17 @@ def formula(tax_unit, period, parameters): "rrc_qualifies_for_armed_forces_exception", period ) is_joint = tax_unit("tax_unit_is_joint", period) + # The exception waives the identification rule, not the exclusion of + # a spouse who is another taxpayer's dependent. + person = tax_unit.members + dependent_filers = tax_unit.sum( + person("is_tax_unit_head_or_spouse", period) + & person("claimable_as_dependent_on_another_return", period) + ) count_adults = where( armed_forces_exception, - 2, # Joint filers always have 2 adults (structural constant) + # Joint filers always have 2 adults (structural constant) + max_(2 - dependent_filers, 0), where(is_joint, adults_with_ssn, min_(adults_with_ssn, 1)), ) # Per 26 USC 6428A(g)(3), children count only if: @@ -34,7 +42,15 @@ def formula(tax_unit, period, parameters): children_with_ssn = tax_unit( "rrc_cares_qualifying_children_with_valid_ssn", period ) - count_children = where(adults_with_ssn > 0, children_with_ssn, 0) + # This prerequisite is a spouse with a valid SSN, whether or not that + # spouse is an eligible individual; the credit itself needs a filer + # who is not a dependent of another taxpayer. + filer_has_ssn = tax_unit.any( + person("is_tax_unit_head_or_spouse", period) + & person("meets_eitc_identification_requirements", period) + ) + no_eligible_filer = tax_unit("every_filer_is_dependent_elsewhere", period) + count_children = where(filer_has_ssn & ~no_eligible_filer, children_with_ssn, 0) max_payment = ( rrc.caa.max.adult * count_adults + rrc.caa.max.child * count_children ) diff --git a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_cares.py b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_cares.py index bbbf38b4a21..20868403722 100644 --- a/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_cares.py +++ b/policyengine_us/variables/gov/irs/credits/recovery_rebate_credit/rrc_cares.py @@ -23,9 +23,17 @@ def formula(tax_unit, period, parameters): "rrc_qualifies_for_armed_forces_exception", period ) is_joint = tax_unit("tax_unit_is_joint", period) + # The exception waives the identification rule, not the exclusion of + # a spouse who is another taxpayer's dependent. + person = tax_unit.members + dependent_filers = tax_unit.sum( + person("is_tax_unit_head_or_spouse", period) + & person("claimable_as_dependent_on_another_return", period) + ) count_adults = where( armed_forces_exception, - 2, # Joint filers always have 2 adults (structural constant) + # Joint filers always have 2 adults (structural constant) + max_(2 - dependent_filers, 0), where(is_joint, adults_with_ssn, min_(adults_with_ssn, 1)), ) # Per 26 USC 6428(g)(1)(C), children count only if: @@ -34,7 +42,15 @@ def formula(tax_unit, period, parameters): children_with_ssn = tax_unit( "rrc_cares_qualifying_children_with_valid_ssn", period ) - count_children = where(adults_with_ssn > 0, children_with_ssn, 0) + # This prerequisite is a spouse with a valid SSN, whether or not that + # spouse is an eligible individual; the credit itself needs a filer + # who is not a dependent of another taxpayer. + filer_has_ssn = tax_unit.any( + person("is_tax_unit_head_or_spouse", period) + & person("meets_eitc_identification_requirements", period) + ) + no_eligible_filer = tax_unit("every_filer_is_dependent_elsewhere", period) + count_children = where(filer_has_ssn & ~no_eligible_filer, children_with_ssn, 0) max_payment = ( rrc.cares.max.adult * count_adults + rrc.cares.max.child * count_children ) diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/student_loan_interest/student_loan_interest_ald_eligible.py b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/student_loan_interest/student_loan_interest_ald_eligible.py index 9bf6a41feb0..fd1bcc2bab0 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/student_loan_interest/student_loan_interest_ald_eligible.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/student_loan_interest/student_loan_interest_ald_eligible.py @@ -19,9 +19,16 @@ class student_loan_interest_ald_eligible(Variable): ) def formula(person, period, parameters): - # Per IRC § 221(c), taxpayer cannot be claimed as a dependent head_or_spouse = person("is_tax_unit_head_or_spouse", period) + # Per IRC § 221(c), no deduction for an individual for whom a section + # 151 deduction "is allowed to another taxpayer"; the Form 1040 + # instructions require that "you, or your spouse if filing jointly, + # aren't claimed as a dependent", so either filer being claimed bars + # the return. This turns on an actual claim, so it reads the claimed + # input rather than a claimability helper. + claimed = person("claimed_as_dependent_on_another_return", period) + filer_claimed = person.tax_unit.any(head_or_spouse & claimed) # Per IRC § 221(e)(2), taxpayer cannot file as Married Filing Separately filing_status = person.tax_unit("filing_status", period) separate = filing_status == filing_status.possible_values.SEPARATE - return head_or_spouse & ~separate + return head_or_spouse & ~separate & ~filer_claimed diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.py b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.py index ac202b88a48..0b169af9c13 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/tuition_and_fees_deduction_eligible.py @@ -27,4 +27,9 @@ def formula(tax_unit, period, parameters): "lifetime_learning_credit_potential", ], ) - return ~separate & (aoc_llc == 0) + # IRC 222(c)(3): no deduction to an individual for whom a section 151 + # deduction "may be allowed to another taxpayer". Without this, a + # filer barred from the education credits for that reason would + # become eligible here. + dependent_filer = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + return ~separate & (aoc_llc == 0) & ~dependent_filer diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/exemptions/exemptions_count.py b/policyengine_us/variables/gov/irs/income/taxable_income/exemptions/exemptions_count.py index b8e19acbdab..57eaacb22f8 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/exemptions/exemptions_count.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/exemptions/exemptions_count.py @@ -7,5 +7,35 @@ class exemptions_count(Variable): label = "Number of tax exemptions" unit = USD definition_period = YEAR + documentation = ( + "Number of personal exemptions on the federal return: one for each " + "filer who cannot be claimed as a dependent by another taxpayer, plus " + "one for each dependent unless a filer can be claimed and the " + "would-be claimant does not meet the filing exception." + ) + reference = ( + "https://www.law.cornell.edu/uscode/text/26/151#d_2", + "https://www.law.cornell.edu/uscode/text/26/152#b_1", + # Publication 501, Dependent Taxpayer Test. + "https://www.irs.gov/pub/irs-prior/p501--2025.pdf#page=11", + # 2017 Form 1040, line 6a: "If someone can claim you as a dependent, + # do not check box 6a"; instructions, line 6b: the spouse box only + # if the "spouse can't be claimed as a dependent". + "https://www.irs.gov/pub/irs-prior/f1040--2017.pdf#page=1", + "https://www.irs.gov/pub/irs-prior/i1040gi--2017.pdf#page=15", + ) - adds = ["tax_unit_size"] + def formula(tax_unit, period, parameters): + tax_unit_size = tax_unit("tax_unit_size", period) + # IRC 151(d)(2): no exemption for a filer whom another taxpayer can + # claim as a dependent. + claimable_filer = tax_unit("head_or_spouse_is_dependent_elsewhere", period) + own = tax_unit("head_spouse_count_not_dependent_elsewhere", period) + # IRC 152(b)(1): such a filer has no dependents, unless the would-be + # claimant is not required to file and files no return or only for a + # refund (Publication 501, Dependent Taxpayer Test). + no_dependents = tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + dependents = where(no_dependents, 0, tax_unit("tax_unit_dependents", period)) + return where(claimable_filer, own + dependents, tax_unit_size) diff --git a/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_cdcc_relevant_expenses.py b/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_cdcc_relevant_expenses.py index 35a774cc8af..90fe572f530 100644 --- a/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_cdcc_relevant_expenses.py +++ b/policyengine_us/variables/gov/states/ca/tax/income/credits/ca_cdcc_relevant_expenses.py @@ -25,7 +25,7 @@ def formula(tax_unit, period, parameters): # Qualifying expenses cover childcare plus care for a disabled # qualifying individual of any age (FTB 3506 instructions, # Section D). - childcare = tax_unit("tax_unit_childcare_expenses", period) + childcare = tax_unit("cdcc_qualifying_childcare_expenses", period) adult_care = add(tax_unit, period, ["care_expenses"]) expenses = childcare + adult_care # First, cap based on the number of eligible care receivers diff --git a/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py index 6722f22b3c2..9701ad23833 100644 --- a/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py +++ b/policyengine_us/variables/gov/states/de/tax/income/credits/personal/de_personal_credit_indv.py @@ -32,16 +32,27 @@ def formula(person, period, parameters): fixed = person("de_aged_personal_credit_indv", period) + person( "de_cdcc_indv", period ) - # Each column's own $110 personal credit is fixed to that column. - head_fixed = person.tax_unit.sum(is_head * fixed) + credit_per - spouse_fixed = person.tax_unit.sum(is_spouse * fixed) + credit_per + # Each column's own $110 personal credit is fixed to that column. 30 + # Del. C. 1110(b)(1) gives it "for each personal exemption to which + # such individual is entitled ... for federal income tax purposes", + # and a spouse who can be claimed as a dependent has none (IRC + # 151(d)(2)). + head_own = where( + person.tax_unit("head_is_dependent_elsewhere", period), 0, credit_per + ) + spouse_own = where( + person.tax_unit("spouse_is_dependent_elsewhere", period), 0, credit_per + ) + head_fixed = person.tax_unit.sum(is_head * fixed) + head_own + spouse_fixed = person.tax_unit.sum(is_spouse * fixed) + spouse_own head_capacity = max_(head_tax - head_fixed, 0) spouse_capacity = max_(spouse_tax - spouse_fixed, 0) total_units = person.tax_unit("exemptions_count", period) - # Dependent increments: exemptions beyond the two spouses. - dep_units = max_(total_units - 2, 0) + # Dependent increments: exemptions beyond the spouses' own. + own_units = person.tax_unit("head_spouse_count_not_dependent_elsewhere", period) + dep_units = max_(total_units - own_units, 0) # Optimal dependent split: try proportional floor and ceil, pick # whichever maximises effective credits (min of alloc vs @@ -62,7 +73,7 @@ def formula(person, period, parameters): ) n_head_dep = where(eff_high > eff_low, n_high, n_low) - head_alloc = credit_per + n_head_dep * credit_per - spouse_alloc = credit_per + (dep_units - n_head_dep) * credit_per + head_alloc = head_own + n_head_dep * credit_per + spouse_alloc = spouse_own + (dep_units - n_head_dep) * credit_per return is_head_or_spouse * where(is_head, head_alloc, spouse_alloc) diff --git a/policyengine_us/variables/gov/states/ga/tax/income/credits/ctc/ga_ctc_eligible_child.py b/policyengine_us/variables/gov/states/ga/tax/income/credits/ctc/ga_ctc_eligible_child.py new file mode 100644 index 00000000000..2017b09d4b3 --- /dev/null +++ b/policyengine_us/variables/gov/states/ga/tax/income/credits/ctc/ga_ctc_eligible_child.py @@ -0,0 +1,29 @@ +from policyengine_us.model_api import * + + +class ga_ctc_eligible_child(Variable): + value_type = bool + entity = Person + label = "Eligible child for the Georgia Child Tax Credit" + definition_period = YEAR + defined_for = StateCode.GA + reference = ( + "https://legiscan.com/GA/text/HB136/id/3204611/Georgia-2025-HB136-Enrolled.pdf#page=3", + "https://www.law.cornell.edu/uscode/text/26/24#c", + ) + + def formula(person, period, parameters): + p = parameters(period).gov.states.ga.tax.income.credits.ctc + age = person("age", period) + # Georgia gives "qualifying child" the meaning of IRC 24(c) only, so + # it is not limited to children for whom the federal credit is + # allowed (IRC 24(a), 152(b)(1)). Whether a filer who can be claimed + # as a dependent can claim it is not settled; this keeps the IRC + # 24(c) child test. + p_federal = parameters(period).gov.irs.credits.ctc + ctc_eligible_child = ( + person("is_tax_unit_dependent", period) + & (age < p_federal.amount.base.thresholds[-1]) + & person("meets_ctc_child_identification_requirements", period) + ) + return ctc_eligible_child & (age < p.age_threshold) diff --git a/policyengine_us/variables/gov/states/ga/tax/income/credits/ctc/ga_ctc_potential.py b/policyengine_us/variables/gov/states/ga/tax/income/credits/ctc/ga_ctc_potential.py index 46ceaac454b..52e40cca462 100644 --- a/policyengine_us/variables/gov/states/ga/tax/income/credits/ctc/ga_ctc_potential.py +++ b/policyengine_us/variables/gov/states/ga/tax/income/credits/ctc/ga_ctc_potential.py @@ -14,10 +14,6 @@ class ga_ctc_potential(Variable): def formula(tax_unit, period, parameters): p = parameters(period).gov.states.ga.tax.income.credits.ctc - person = tax_unit.members - age = person("age", period) - ctc_eligible_child = person("ctc_qualifying_child", period) - ga_child_age_eligible = age < p.age_threshold - eligible_children = tax_unit.sum(ctc_eligible_child & ga_child_age_eligible) + eligible_children = add(tax_unit, period, ["ga_ctc_eligible_child"]) return eligible_children * p.amount diff --git a/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_low_income_credit_potential.py b/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_low_income_credit_potential.py index 4487e9e448a..07708fa354f 100644 --- a/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_low_income_credit_potential.py +++ b/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_low_income_credit_potential.py @@ -15,7 +15,10 @@ def formula(tax_unit, period, parameters): # "multiplied by the number of dependents which the taxpayer is entitled to claim." # The tax form excludes adult dependents: # "Exemptions are self, spouse and natural or legally adopted children" - exemptions = tax_unit("exemptions_count", period) + # Georgia counts its own exemptions (O.C.G.A. 48-7A-3 deems each joint + # spouse a dependent), not the federal count, which leaves out a + # filer who can be claimed as a dependent. + exemptions = tax_unit("tax_unit_size", period) p = parameters(period).gov.states.ga.tax.income.credits.low_income # age threshold age_threshold = p.supplement_age_eligibility diff --git a/policyengine_us/variables/gov/states/hi/tax/income/credits/food_excise/hi_food_excise_exemption_amount.py b/policyengine_us/variables/gov/states/hi/tax/income/credits/food_excise/hi_food_excise_exemption_amount.py index 09127fcd2c1..39bbb252a55 100644 --- a/policyengine_us/variables/gov/states/hi/tax/income/credits/food_excise/hi_food_excise_exemption_amount.py +++ b/policyengine_us/variables/gov/states/hi/tax/income/credits/food_excise/hi_food_excise_exemption_amount.py @@ -47,11 +47,15 @@ def formula(tax_unit, period, parameters): # be claimed by another taxpayer, including children. In 2022, # lines 8-10 price ordinary persons and publicly supported minors # separately; 2025 lines 8-9 combine the two qualified counts. - externally_claimable = tax_unit.sum( - tax_unit.members("claimable_as_dependent_on_another_return", period) + # exemptions_count already leaves out a filer who can be claimed, so + # only the dependents who can be claimed elsewhere come off here. + person = tax_unit.members + externally_claimable_dependents = tax_unit.sum( + person("is_tax_unit_dependent", period) + & person("claimable_as_dependent_on_another_return", period) ) exemptions = max_( - tax_unit("exemptions_count", period) - externally_claimable, 0 + tax_unit("exemptions_count", period) - externally_claimable_dependents, 0 ) minor_children = tax_unit("hi_food_excise_credit_minor_child_count", period) if p.minor_child.in_effect: diff --git a/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_act_115_rebate.py b/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_act_115_rebate.py index adc6f987c58..f0c3d84ac13 100644 --- a/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_act_115_rebate.py +++ b/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_act_115_rebate.py @@ -52,16 +52,10 @@ def formula(tax_unit, period, parameters): independent_filers = tax_unit( "head_spouse_count_not_dependent_elsewhere", period ) - dependent_taxpayer = tax_unit( - "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period - ) - filers = add(tax_unit, period, ["is_tax_unit_head_or_spouse"]) - dependent_filers = filers - independent_filers - ordinary_exemptions = max_(exemptions - dependent_filers, 0) - qualified_exemptions = where( - dependent_taxpayer, independent_filers, ordinary_exemptions - ) + # exemptions_count applies these rules: it leaves out a claimable + # filer's own exemption and, unless the filing exception applies, the + # return's dependents. qualified_exemptions = where( - dependent_filer & (independent_filers == 0), 0, qualified_exemptions + dependent_filer & (independent_filers == 0), 0, exemptions ) return amount_per_exemption * qualified_exemptions diff --git a/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.py b/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.py index a744ce369bf..d55ac2607ca 100644 --- a/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.py +++ b/policyengine_us/variables/gov/states/hi/tax/income/credits/hi_low_income_household_renters/hi_low_income_household_renters_tax_credit.py @@ -32,18 +32,24 @@ def formula(tax_unit, period, parameters): ) & ~tax_unit("spouse_is_dependent_elsewhere", period) aged_exemptions = aged_head.astype(int) + aged_spouse.astype(int) + # exemptions_count applies these rules to the filers and to the + # return's dependents. A dependent who can be claimed by another + # taxpayer is also left out; a return without dependents has none to + # take off. dependent_taxpayer = tax_unit( "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period ) - independent_filers = tax_unit( - "head_spouse_count_not_dependent_elsewhere", period + person = tax_unit.members + externally_claimable_dependents = tax_unit.sum( + person("is_tax_unit_dependent", period) + & person("claimable_as_dependent_on_another_return", period) ) - filers = add(tax_unit, period, ["is_tax_unit_head_or_spouse"]) - dependent_filers = filers - independent_filers - ordinary_exemptions = max_( - tax_unit("exemptions_count", period) - dependent_filers, 0 + exemptions_count = tax_unit("exemptions_count", period) + exemptions = where( + dependent_taxpayer, + exemptions_count, + max_(exemptions_count - externally_claimable_dependents, 0), ) - exemptions = where(dependent_taxpayer, independent_filers, ordinary_exemptions) total_exemptions = exemptions + aged_exemptions return p.amount * total_exemptions diff --git a/policyengine_us/variables/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.py b/policyengine_us/variables/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.py index 98a265dc9e8..c1540e1b65f 100644 --- a/policyengine_us/variables/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.py +++ b/policyengine_us/variables/gov/states/nm/tax/income/exemptions/nm_low_and_middle_income_exemption.py @@ -25,5 +25,8 @@ def formula(tax_unit, period, parameters): exemption_amount = p.max_amount - reduction_amount # Multiply the exemption amount by the number of exemptions + # NMSA 7-2-5.8 multiplies by the number of federal exemptions, which + # leaves out a filer who can be claimed as a dependent and, on such a + # return, the dependents. exemptions_count = tax_unit("exemptions_count", period) return eligible * exemption_amount * exemptions_count diff --git a/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.py b/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.py index 1fbb3a4d6b7..33bf6d2e2a3 100644 --- a/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.py +++ b/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate.py @@ -49,4 +49,10 @@ def formula(tax_unit, period, parameters): p.divisor, 1, ) - return rebate / divisor + # NMSA 7-2-14(A) allows the rebate only to a resident "who is not a + # dependent of another individual"; on a joint return the spouse who + # is not may still claim it (PIT-RC). The table starts at one + # exemption. + every_filer_dependent = tax_unit("every_filer_is_dependent_elsewhere", period) + eligible = ~every_filer_dependent & (exemptions > 0) + return where(eligible, rebate / divisor, 0) diff --git a/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.py b/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.py index cd8f89ad180..05621600269 100644 --- a/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.py +++ b/policyengine_us/variables/gov/states/nm/tax/income/rebates/low_income_comprehensive/nm_low_income_comprehensive_tax_rebate_exemptions.py @@ -9,6 +9,7 @@ class nm_low_income_comprehensive_tax_rebate_exemptions(Variable): definition_period = YEAR reference = ( "https://law.justia.com/codes/new-mexico/chapter-7/article-2/section-7-2-14/", + "https://realfile.tax.newmexico.gov/2025pit-rc-ins.pdf#page=3", ) defined_for = StateCode.NM @@ -21,6 +22,11 @@ def formula(tax_unit, period, parameters): tax purposes for each individual included in the return who is domiciled in New Mexico... """ + # The federal count leaves out a filer who can be claimed as a + # dependent and, on such a return, the dependents, as PIT-RC line 2a + # does: "If either you or your spouse meet the general + # qualifications, but not both, then the non-qualifying spouse is not + # eligible". federal_exemptions = tax_unit("exemptions_count", period) """ ...plus two additional exemptions for each individual domiciled diff --git a/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions_eligible_person.py b/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions_eligible_person.py index 9a45b4bda79..813a61fd698 100644 --- a/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions_eligible_person.py +++ b/policyengine_us/variables/gov/states/oh/tax/income/exemptions/oh_personal_exemptions_eligible_person.py @@ -18,6 +18,11 @@ def formula(person, period, parameters): dependent_on_another_return = person( "claimable_as_dependent_on_another_return", period ) - # The personal exemption is also provided to dependents - dependent = person("is_tax_unit_dependent", period) + # The personal exemption is also provided to dependents, but a return + # on which the filer (or, if joint, either spouse) can be claimed as a + # dependent has none (IRC 152(b)(1)). + dependent_filer = person.tax_unit( + "head_or_spouse_is_dependent_elsewhere_without_filing_exception", period + ) + dependent = person("is_tax_unit_dependent", period) & ~dependent_filer return (~dependent_on_another_return & head_or_spouse) | dependent