Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/pa-income-tax-alimony-401k.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pennsylvania taxable income no longer includes alimony, and it now counts employees' traditional 401(k) and 403(b) contributions as taxable compensation, as the PA-40 instructions require.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ values:
- us_govt_interest
- salt_refund_income
- military_retirement_income
# Alimony is income not taxable for PA PIT purposes. The list subtracts
# the part federal gross income holds: alimony under a divorce or
# separation instrument executed before 2019.
- taxable_alimony_income
# Sick pay and disability benefits other than regular wages, including
# third-party insurer payments, and disability distributions (61 Pa.
# Code 101.6(c)(1)). Regular sick leave pay is in employment income.
Expand Down Expand Up @@ -38,5 +42,7 @@ metadata:
# income, so this list subtracts the part of strike benefits it holds.
- title: Pennsylvania Personal Income Tax Guide, Gross Compensation - income items never taxable as PA compensation
href: https://www.pa.gov/agencies/revenue/forms-and-publications/pa-personal-income-tax-guide/gross-compensation.html#IncomeItemsNeverTaxablePA
- title: 2025 Pennsylvania PIT Return Instructions (PA-40 IN), income not taxable for PA PIT purposes (alimony)
href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/formsforindividuals/pit/documents/2025/2025_pa-40in.pdf#page=8
- title: 2025 PA-40 Schedule T - Gambling and Lottery Winnings
href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/formsforindividuals/pit/documents/2025/2025_pa-40t.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
description: Pennsylvania taxes these employee elective deferrals as compensation, though federal wages leave them out.
values:
2021-01-01:
# An employee's own contributions to an employer retirement plan,
# including salary reduction contributions, are not excludable from
# Pennsylvania compensation. No input holds 457(b) or Thrift Savings
# Plan deferrals, so none is listed.
- traditional_401k_contributions
- traditional_403b_contributions
metadata:
unit: list
period: year
label: PA taxable elective deferral sources
reference:
- title: 2025 Pennsylvania PIT Return Instructions (PA-40 IN), Line 1a, contributions to an employer-sponsored retirement plan are PA-taxable compensation
href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/formsforindividuals/pit/documents/2025/2025_pa-40in.pdf#page=12
- title: 61 Pa. Code 101.6(c)(8)(ii)(B), employee contributions to a plan, including by payroll deduction or salary reduction, are not excludable
href: https://www.pacodeandbulletin.gov/Display/pacode?file=/secure/pacode/data/061/chapter101/s101.6.html
- title: Pennsylvania Personal Income Tax Guide, Gross Compensation (DSM-12 08-2025), employee contributions to 401(k) and 403(b) plans are taxable
href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_grosscompensation.pdf#page=51
Original file line number Diff line number Diff line change
Expand Up @@ -533,3 +533,44 @@
output:
pa_income_tax_before_forgiveness: 184.20
pa_tax_forgiveness_amount: 184.2

- name: "2025 joint return with one spouse who can be claimed as a dependent: the claimable head's 401(k) deferral counts in their share"
period: 2025
absolute_error_margin: 0.01
input:
people:
person_a:
age: 30
employment_income: 3000
traditional_401k_contributions: 1000
is_tax_unit_head: true
is_tax_unit_spouse: false
is_tax_unit_dependent: false
claimed_as_dependent_on_another_return: true
person_b:
age: 30
employment_income: 3000
traditional_401k_contributions: 0
is_tax_unit_head: false
is_tax_unit_spouse: true
is_tax_unit_dependent: false
claimed_as_dependent_on_another_return: false
tax_units:
tax_unit:
members: [person_a, person_b]
filing_status: JOINT
households:
household:
members: [person_a, person_b]
state_code: PA
output:
# Each spouse's PA taxable income is 3,000, since PA taxes the head's
# 1,000 deferral as compensation (2025 PA-40 IN, page 12). Only the
# spouse can claim forgiveness: 3,000 / 6,000 = 0.5. Leaving the
# deferral out would give 3,000 / (2,000 + 3,000) = 0.6.
pa_tax_forgiveness_eligible_share: 0.5
# Tax: 6,000 x 3.07% = 184.20. Eligibility income 6,000 is under the
# married base of 2 x 6,500 = 13,000, so the rate is 100%:
# 184.20 x 1 x 0.5 = 92.10.
pa_income_tax_before_forgiveness: 184.2
pa_tax_forgiveness_amount: 92.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# PA total taxable income starts from federal gross income, which leaves out a
# tax unit dependent's income, and subtracts the amounts in it that Pennsylvania
# does not tax. A dependent files their own PA return (2025 PA-40 IN, page 4,
# "Minors"), so only the head's and spouse's nontaxable amounts are subtracted.
# tax unit dependent's income, adds the elective deferrals Pennsylvania taxes as
# compensation, and subtracts the amounts in it that Pennsylvania does not tax.
# A dependent files their own PA return (2025 PA-40 IN, page 4, "Minors"), so
# only the head's and spouse's amounts are added and subtracted.

