Pennsylvania taxes an early 401(k) withdrawal only on the amount that exceeds your own after-tax contributions to the plan, and it taxes that excess at the flat 3.07% personal income tax rate. The state has no separate early-withdrawal penalty, and it does not use the federal age-59½ trigger. Whether you owe anything to Harrisburg comes down to one calculation: how much of your withdrawal sits above your cost basis in the plan.
The Cost Recovery Method Puts Your Contributions First
Pennsylvania uses what the Department of Revenue calls the cost recovery method. Every dollar you contributed to your 401(k) out of your own pay is treated as coming out of the plan first, tax-free, before any taxable amount is distributed.1Pennsylvania Department of Revenue. PA Personal Income Tax Guide – Gross Compensation Only after your cumulative withdrawals pass the total of your own contributions does the 3.07% rate start applying to the rest.2Commonwealth of Pennsylvania. Department of Revenue – Tax Rates
Your cost basis is the total of your personal contributions. Employer matching contributions do not count. Investment earnings do not count. Only the money you put in yourself.
A quick example. You contributed $50,000 of your own pay into a traditional 401(k) over the years. Your employer kicked in another $25,000, and the account has grown to $120,000. If you take a $40,000 early withdrawal, Pennsylvania taxes none of it, because the entire withdrawal falls inside your $50,000 basis. If you take $65,000 instead, the first $50,000 comes out tax-free, and the remaining $15,000 is taxable at 3.07%, which works out to roughly $460 in state tax.
Keep documentation of what you contributed. Old W-2s showing your annual plan contributions, or a basis statement from your plan administrator, are what you want on hand. If the Department of Revenue questions the exclusion in an audit and you cannot show your basis, you may lose the benefit of it.
Does It Matter If You’re Still Working There?
Yes, but less than people often assume. The cost recovery math is the same either way; what changes is whether anything above your basis can also be exempt.
If you take a hardship withdrawal or any other in-service distribution while still employed by the plan sponsor, anything above your cost basis is taxable compensation to Pennsylvania.1Pennsylvania Department of Revenue. PA Personal Income Tax Guide – Gross Compensation There is no path to a full exemption while you remain on the payroll.
After you separate from service, two outcomes are possible. If you have met the plan’s normal retirement age or completed the years-of-service requirement the plan sets, the distribution is fully exempt from Pennsylvania tax, regardless of amount.1Pennsylvania Department of Revenue. PA Personal Income Tax Guide – Gross Compensation If you left before hitting those marks (which is the usual case for an early withdrawal), the distribution is still taxable to the extent it exceeds your cost basis, same as the in-service rule.
A Rollover Avoids PA Tax Entirely
If you do not actually need the cash, a rollover sidesteps the question. Under Pennsylvania law, amounts rolled over from an eligible retirement plan into another qualifying plan are not taxable, provided the transferred amount is also excluded from income federally.1Pennsylvania Department of Revenue. PA Personal Income Tax Guide – Gross Compensation A direct rollover, where the plan sends the money straight to the receiving IRA or 401(k), is the clean route and triggers no withholding.
An indirect rollover is riskier. The check comes to you, and the plan administrator is required to withhold 20% for federal tax.3Internal Revenue Service. 401(k) Resource Guide – Plan Participants – General Distribution Rules You have 60 days to deposit the full original amount, including the withheld 20%, into the new account from your own funds. Miss the deadline and the money becomes a taxable distribution at both the federal and state levels.
Roth 401(k) Withdrawals
Roth 401(k) contributions were already made with after-tax dollars, so every dollar you contributed is already part of your Pennsylvania cost basis. Under the cost recovery method, those contributions come out before any earnings, and a modest early withdrawal from a Roth 401(k) often produces no PA tax at all. The earnings portion, if your withdrawal reaches that far, is taxable because it sits above basis.
Federal Tax and the 10% Penalty Still Apply
Pennsylvania’s rules only govern Pennsylvania’s tax. The IRS treats a distribution from a traditional pre-tax 401(k) as ordinary income at your marginal rate, and it adds a 10% additional tax on distributions taken before age 59½.4Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions Several exceptions soften that penalty, including separation from service in or after the year you turn 55 (age 50 for qualifying public safety employees),5Internal Revenue Service. Topic No. 558, Additional Tax on Early Distributions from Retirement Plans Other Than IRAs substantially equal periodic payments,6Internal Revenue Service. Substantially Equal Periodic Payments total and permanent disability, death, and large unreimbursed medical expenses.
Pennsylvania has no equivalent 10% penalty. The state does not care about your age or your federal exception. It only cares about whether the dollars you took out exceed your contributions.
How to Report the Withdrawal on Your PA-40
Your plan administrator sends you a federal Form 1099-R after any distribution. Box 1 shows the gross amount. Box 7 shows the distribution code: code 1 is an early distribution with no known exception, code 2 is an early distribution with an exception, and so on.7Internal Revenue Service. About Form 1099-R, Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc.
Report the distribution on PA-40 Schedule W-2S, Section II.8Pennsylvania Department of Revenue. How Does a Taxpayer Report Distributions from a Taxable Annuity or Retirement Plan The relevant columns are:9Pennsylvania Department of Revenue. PA Schedule W-2S Wage Statement Summary
- Column B, payment type: enter “I” for an employer-sponsored retirement, pension, or qualified deferred compensation plan.
- Column D, distribution code: copy the code from Box 7 of the 1099-R.
- Column E, total federal amount: enter the gross distribution from Box 1.
- Column F, adjusted plan basis: for early-withdrawal codes (1, 2, J, L, S, or U), enter your contributions minus any prior nontaxable distributions you’ve already received.
- Column G, PA compensation: subtract Column F from Column E, but not less than zero. That figure is your PA-taxable amount.
When basis equals or exceeds the distribution, Column G is zero and the withdrawal produces no PA tax. Attach a copy of the 1099-R to your PA-40.
Withholding, Estimated Payments, and Local Tax
Most plan administrators do not automatically withhold Pennsylvania tax from a distribution, even though federal withholding of 20% is mandatory on an eligible rollover distribution paid directly to you.3Internal Revenue Service. 401(k) Resource Guide – Plan Participants – General Distribution Rules If your withdrawal produces PA tax that your other withholding will not cover, you may need to make an estimated payment on Form PA-40ES. For the 2026 tax year, estimated payments are required if you reasonably expect to owe at least $430 after withholding and credits, which corresponds to roughly $14,000 of income not subject to employer withholding.10Pennsylvania Department of Revenue. 2026 Instructions for Estimating PA Personal Income Tax Underpayments accrue interest.
Do not forget local earned income tax. Pennsylvania municipalities levy their own EIT, generally in the range of 1% to 3.1%, and the taxable portion of your distribution that lands on Line 1 of the PA-40 is typically subject to it as well. If your withdrawal is entirely inside your cost basis and produces zero taxable PA compensation, the local tax should also be zero.