diff --git a/changelog.d/or-170p-standard-deduction.fixed.md b/changelog.d/or-170p-standard-deduction.fixed.md new file mode 100644 index 00000000000..829a20170ad --- /dev/null +++ b/changelog.d/or-170p-standard-deduction.fixed.md @@ -0,0 +1 @@ +Apply the federal non-itemizer charitable deduction to eligible Oregon returns, count minor filers' own gifts, limit qualifying cash by federal or Hawaii income as applicable, and compare Oregon deduction amounts before the 2021 charity subtraction. diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/charitable_contributions/charitable_contributions_ald.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/charitable_contributions/charitable_contributions_ald.yaml index 84e1d6dfdaa..fa7816ec12c 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/charitable_contributions/charitable_contributions_ald.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/charitable_contributions/charitable_contributions_ald.yaml @@ -99,6 +99,7 @@ - name: Case 11, no above-the-line deduction in 2021; 170(p) takes it from AGI instead. period: 2021 input: + adjusted_gross_income: 1_000 charitable_cash_donations: 500 filing_status: SINGLE tax_unit_itemizes: false diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.yaml index 2a7941e9543..7265699e644 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.yaml @@ -35,6 +35,7 @@ - name: 2021 single filer less than limit period: 2021 input: + adjusted_gross_income: 1_000 charitable_cash_donations: 200 filing_status: SINGLE output: @@ -43,6 +44,7 @@ - name: 2021 single filer more than limit period: 2021 input: + adjusted_gross_income: 1_000 charitable_cash_donations: 400 filing_status: SINGLE output: @@ -51,6 +53,7 @@ - name: 2021 married filers less than limit period: 2021 input: + adjusted_gross_income: 1_000 charitable_cash_donations: 400 filing_status: JOINT output: @@ -59,6 +62,7 @@ - name: 2021 married filers more than limit period: 2021 input: + adjusted_gross_income: 1_000 charitable_cash_donations: 700 filing_status: JOINT output: @@ -83,6 +87,7 @@ - name: 2021 non-itemizer giving cash to 50% org gets deduction under § 170(p) period: 2021 input: + adjusted_gross_income: 1_000 charitable_cash_donations_50_pct_orgs: 400 filing_status: SINGLE output: @@ -91,9 +96,99 @@ - name: 2021 non-itemizer mix of 50% and non-50% org cash period: 2021 input: + adjusted_gross_income: 1_000 charitable_cash_donations: 400 charitable_cash_donations_non_50_pct_orgs: 300 filing_status: SINGLE output: # 400 total - 300 non-50% = 100 to 50% orgs; min(100, 300 cap) = 100 charitable_deduction_for_non_itemizers: 100 + +- name: Dependent's cash gift is excluded from the parent's federal non-itemizer deduction + period: 2021 + input: + people: + head: {age: 40, employment_income: 50_000, is_tax_unit_head: true} + child: {age: 17, charitable_cash_donations: 300, is_tax_unit_dependent: true} + tax_units: + tax_unit: {members: [head, child], filing_status: SINGLE, tax_unit_itemizes: false} + output: + # The filer gave 0. 50,000 - 12,550 - 0 = 37,450. + charitable_deduction_for_non_itemizers: 0 + taxable_income: 37_450 + +- name: A 17-year-old can claim their gift on their own return + period: 2021 + input: + age: 17 + filing_status: SINGLE + employment_income: 10_000 + is_tax_unit_dependent: false + charitable_cash_donations: 100 + output: + # The only person on the return gave 100. min(100, 300) = 100. + charitable_deduction_for_non_itemizers: 100 + +- name: A spouse's own gifts do not count on a separate federal return + period: 2021 + input: + people: + head: {age: 40, employment_income: 30_000, charitable_cash_donations: 100, is_tax_unit_head: true} + spouse: {age: 40, charitable_cash_donations: 200, is_tax_unit_spouse: true} + tax_units: + tax_unit: {members: [head, spouse], filing_status: SEPARATE} + output: + # min(100 from the filer, 300) = 100. + charitable_deduction_for_non_itemizers: 100 + +- name: 2026 non-itemizer cash ceiling applies without the itemized floor + period: 2026 + input: + filing_status: SINGLE + adjusted_gross_income: 1_000 + charitable_cash_donations: 1_000 + output: + # min(1,000 gift, 1,000 cap, 1,000 x 60%) = 600. + charitable_deduction_for_non_itemizers: 600 + +- name: 2026 non-itemizer has no deduction with a negative contribution base + period: 2026 + input: + filing_status: SINGLE + adjusted_gross_income: -100 + charitable_cash_donations: 1_000 + output: + # 60% x max(0, -100) = 0. + charitable_deduction_for_non_itemizers: 0 + +- name: 2021 cash gift with no federal contribution base + period: 2021 + input: + adjusted_gross_income: 0 + charitable_cash_donations: 300 + tax_unit_itemizes: false + output: + # min(300 gift, 300 dollar cap, 100% x 0) = 0. + charitable_deduction_for_non_itemizers: 0 + +- name: 2021 elected cash limit applies to a small positive contribution base + period: 2021 + input: + filing_status: SINGLE + adjusted_gross_income: 150 + charitable_cash_donations: 300 + output: + # min(300 gift, 300 dollar cap, 100% x 150) = 150. + charitable_deduction_for_non_itemizers: 150 + +- name: Minor filer with a child deducts their own 2021 gift + period: 2021 + input: + people: + parent: {age: 17, employment_income: 24_000, charitable_cash_donations: 100} + child: {age: 1, is_tax_unit_dependent: true} + tax_units: + return: {members: [parent, child], filing_status: HEAD_OF_HOUSEHOLD, tax_unit_itemizes: false} + output: + # min(100 from the filer, 300 dollar cap, 100% x 24,000) = 100. + charitable_deduction_for_non_itemizers: 100 diff --git a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.yaml b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.yaml index 63799f86996..a95c4b73ea3 100644 --- a/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.yaml +++ b/policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.yaml @@ -62,19 +62,21 @@ # Each triple is below, equal to, and above the 2021 Form 1040 line 12c # total: standard deduction plus the cash gift allowed by 26 U.S.C. 170(p). # Singles have full, partial, then zero gifts; joint filers repeat these. + adjusted_gross_income: [1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000, 1_000] filing_status: [SINGLE, SINGLE, SINGLE, SINGLE, SINGLE, SINGLE, SINGLE, SINGLE, SINGLE, JOINT, JOINT, JOINT, JOINT, JOINT, JOINT, JOINT, JOINT, JOINT] standard_deduction: [12_550, 12_550, 12_550, 12_550, 12_550, 12_550, 12_550, 12_550, 12_550, 25_100, 25_100, 25_100, 25_100, 25_100, 25_100, 25_100, 25_100, 25_100] charitable_cash_donations: [400, 400, 400, 150, 150, 150, 0, 0, 0, 700, 700, 700, 250, 250, 250, 0, 0, 0] itemized_taxable_income_deductions: [12_849, 12_850, 12_851, 12_699, 12_700, 12_701, 12_549, 12_550, 12_551, 25_699, 25_700, 25_701, 25_349, 25_350, 25_351, 25_099, 25_100, 25_101] output: # Section 170(p): $300 per single return and $600 per joint return, - # limited to the eligible cash actually given. + # limited to the cash given and the 1,000 contribution base. charitable_deduction_for_non_itemizers: [300, 300, 300, 150, 150, 150, 0, 0, 0, 600, 600, 600, 250, 250, 250, 0, 0, 0] tax_unit_itemizes: [false, false, true, false, false, true, false, false, true, false, false, true, false, false, true, false, false, true] - name: 2021 equal federal tax - deduction comparison includes the non-itemizer cash deduction period: 2021 input: + adjusted_gross_income: 1_000 gov.simulation.branch_to_determine_itemization: true filing_status: SINGLE standard_deduction: 12_550 diff --git a/policyengine_us/tests/policy/baseline/gov/local/or/multnomah_county/tax/income/or_multnomah_pfa_tax.yaml b/policyengine_us/tests/policy/baseline/gov/local/or/multnomah_county/tax/income/or_multnomah_pfa_tax.yaml index d401da5e25d..9abc9d08374 100644 --- a/policyengine_us/tests/policy/baseline/gov/local/or/multnomah_county/tax/income/or_multnomah_pfa_tax.yaml +++ b/policyengine_us/tests/policy/baseline/gov/local/or/multnomah_county/tax/income/or_multnomah_pfa_tax.yaml @@ -117,3 +117,39 @@ # Washington County resident - PFA tax does not apply # Tax = $0 or_multnomah_pfa_tax: 0 + +- name: Equal Oregon deduction options at the Multnomah County threshold + period: 2026 + input: + state_code: OR + county_str: MULTNOMAH_COUNTY_OR + filing_status: SINGLE + or_agi: 128_910 + or_standard_deduction: 2_910 + or_itemized_deductions: 3_910 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 1_000 + output: + # 2,910 + 1,000 = 3,910, equal to the itemized amount. + # 128,910 - 3,910 = 125,000. There is no excess to tax. + or_deductions: 3_910 + or_taxable_income: 125_000 + or_multnomah_pfa_tax: 0 + +- name: Federal non-itemizer charity lowers Multnomah County tax by 15 + period: 2026 + absolute_error_margin: 0.01 + input: + state_code: OR + county_str: MULTNOMAH_COUNTY_OR + filing_status: SINGLE + or_agi: 129_910 + or_standard_deduction: 2_910 + or_itemized_deductions: 625 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 1_000 + output: + # 129,910 - (2,910 + 1,000) = 126,000. + # (126,000 - 125,000) x 1.5% = 15, down from 2,000 x 1.5% = 30. + or_taxable_income: 126_000 + or_multnomah_pfa_tax: 15 diff --git a/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/hi_deductions.yaml b/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/hi_deductions.yaml index a406e94229a..0819a73b8a9 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/hi_deductions.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/hi_deductions.yaml @@ -327,6 +327,7 @@ input: state_code: HI filing_status: SINGLE + adjusted_gross_income: 60_000 hi_agi: 60_000 hi_total_itemized_deductions: 0 charitable_cash_donations: 1_500 @@ -340,6 +341,7 @@ input: state_code: HI filing_status: JOINT + adjusted_gross_income: 90_000 hi_agi: 90_000 hi_total_itemized_deductions: 0 charitable_cash_donations: 3_000 @@ -378,6 +380,7 @@ input: state_code: HI filing_status: SINGLE + adjusted_gross_income: 60_000 hi_agi: 60_000 hi_itemized_deductions: 20_000 charitable_cash_donations: 1_500 @@ -390,6 +393,7 @@ input: state_code: HI filing_status: SINGLE + adjusted_gross_income: 60_000 hi_agi: 60_000 hi_itemized_deductions: 8_500 charitable_cash_donations: 1_500 @@ -429,6 +433,7 @@ filing_status: SINGLE claimed_as_dependent_on_another_return: true standard_deduction_worksheet_earned_income: 100 + adjusted_gross_income: 60_000 hi_agi: 60_000 hi_total_itemized_deductions: 0 charitable_cash_donations: 1_500 @@ -449,3 +454,18 @@ output: charitable_deduction_for_non_itemizers: 0 hi_deductions: 2_200 + +- name: Hawaii uses its own 2026 contribution base + period: 2026 + input: + state_code: HI + filing_status: SINGLE + adjusted_gross_income: 1_000 + hi_agi: 20_000 + hi_itemized_deductions: 0 + charitable_cash_donations: 1_000 + output: + # Federal: min(1,000 gift, 1,000 cap, 60% x 1,000) = 600. + charitable_deduction_for_non_itemizers: 600 + # Hawaii: 8,000 + min(1,000 gift, 1,000 cap, 60% x 20,000) = 9,000. + hi_deductions: 9_000 diff --git a/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/standard/hi_standard_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/standard/hi_standard_deduction.yaml index 249de0f7722..42f7fdc2304 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/standard/hi_standard_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/deductions/standard/hi_standard_deduction.yaml @@ -142,6 +142,7 @@ state_code: HI filing_status: SEPARATE hi_required_to_itemize: true + hi_agi: 1_000 hi_itemized_deductions: 0 charitable_cash_donations: 100 output: @@ -211,11 +212,13 @@ input: state_code: HI filing_status: SINGLE + adjusted_gross_income: 1_000 + hi_agi: 2_000 hi_itemized_deductions: 9_000 charitable_cash_donations: 1_500 hi_tip_income_deduction: 500 output: - # $9,000 > $8,000, but $8,000 + min($1,500, $1,000) ties. + # Hawaii's 60% limit is $1,200, so the $1,000 cap makes the two paths tie. # The standard path adds $500 for tips once, for $9,500. hi_standard_deduction: 8_000 hi_itemized_deductions_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/or/tax/income/deductions/or_deductions.yaml b/policyengine_us/tests/policy/baseline/gov/states/or/tax/income/deductions/or_deductions.yaml index 98ef7ae99b1..1a2e00ec97d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/or/tax/income/deductions/or_deductions.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/or/tax/income/deductions/or_deductions.yaml @@ -6,3 +6,487 @@ or_standard_deduction: 1 output: or_deductions: 2 + +- name: F1 Oregon standard deduction includes the federal non-itemizer deduction + period: 2026 + absolute_error_margin: 0.1 + input: + state_code: OR + or_itemized_deductions: 1_000 + or_standard_deduction: 2_910 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 1_000 + output: + # max(1,000, 2,910 + 1,000) = 3,910. + or_deductions: 3_910 + +- name: F2 Federal itemizer takes the Oregon standard deduction + period: 2026 + absolute_error_margin: 0.1 + input: + state_code: OR + or_itemized_deductions: 1_000 + or_standard_deduction: 2_910 + tax_unit_itemizes: true + charitable_deduction_for_non_itemizers: 1_000 + output: + # The federal election makes the extra amount zero. max(1,000, 2,910) = 2,910. + or_deductions: 2_910 + +- name: F3 Oregon itemizer deducts the gift once + period: 2026 + absolute_error_margin: 0.1 + input: + state_code: OR + or_itemized_deductions: 6_000 + or_standard_deduction: 2_910 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 1_000 + output: + # max(6,000, 2,910 + 1,000) = 6,000. + or_deductions: 6_000 + +- name: F4 Oregon standard deduction plus charity exceeds itemized deductions + period: 2026 + absolute_error_margin: 0.1 + input: + state_code: OR + or_itemized_deductions: 3_500 + or_standard_deduction: 2_910 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 1_000 + output: + # max(3,500, 2,910 + 1,000) = 3,910. + or_deductions: 3_910 + +- name: H1 Single Oregon filer keeps the 2026 non-itemizer deduction + period: 2026 + absolute_error_margin: 0.1 + input: + people: + head: + age: 40 + employment_income: 75_000 + charitable_cash_donations: 1_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_code: OR + output: + # Itemized deductions are 1,000 - 0.5% x 75,000 = 625. + # The existing Oregon standard deduction parameter is 2,910. + # max(625, 2,910 + 1,000) = 3,910. + or_deductions: 3_910 + +- name: H2 Joint Oregon filers keep the 2026 non-itemizer deduction + period: 2026 + absolute_error_margin: 0.1 + input: + people: + head: + age: 40 + employment_income: 150_000 + charitable_cash_donations: 2_000 + is_tax_unit_head: true + spouse: + age: 40 + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + households: + household: + members: [head, spouse] + state_code: OR + output: + # Itemized deductions are 2,000 - 0.5% x 150,000 = 1,250. + # The existing Oregon standard deduction parameter is 5,820. + # max(1,250, 5,820 + 2,000) = 7,820. + or_deductions: 7_820 + +- name: H3 Integration check for 2026 single Oregon taxable income and tax + period: 2026 + absolute_error_margin: 0.1 + input: + people: + head: + age: 40 + employment_income: 75_000 + charitable_cash_donations: 1_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_code: OR + output: + # Integration check using the existing federal standard deduction of 16,100 + # and federal brackets of 10% to 12,400, 12% to 50,400 and 22% above that. + # The gift lowers federal taxable income from 58,900 to 57,900. + # Federal tax falls from 7,670 to 1,240 + 4,560 + 7,500 x 22% = 7,450. + # Oregon subtracts 7,450 under its existing 8,750 cap. + # 75,000 - 7,450 - (2,910 Oregon standard deduction + 1,000) = 63,640. + or_taxable_income: 63_640 + # At Oregon's existing rates and thresholds, 4,550 x 4.75% + 6,850 x 6.75% + # + 52,240 x 8.75% = 5,249.50. Subtract the existing 263 exemption credit. + or_income_tax: 4_986.50 + +- name: H4 Integration check for 2026 joint Oregon taxable income and tax + period: 2026 + absolute_error_margin: 0.1 + input: + people: + head: + age: 40 + employment_income: 150_000 + charitable_cash_donations: 2_000 + is_tax_unit_head: true + spouse: + age: 40 + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + households: + household: + members: [head, spouse] + state_code: OR + output: + # Integration check using the existing federal standard deduction of 32,200 + # and federal brackets of 10% to 24,800, 12% to 100,800 and 22% above that. + # Federal taxable income is 150,000 - 32,200 - 2,000 = 115,800. + # Federal tax is 2,480 + 9,120 + 15,000 x 22% = 14,900. + # Oregon subtracts its existing 8,750 cap and 5,820 standard deduction. + # 150,000 - 8,750 - (5,820 + 2,000) = 133,430. + or_taxable_income: 133_430 + # At Oregon's existing rates and thresholds, 9,100 x 4.75% + 13,700 x 6.75% + # + 110,630 x 8.75% = 11,037.125. Subtract two exemption credits of 263 each. + # The 2026 kicker rate is zero. + or_income_tax: 10_511.125 + +- name: H5 Single Oregon filer keeps the 2021 non-itemizer deduction + period: 2021 + absolute_error_margin: 0.1 + input: + people: + head: + age: 40 + employment_income: 50_000 + charitable_cash_donations: 500 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_code: OR + output: + # Federal itemized deductions are 3,912.375 of Oregon withholding plus 500. + # That total of 4,412.375 falls below 12,550 + min(300, 500) = 12,850. + # 2,350 > 500, so claim the standard deduction and code 363: 2,350 + 300 = 2,650. + or_deductions: 2_650 + +- name: H6 Joint Oregon filers keep the 2021 non-itemizer deduction + period: 2021 + absolute_error_margin: 0.1 + input: + people: + head: + age: 40 + employment_income: 100_000 + charitable_cash_donations: 1_000 + is_tax_unit_head: true + spouse: + age: 40 + is_tax_unit_spouse: true + tax_units: + tax_unit: + members: [head, spouse] + filing_status: JOINT + households: + household: + members: [head, spouse] + state_code: OR + output: + # Federal itemized deductions are 8,287.375 of Oregon withholding plus 1,000. + # That total of 9,287.375 falls below 25,100 + min(600, 1,000) = 25,700. + # 4,700 > 1,000, so claim the standard deduction and code 363: 4,700 + 600 = 5,300. + or_deductions: 5_300 + +- name: H7 Oregon standard deduction with a cash gift in 2025 + period: 2025 + absolute_error_margin: 0.1 + input: + people: + head: + age: 40 + employment_income: 75_000 + charitable_cash_donations: 1_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_code: OR + output: + # The 2025 federal non-itemizer deduction is zero. max(1,000, 2,835) = 2,835. + or_deductions: 2_835 + +- name: 2021 dependent's own gift stays off the parent's return + period: 2021 + input: + people: + head: {age: 40, employment_income: 50_000, is_tax_unit_head: true} + child: {age: 17, charitable_cash_donations: 300, is_tax_unit_dependent: true} + tax_units: + tax_unit: {members: [head, child], filing_status: SINGLE, or_agi: 50_000} + households: + household: {members: [head, child], state_code: OR} + output: + # The parent's eligible gift is 0. 50,000 - 2,350 = 47,650. + or_deductions: 2_350 + or_taxable_income: 47_650 + +- name: 2026 Oregon deduction uses the federal cash contribution ceiling + period: 2026 + input: + state_code: OR + filing_status: SINGLE + tax_unit_itemizes: false + adjusted_gross_income: 1_000 + charitable_cash_donations: 1_000 + or_agi: 10_000 + or_standard_deduction: 2_910 + output: + # min(1,000 gift, 1,000 cap, 1,000 x 60%) = 600. + # 2,910 + 600 = 3,510. 10,000 - 3,510 = 6,490. + or_deductions: 3_510 + or_taxable_income: 6_490 + +- name: 2021 Oregon spouses filing separately both itemize when one spouse itemizes + period: 2021 + input: + people: + donor: {age: 40, employment_income: 30_000, charitable_cash_donations: 300} + borrower: {age: 40, employment_income: 30_000, deductible_mortgage_interest: 7_000} + tax_units: + donor: {members: [donor], filing_status: SEPARATE, tax_unit_itemizes: false} + borrower: {members: [borrower], filing_status: SEPARATE, tax_unit_itemizes: false} + marital_units: + couple: {members: [donor, borrower]} + households: + household: {members: [donor, borrower], state_code: OR} + output: + # The borrower has 7,000 > 2,350, so both itemize: 300 and 7,000. + or_deductions: [300, 7_000] + +- name: 2021 Oregon spouses filing separately both itemize when code 363 would favor the standard option + period: 2021 + input: + people: + donor: {age: 40, employment_income: 30_000, charitable_cash_donations: 300} + borrower: {age: 40, employment_income: 30_000, deductible_mortgage_interest: 3_000} + tax_units: + donor: {members: [donor], filing_status: SEPARATE, tax_unit_itemizes: false} + borrower: {members: [borrower], filing_status: SEPARATE, tax_unit_itemizes: false} + marital_units: + couple: {members: [donor, borrower]} + households: + household: {members: [donor, borrower], state_code: OR} + output: + # The borrower has 3,000 > 2,350, so both itemize: 300 and 3,000. + or_deductions: [300, 3_000] + +- name: 2021 Oregon spouses filing separately both use the standard deduction when each qualifies + period: 2021 + input: + people: + donor: {age: 40, employment_income: 30_000, charitable_cash_donations: 300} + borrower: {age: 40, employment_income: 30_000, deductible_mortgage_interest: 2_000} + tax_units: + donor: {members: [donor], filing_status: SEPARATE, tax_unit_itemizes: false} + borrower: {members: [borrower], filing_status: SEPARATE, tax_unit_itemizes: false} + marital_units: + couple: {members: [donor, borrower]} + households: + household: {members: [donor, borrower], state_code: OR} + output: + # 2,350 exceeds both 300 and 2,000. The donor also claims code 363: 2,350 + 300 = 2,650. + or_deductions: [2_650, 2_350] + +- name: 2021 separate filer with no Oregon standard deduction gets no code 363 subtraction + period: 2021 + input: + state_code: OR + filing_status: SEPARATE + or_standard_deduction: 0 + or_itemized_deductions: 0 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 300 + output: + # The only available deduction is the supplied itemized amount of 0. + or_deductions: 0 + +- name: Negative direct override cannot reduce the Oregon standard deduction + period: 2021 + input: + state_code: OR + or_standard_deduction: 2_350 + or_itemized_deductions: 0 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: -100 + output: + # 2,350 + max(0, -100) = 2,350. + or_deductions: 2_350 + +- name: Zero qualifying charity for a negative raw cash gift + period: 2021 + input: + state_code: OR + tax_unit_itemizes: false + charitable_cash_donations: -100 + output: + # Eligible cash is max(0, -100). The Oregon deduction is 2,350 + 0. + charitable_deduction_for_non_itemizers: 0 + or_deductions: 2_350 + +- name: 2026 split gifts reach the joint cap once + period: 2026 + input: + people: + head: {age: 40, employment_income: 150_000, charitable_cash_donations: 1_200, is_tax_unit_head: true} + spouse: {age: 40, charitable_cash_donations: 900, is_tax_unit_spouse: true} + tax_units: + tax_unit: {members: [head, spouse], filing_status: JOINT} + households: + household: {members: [head, spouse], state_code: OR} + output: + # min(1,200 + 900, 2,000, 150,000 x 60%) = 2,000. 5,820 + 2,000 = 7,820. + charitable_deduction_for_non_itemizers: 2_000 + or_deductions: 7_820 + +- name: Surviving spouse gets only the non-joint cap in 2021 + period: 2021 + input: + state_code: OR + filing_status: SURVIVING_SPOUSE + employment_income: 50_000 + charitable_cash_donations: 600 + output: + # min(600, 300) = 300. 4,700 + 300 = 5,000. + charitable_deduction_for_non_itemizers: 300 + or_deductions: 5_000 + +- name: Head of household gets only the non-joint cap in 2021 + period: 2021 + input: + state_code: OR + filing_status: HEAD_OF_HOUSEHOLD + employment_income: 50_000 + charitable_cash_donations: 600 + output: + # min(600, 300) = 300. 3,780 + 300 = 4,080. + charitable_deduction_for_non_itemizers: 300 + or_deductions: 4_080 + +- name: Separate filer eligible for both standard deductions gets the non-joint cap + period: 2021 + input: + state_code: OR + filing_status: SEPARATE + employment_income: 50_000 + charitable_cash_donations: 600 + output: + # min(600, 300) = 300. 2,350 + 300 = 2,650. + charitable_deduction_for_non_itemizers: 300 + or_deductions: 2_650 + +- name: Negative Oregon adjusted gross income leaves no taxable income + period: 2026 + input: + state_code: OR + or_agi: -100 + or_standard_deduction: 2_910 + or_itemized_deductions: 0 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 1_000 + output: + # max(0, -100 - (2,910 + 1,000)) = 0. + or_taxable_income: 0 + +- name: A federal non-itemizer dollar cap reform reaches Oregon + period: 2026 + input: + state_code: OR + filing_status: SINGLE + employment_income: 50_000 + charitable_cash_donations: 1_000 + gov.irs.deductions.itemized.charity.non_itemizers_amount.SINGLE: 400 + output: + # min(1,000, 400, 50,000 x 60%) = 400. 2,910 + 400 = 3,310. + charitable_deduction_for_non_itemizers: 400 + or_deductions: 3_310 + +- name: The 2020 federal gift reduces Oregon AGI without a second deduction + period: 2020 + input: + state_code: OR + filing_status: SINGLE + employment_income: 50_000 + charitable_cash_donations: 400 + or_federal_tax_liability_subtraction: 0 + tax_unit_itemizes: false + output: + # 50,000 - min(400, 300) = 49,700. 49,700 - 2,315 = 47,385. + or_agi: 49_700 + charitable_deduction_for_non_itemizers: 0 + or_deductions: 2_315 + or_taxable_income: 47_385 + +- name: 2021 Oregon compares deduction lines before code 363 + period: 2021 + input: + state_code: OR + filing_status: SINGLE + tax_unit_itemizes: false + or_agi: 20_000 + or_standard_deduction: 2_350 + or_itemized_deductions: 2_500 + charitable_deduction_for_non_itemizers: 300 + output: + # 2,500 > 2,350, so itemize and leave code 363 off the return. + or_deductions: 2_500 + +- name: 2020 Oregon ignores a below-the-line charitable deduction override + period: 2020 + input: + state_code: OR + filing_status: SINGLE + employment_income: 50_000 + charitable_cash_donations: 400 + or_federal_tax_liability_subtraction: 0 + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 300 + output: + # 50,000 - min(400 gift, 300 above-the-line cap) = 49,700. + or_agi: 49_700 + # 49,700 - 2,315 Oregon standard deduction = 47,385. + or_taxable_income: 47_385 + +- name: 2025 Oregon ignores a non-itemizer charitable deduction override + period: 2025 + input: + state_code: OR + filing_status: SINGLE + tax_unit_itemizes: false + charitable_deduction_for_non_itemizers: 300 + output: + # 2,835 Oregon standard deduction + 0 section 170(p) deduction = 2,835. + or_deductions: 2_835 diff --git a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.py b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.py index a97dabd8e5d..4320131b3dc 100644 --- a/policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.py +++ b/policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.py @@ -14,15 +14,50 @@ class charitable_deduction_for_non_itemizers(Variable): ) definition_period = YEAR reference = ( - "https://www.law.cornell.edu/uscode/text/26/170#p", - "https://www.irs.gov/newsroom/expanded-tax-benefits-help-individuals-and-businesses-give-to-charity-during-2021-deductions-up-to-600-available-for-cash-donations-by-non-itemizers", + "https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapB-partVI-sec170.htm", + "https://www.irs.gov/pub/irs-prior/i1040gi--2021.pdf#page=32", + "https://www.govinfo.gov/content/pkg/PLAW-119publ21/pdf/PLAW-119publ21.pdf#page=165", ) def formula(tax_unit, period, parameters): - p = parameters(period).gov.irs.deductions.itemized.charity - # § 170(p) only allows cash contributions to § 170(b)(1)(A) organizations. - # Known limitation: gifts to 509(a)(3) supporting orgs and donor-advised - # funds cannot be separated with current inputs. - cash_50 = add(tax_unit, period, ["resolved_charitable_cash_donations_50_pct"]) - filing_status = tax_unit("filing_status", period) - return min_(p.non_itemizers_amount[filing_status], cash_50) + return non_itemizer_charitable_deduction( + tax_unit, period, parameters, "positive_agi" + ) + + +def non_itemizer_charitable_deduction(tax_unit, period, parameters, agi_variable): + p = parameters(period).gov.irs.deductions.itemized.charity + filing_status = tax_unit("filing_status", period) + dollar_cap = p.non_itemizers_amount[filing_status] + if not dollar_cap.any(): + return dollar_cap + + person = tax_unit.members + head = person("is_tax_unit_head", period) + joint = filing_status == filing_status.possible_values.JOINT + joint_spouse = tax_unit.project(joint) & person("is_tax_unit_spouse", period) + dependent = person("is_tax_unit_dependent", period) + one_person = tax_unit.nb_persons() == 1 + eligible = ((head | joint_spouse) & ~dependent) | tax_unit.project(one_person) + missing_head = ~tax_unit.any(head) & ~one_person + if missing_head.any(): + # Adult-based role inference can leave a minor filer without a head. + # Rank the oldest available member, excluding any supplied dependents. + candidates = tax_unit.project(missing_head) & ~joint_spouse + simulation = person.simulation + holder = simulation.get_holder("is_tax_unit_dependent") + if not holder.is_derived(period, simulation.branch_name): + candidates &= ~dependent + eligible |= person.get_rank(tax_unit, -person("age", period), candidates) == 0 + + # Section 170(p) covers current-year cash gifts to section 170(b)(1)(A) + # organizations. The inputs cannot distinguish supporting organizations + # or donor-advised funds, which the statute excludes. + cash = person("resolved_charitable_cash_donations_50_pct", period) + eligible_cash = tax_unit.sum(where(eligible, cash, 0)) + # Candidate: us:2021-non-itemizer-charity-cash-ceiling + # Candidate: us:non-itemizer-charity-cash-ceiling + # The 2021 rate assumes the temporary election for qualified cash. + # Section 170(p) excludes the itemized floor and carryovers. + contribution_base = max_(0, tax_unit(agi_variable, period)) + return min_(min_(dollar_cap, eligible_cash), p.ceiling.all * contribution_base) diff --git a/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_deductions.py b/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_deductions.py index 0ea29b42af9..6a4ecf3e24d 100644 --- a/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_deductions.py +++ b/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_deductions.py @@ -1,4 +1,7 @@ from policyengine_us.model_api import * +from policyengine_us.variables.gov.irs.income.taxable_income.deductions.itemizing.charitable_deduction_for_non_itemizers import ( + non_itemizer_charitable_deduction, +) class hi_deductions(Variable): @@ -8,11 +11,13 @@ class hi_deductions(Variable): unit = USD reference = ( "https://data.capitol.hawaii.gov/sessions/session2026/bills/HB2329_CD1_.pdf#page=1", + # PDF pages 2-3: section 170 conformity from tax year 2026. "https://files.hawaii.gov/tax/news/announce/ann26-06.pdf#page=2", + "https://files.hawaii.gov/tax/forms/2021/n11ins.pdf#page=20", "https://files.hawaii.gov/tax/legal/hrs/hrs_235.pdf#page=11", # PDF pages 15 (itemized deduction), 20 (standard deduction) "https://files.hawaii.gov/tax/forms/2022/n11ins.pdf#page=15", - # PDF pages 15, 20 + # PDF pages 15, 17-18 (Hawaii AGI limit), 20 "https://files.hawaii.gov/tax/forms/2025/n11ins.pdf#page=15", ) definition_period = YEAR @@ -22,6 +27,8 @@ def formula(tax_unit, period, parameters): itemizes = tax_unit("hi_itemizes_effective", period) itemized = tax_unit("hi_itemized_deductions", period) standard = tax_unit("hi_standard_deduction", period) - nonitemizer_charity = tax_unit("charitable_deduction_for_non_itemizers", period) + nonitemizer_charity = non_itemizer_charitable_deduction( + tax_unit, period, parameters, "hi_agi" + ) tips = tax_unit("hi_tip_income_deduction", period) return where(itemizes, itemized, standard + nonitemizer_charity) + tips diff --git a/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_itemizes.py b/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_itemizes.py index 272773a66f4..ac4f4fdd25e 100644 --- a/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_itemizes.py +++ b/policyengine_us/variables/gov/states/hi/tax/income/deductions/hi_itemizes.py @@ -1,4 +1,7 @@ from policyengine_us.model_api import * +from policyengine_us.variables.gov.irs.income.taxable_income.deductions.itemizing.charitable_deduction_for_non_itemizers import ( + non_itemizer_charitable_deduction, +) class hi_itemizes(Variable): @@ -22,5 +25,7 @@ def formula(tax_unit, period, parameters): eligible = tax_unit("hi_itemized_deductions_eligible", period) itemized = tax_unit("hi_itemized_deductions", period) standard = tax_unit("hi_standard_deduction", period) - nonitemizer_charity = tax_unit("charitable_deduction_for_non_itemizers", period) + nonitemizer_charity = non_itemizer_charitable_deduction( + tax_unit, period, parameters, "hi_agi" + ) return required | (eligible & (itemized > standard + nonitemizer_charity)) diff --git a/policyengine_us/variables/gov/states/or/tax/income/deductions/or_deductions.py b/policyengine_us/variables/gov/states/or/tax/income/deductions/or_deductions.py index 998e5a01a26..7aca58399d9 100644 --- a/policyengine_us/variables/gov/states/or/tax/income/deductions/or_deductions.py +++ b/policyengine_us/variables/gov/states/or/tax/income/deductions/or_deductions.py @@ -8,13 +8,69 @@ class or_deductions(Variable): unit = USD definition_period = YEAR reference = ( - "https://www.oregonlegislature.gov/bills_laws/ors/ors316.html", # 316.695 (1)(c) + # ORS 316.048 and 316.695(1). + "https://www.oregonlegislature.gov/bills_laws/ors/ors316.html", "https://www.oregon.gov/dor/forms/FormsPubs/form-or-40_101-040_2021.pdf#page=3", + # PDF pages 17, 70, 95: separate filers, code 363, and deduction election. + "https://www.oregon.gov/dor/forms/FormsPubs/publication-or-17_101-431_2021.pdf#page=17", + # 26 U.S.C. 63(b)(4) and 170(p). + "https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapB-partI-sec63.htm", + "https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapB-partVI-sec170.htm", + # P.L. 119-21, section 70424. + "https://www.govinfo.gov/content/pkg/PLAW-119publ21/html/PLAW-119publ21.htm", ) defined_for = StateCode.OR def formula(tax_unit, period, parameters): - return max_( - tax_unit("or_itemized_deductions", period), - tax_unit("or_standard_deduction", period), + standard = tax_unit("or_standard_deduction", period) + itemized = tax_unit("or_itemized_deductions", period) + year = period.start.year + code_363_applies = year == 2021 + standard_option = standard + if code_363_applies or year >= 2026: + itemizes_federally = tax_unit("tax_unit_itemizes", period) + charity = max_( + 0, tax_unit("charitable_deduction_for_non_itemizers", period) + ) + standard_option = standard + where( + ~itemizes_federally & (standard > 0), charity, 0 + ) + + # OR-17 p. 95 compares the deduction lines. Code 363 is a separate + # subtraction available when the 2021 filer takes the standard deduction. + if code_363_applies: + larger_deduction = where(standard > itemized, standard_option, itemized) + else: + larger_deduction = max_(itemized, standard_option) + + filing_status = tax_unit("filing_status", period) + separate = (filing_status == filing_status.possible_values.SEPARATE) & ( + tax_unit.household("state_code", period) == StateCode.OR + ) + if not separate.any(): + return larger_deduction + + # OR-17 pp. 17 and 95 bar the standard deduction when the spouse + # itemizes in Oregon. + person = tax_unit.members + separate_head = person("is_tax_unit_head", period) & tax_unit.project(separate) + marital_unit = person.marital_unit + paired = separate_head & (marital_unit.nb_persons() == 2) + paired = paired & (marital_unit.sum(separate_head) == 2) + standard_unavailable = paired & tax_unit.project(standard <= 0) + if code_363_applies: + spouse_itemizes = paired & tax_unit.project(itemized >= standard) + pair_itemizes = marital_unit.any(spouse_itemizes | standard_unavailable) + else: + # Compare the combined deductions under each common election. + gain_from_itemizing = where( + paired, tax_unit.project(itemized - standard_option), 0 + ) + pair_itemizes = (marital_unit.sum(gain_from_itemizing) > 0) | ( + marital_unit.any(standard_unavailable) + ) + return where( + tax_unit.any(paired), + where(tax_unit.any(paired & pair_itemizes), itemized, standard_option), + larger_deduction, ) diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 0fcf676e342..6cd12116547 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -16590,6 +16590,55 @@ candidates: prs: - https://github.com/PolicyEngine/policyengine-us/pull/10186 state: ruled +- id: us:2021-non-itemizer-charity-cash-ceiling + program: income-tax + years: + from: 2021 + to: 2021 + type: tax + question: Does the 2021 federal non-itemizer charitable deduction apply a contribution-base ceiling? + sources: + - kind: statute + citation: 26 U.S.C. 170(b)(1)(G) and (p), and the temporary-limits note for CARES Act section 2205 + url: https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapB-partVI-sec170.htm + - kind: instructions + citation: 2021 Instructions for Form 1040, line 12b, PDF page 32 + url: https://www.irs.gov/pub/irs-prior/i1040gi--2021.pdf#page=32 + readings: + statute: Section 170(p) retains the cash contribution-base ceiling and excludes carryovers. The 2021 temporary election for qualified cash gifts permits a ceiling of 100 percent of the contribution base. + other: The line 12b instructions direct non-itemizers to enter qualifying cash gifts subject to the dollar cap and omit the contribution-base ceiling. + example: A single non-itemizer with a zero contribution base and a qualifying $300 cash gift deducts zero under the statute. The instructions' calculation gives $300. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/11313 + state: ruled +- id: us:non-itemizer-charity-cash-ceiling + program: income-tax + years: + from: 2026 + type: tax + question: Does the federal non-itemizer deduction for cash gifts also apply the cash contribution ceiling? + sources: + - kind: statute + citation: Pub. L. 119-21, sections 70424 and 70425, 139 Stat. 235–237 + url: https://www.govinfo.gov/content/pkg/PLAW-119publ21/pdf/PLAW-119publ21.pdf#page=165 + - kind: instructions + citation: Draft 2026 Instructions for Form 1040, line 12f, PDF page 38 + url: https://www.irs.gov/pub/irs-dft/i1040gi--dft.pdf#page=38 + readings: + statute: Section 170(p) limits qualifying cash gifts to the lesser of the dollar cap and the section 170(b)(1)(G)(i) ceiling. It excludes the itemized floor and carryover rules. + other: The draft line 12f instructions direct filers to enter their total qualifying cash gifts subject to the dollar cap and omit the contribution-base limit. + example: A single non-itemizer with a $1,000 contribution base and a $1,000 qualifying cash gift deducts $600 under the statute. The draft instructions' calculation gives $1,000. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction_for_non_itemizers.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/11313 + state: ruled - id: us:claim-of-right-same-class-aggregation program: income-tax years: diff --git a/source_conflicts/sources/us/i1040-draft-instructions-2026-p38.txt b/source_conflicts/sources/us/i1040-draft-instructions-2026-p38.txt new file mode 100644 index 00000000000..8855dc8f935 --- /dev/null +++ b/source_conflicts/sources/us/i1040-draft-instructions-2026-p38.txt @@ -0,0 +1,6 @@ +Source: https://www.irs.gov/pub/irs-dft/i1040gi--dft.pdf#page=38 +Retrieved: 2026-11-30 +Source PDF SHA-256: d25f70df6575fd1347d9b220a2a8e70d7c49bf20b8428179456d9ecce5219f3f +Extraction: Nov. 24, 2026 draft, PDF page 38, line 12f excerpt. Line breaks and line-end hyphenation normalized. + +Enter the total amount of your contributions on line 12f. Don’t enter more than $1,000 ($2,000 if married filing jointly). diff --git a/source_conflicts/sources/us/i1040-instructions-2021-p32.txt b/source_conflicts/sources/us/i1040-instructions-2021-p32.txt new file mode 100644 index 00000000000..c840f8ce1f8 --- /dev/null +++ b/source_conflicts/sources/us/i1040-instructions-2021-p32.txt @@ -0,0 +1,6 @@ +Source: https://www.irs.gov/pub/irs-prior/i1040gi--2021.pdf#page=32 +Retrieved: 2026-11-30 +Source PDF SHA-256: 7337e61fe50cd309c260817d23468cd557426c7e5f15cdbdc291f6d2c7c50d90 +Extraction: PDF page 32, line 12b excerpt. Line breaks and line-end hyphenation normalized. + +Enter the total amount of your contributions on line 12b. Don't enter more than $300 ($600 if married filing jointly).