- name: A dependent's retirement income does not reduce the filer's PA taxable income.
period: 2025
Expand Down Expand Up @@ -154,3 +155,265 @@
output:
pa_gambling_loss_offset: 0
pa_total_taxable_income: 40_000

# Alimony. The 2025 PA-40 instructions (page 8) list alimony among the income
# not taxable for PA PIT purposes. Federal gross income holds alimony under a
# divorce or separation instrument executed before 2019, and Pennsylvania
# takes that part back out.

- name: Alimony from a pre-2019 divorce is not PA taxable income and counts once in eligibility income.
period: 2025
absolute_error_margin: 0.01
input:
state_code: PA
employment_income: 5_000
alimony_income: 3_000
divorce_year: 2010
output:
# Schedule SP line 1, PA taxable income (PA-40 line 9): 5,000, since
# alimony is not PA-taxable. Schedule SP line 3 adds the 3,000 of
# alimony: 5,000 + 3,000 = 8,000. 72 P.S. 7301(o.2) counts all moneys
# received, and Schedule SP Section III line 3 is "Alimony" (2025 PA-40
# IN, page 38).
pa_total_taxable_income: 5_000
pa_eligibility_income: 8_000

- name: Alimony under a 2018 divorce comes out of PA taxable income.
period: 2025
absolute_error_margin: 0.01
input:
age: 45
state_code: PA
employment_income: 40_000
alimony_income: 12_000
# The last divorce year for which the recipient pays federal tax on
# alimony.
divorce_year: 2018
output:
taxable_alimony_income: 12_000
# 40,000 wages + 12,000 alimony.
irs_gross_income: 52_000
# 52,000 - 12,000 alimony = 40,000.
pa_total_taxable_income: 40_000
# 40,000 x 3.07%
pa_income_tax_before_forgiveness: 1_228

- name: Alimony under a 2019 divorce is in neither federal gross income nor PA taxable income.
period: 2025
absolute_error_margin: 0.01
input:
age: 45
state_code: PA
employment_income: 40_000
alimony_income: 12_000
divorce_year: 2019
output:
taxable_alimony_income: 0
irs_gross_income: 40_000
# Nothing to take out: 40,000.
pa_total_taxable_income: 40_000
# 40,000 x 3.07%
pa_income_tax_before_forgiveness: 1_228

# Elective deferrals. 2025 PA-40 instructions, Line 1a (page 12): "The
# contributions you make to your employer's sponsored retirement plan are
# PA-taxable compensation, even if your contributions are not taxable for
# federal purposes or included in the state wages shown on your W-2." 61 Pa.
# Code 101.6(c)(8)(ii)(B): contributions an employee makes "whether through
# payroll deduction, a salary reduction agreement or otherwise, are not
# excludable from his income." Federal wages (irs_employment_income) leave out
# traditional 401(k) and 403(b) deferrals, so Pennsylvania adds them back.

- name: A 401(k) contribution is PA-taxable compensation.
period: 2025
absolute_error_margin: 0.01
input:
state_code: PA
employment_income: 10_000
traditional_401k_contributions: 1_000
output:
# Federal wages are 10,000 - 1,000 = 9,000. PA-40 line 9 counts the
# 1,000 contribution as compensation: 10,000. Eligibility income starts
# from PA taxable income (Schedule SP line 1): 10,000.
irs_employment_income: 9_000
pa_taxable_elective_deferrals: 1_000
pa_total_taxable_income: 10_000
pa_eligibility_income: 10_000

- name: A traditional 401(k) deferral is taxed by Pennsylvania on a typical wage.
period: 2025
absolute_error_margin: 0.01
input:
age: 40
state_code: PA
employment_income: 60_000
traditional_401k_contributions: 6_000
output:
# 60,000 - 6,000 = 54,000 federal wages.
irs_gross_income: 54_000
pa_taxable_elective_deferrals: 6_000
# 54,000 + 6,000 = 60,000.
pa_total_taxable_income: 60_000
# 60,000 x 3.07%
pa_income_tax_before_forgiveness: 1_842

- name: Each spouse's traditional 401(k) and 403(b) deferrals are added back; a Roth 401(k) deferral is already in wages.
period: 2025
absolute_error_margin: 0.01
input:
people:
head:
age: 45
employment_income: 50_000
traditional_401k_contributions: 5_000
roth_401k_contributions: 2_000
traditional_403b_contributions: 0
spouse:
age: 43
employment_income: 40_000
traditional_401k_contributions: 0
roth_401k_contributions: 0
traditional_403b_contributions: 4_000
tax_units:
tax_unit:
members: [head, spouse]
filing_status: JOINT
marital_units:
marital_unit:
members: [head, spouse]
households:
household:
members: [head, spouse]
state_code: PA
output:
# Head: 50,000 - 5,000 traditional = 45,000 (the Roth 2,000 stays in).
# Spouse: 40,000 - 4,000 = 36,000.
irs_employment_income: [45_000, 36_000]
pa_taxable_elective_deferrals: [5_000, 4_000]
# 45,000 + 36,000 + 5,000 + 4,000 = 90,000.
pa_total_taxable_income: 90_000
# 90,000 x 3.07%
pa_income_tax_before_forgiveness: 2_763

- name: Pre-tax health insurance premiums stay out of PA compensation; the 401(k) deferral is added back.
period: 2025
absolute_error_margin: 0.01
input:
age: 40
state_code: PA
employment_income: 50_000
pre_tax_health_insurance_premiums: 3_000
traditional_401k_contributions: 2_000
output:
# 50,000 - 3,000 - 2,000 = 45,000 federal wages.
irs_employment_income: 45_000
# 72 P.S. 7301(d)(vi): compensation does not include payments made under
# a section 125 cafeteria plan for programs covering hospitalization or
# sickness. Only the 2,000 deferral comes back: 47,000.
pa_taxable_elective_deferrals: 2_000
pa_total_taxable_income: 47_000

- name: A deferral equal to the wages is added back in full.
period: 2025
absolute_error_margin: 0.01
input:
age: 40
state_code: PA
employment_income: 3_000
traditional_401k_contributions: 3_000
output:
# max(3,000 - 3,000, 0) = 0 federal wages; the full 3,000 comes back.
irs_employment_income: 0
pa_taxable_elective_deferrals: 3_000
pa_total_taxable_income: 3_000

- name: A deferral above the wages adds back no more than the wages.
period: 2025
absolute_error_margin: 0.01
input:
age: 40
state_code: PA
employment_income: 2_000
traditional_401k_contributions: 3_000
output:
# Federal wages are floored at 0, so they leave out only 2,000 of the
# 3,000 deferral. PA compensation: max(2,000 - (3,000 - 3,000), 0) =
# 2,000, so the add-back is 2,000 - 0 = 2,000.
irs_employment_income: 0
pa_taxable_elective_deferrals: 2_000
pa_total_taxable_income: 2_000

- name: A dependent's 401(k) deferral is not added to the filer's PA taxable income.
period: 2025
absolute_error_margin: 0.01
input:
people:
person1:
age: 45
employment_income: 50_000
traditional_401k_contributions: 0
is_tax_unit_dependent: false
person2:
age: 17
employment_income: 8_000
traditional_401k_contributions: 1_000
is_tax_unit_dependent: true
tax_units:
tax_unit:
members: [person1, person2]
marital_units:
marital_unit1:
members: [person1]
marital_unit2:
members: [person2]
households:
household:
members: [person1, person2]
state_code: PA
output:
# The dependent files their own PA return, and their wages are not in
# the filer's federal gross income, so neither is their deferral.
pa_taxable_elective_deferrals: [0, 1_000]
pa_total_taxable_income: 50_000
# 50,000 x 3.07%
pa_income_tax_before_forgiveness: 1_535

- name: Negative wages do not make the deferral add-back negative.
period: 2025
absolute_error_margin: 0.01
input:
age: 40
state_code: PA
employment_income: -1_000
taxable_interest_income: 5_000
output:
# Federal wages: max(-1,000 - 0, 0) = 0. PA compensation (PA-40 line 1a)
# is floored too: max(-1,000 - (0 - 0), 0) = 0. Add-back: 0 - 0 = 0.
irs_employment_income: 0
pa_taxable_elective_deferrals: 0
# 0 wages + 5,000 interest = 5,000.
irs_gross_income: 5_000
pa_total_taxable_income: 5_000
# 5,000 x 3.07%
pa_income_tax_before_forgiveness: 153.50

- name: Pre-tax premiums that push federal wages to zero limit the deferral add-back to PA compensation.
period: 2025
absolute_error_margin: 0.01
input:
age: 40
state_code: PA
employment_income: 10_000
traditional_401k_contributions: 8_000
pre_tax_health_insurance_premiums: 4_000
output:
# Federal wages: max(10,000 - 8,000 - 4,000, 0) = 0.
irs_employment_income: 0
# PA compensation keeps the 8,000 deferral (61 Pa. Code
# 101.6(c)(8)(ii)(B)) but leaves out the 4,000 of cafeteria-plan
# premiums (72 P.S. 7301(d)(vi)): max(10,000 - (12,000 - 8,000), 0) =
# 6,000. Add-back: 6,000 - 0 = 6,000, not the full 8,000 deferral.
pa_taxable_elective_deferrals: 6_000
pa_total_taxable_income: 6_000
# 6,000 x 3.07%
pa_income_tax_before_forgiveness: 184.20
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def formula(tax_unit, period, parameters):
filer = person("is_tax_unit_head_or_spouse", period)
eligible = person("pa_tax_forgiveness_eligible", period)
# Each filer's own Pennsylvania taxable income: federal gross income
# less the person-level amounts Pennsylvania does not tax.
# plus the elective deferrals Pennsylvania taxes, less the
# person-level amounts Pennsylvania does not tax.
sources = parameters(period).gov.states.pa.tax.income.nontaxable_income_sources
person_sources = [
source
Expand All @@ -43,7 +44,9 @@ def formula(tax_unit, period, parameters):
).entity.is_person
]
nontaxable = add(person, period, person_sources)
own = max_(0, person("irs_gross_income", period) - nontaxable) * filer
gross_income = person("irs_gross_income", period)
taxable_deferrals = person("pa_taxable_elective_deferrals", period)
own = max_(0, gross_income + taxable_deferrals - nontaxable) * filer
total = tax_unit.sum(own)
eligible_income = tax_unit.sum(own * eligible)
# With no taxable income there is no tax; split evenly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class pa_other_additions(Variable):
documentation = (
"Enter a positive amount for other income taxable in Pennsylvania under "
"one of the eight classes (lines 1c-8, total on line 9) that PolicyEngine "
"does not otherwise include, excluding gambling winnings, which "
"PolicyEngine already includes."
"does not otherwise include, excluding gambling winnings and traditional "
"401(k) and 403(b) contributions, which PolicyEngine already includes."
)
# PDF pages 8, 19-20
reference = "https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/formsforindividuals/pit/documents/2025/2025_pa-40in.pdf#page=8"
Loading
Loading