Do You Pay State Tax on 401(k) Contributions?

In most states, you do not pay state tax on 401k contributions to a traditional plan, because states generally start their income tax calculation from your federal taxable wages, and the IRS has already subtracted your traditional deferral from that figure. Pennsylvania and Massachusetts are the two significant exceptions: both tax those contributions in the year you earn the money. Roth 401k contributions, by contrast, are taxed by every state that has an income tax, because they’re made with after-tax dollars in the first place.

Why Traditional 401k Contributions Usually Escape State Tax

When you defer part of your paycheck into a traditional 401k, your employer leaves that amount out of Box 1 of your W-2. Federal law excludes those deferrals from gross income.1Office of the Law Revision Counsel. 26 U.S. Code 402 – Taxability of Beneficiary of Employees Trust Most states then use that reduced federal wage figure as the starting point for their own tax. The deferral carries through automatically.

Say you earn $60,000 and put $5,000 into a traditional 401k. Your state generally taxes you on $55,000, not $60,000. You don’t claim a separate state deduction and you won’t see a line item for the savings. It just happens through payroll. Depending on your state’s rates, that $5,000 deferral can save you anywhere from roughly $125 to over $650 in state income tax for the year.

Pennsylvania, Massachusetts, and Philadelphia

Two states break the pattern. Pennsylvania applies its flat 3.07% income tax to employee 401k contributions in the year they are made.2Commonwealth of Pennsylvania. Tax Rates On a $50,000 salary with a $5,000 deferral, Pennsylvania taxes the full $50,000. That’s an extra $153.50 in state tax compared with what you’d owe in a conforming state. Employer matching contributions are generally not taxed when made.

There is an offset on the retirement end. Pennsylvania does not tax 401k distributions, so the state collects its share once, at contribution, rather than at withdrawal. For a career spent contributing in Pennsylvania, that trade can work out well; the catch is record-keeping, since you’ll want to be able to show later which portion of the balance was already taxed by the state.

Massachusetts follows the same basic approach. It does not allow a pre-tax deduction for 401k contributions, so the money is in your state taxable income the year you earn it. When distributions come out in retirement, Massachusetts uses a cost-recovery rule: you don’t pay Massachusetts tax on the portion representing your previously taxed contributions, only on the investment growth.

City taxes can add another layer. Philadelphia imposes its Earnings Tax on 401k contributions; the city’s instructions are explicit that employee pension plan contributions, including 401k deferrals, are not deductible from gross compensation for Earnings Tax purposes.3City of Philadelphia Department of Revenue. 2025 Annual Reconciliation of Employee Earnings Tax Instructions A Philadelphia resident pays a 3.74% city wage tax on those contributions on top of the 3.07% state rate, for a combined state-and-local hit of roughly 6.81% on money going into the plan. Several cities in Ohio, Michigan, and other states also run local income taxes with their own rules, so if you live or work in one, ask payroll whether it follows the federal treatment.

Roth 401k Contributions Are Taxed Everywhere

Roth 401k contributions work in the opposite direction. You fund them with after-tax dollars, so the money is in your federal gross income and flows through to state taxable income as well.4Internal Revenue Service. Roth Account in Your Retirement Plan Put $5,000 into a Roth 401k on a $60,000 salary and your state still taxes the full $60,000.

The payoff arrives in retirement. Once you reach age 59½ and have held the account for at least five years, qualified withdrawals of contributions and earnings are tax-free at the federal level, and states that exempt qualified Roth distributions follow suit.4Internal Revenue Service. Roth Account in Your Retirement Plan Whether that trade is worth giving up today’s state deferral depends on where you expect to live and what bracket you expect to be in later.

States with No Income Tax

Nine states impose no personal income tax on wages, which makes the whole question moot at the state level:

  • Alaska
  • Florida
  • Nevada
  • New Hampshire
  • South Dakota
  • Tennessee
  • Texas
  • Washington
  • Wyoming

New Hampshire joined the group fully in 2025 when its Interest and Dividends Tax was repealed.5NH Department of Revenue Administration. Repeal of NH Interest and Dividends Tax Now in Effect If you live in one of these states, there is no state wage tax to defer with a traditional contribution and none to pay on a Roth contribution. The only tax questions on your 401k are federal.

How to Check Your Own W-2

Your W-2 will tell you exactly how your state treated your contributions. Three boxes matter.

  • Box 1 shows federal wages after the traditional 401k deferral is subtracted. Earn $60,000, defer $5,000, and Box 1 reads $55,000.6Internal Revenue Service. General Instructions for Forms W-2 and W-3 (2026)
  • Box 16 shows state wages. In a conforming state, this matches Box 1. If Box 16 is higher, your state is taxing your 401k contributions. A Pennsylvania worker in the example above would see $55,000 in Box 1 and $60,000 in Box 16.
  • Box 12 carries the contribution codes. Code D flags a traditional 401k deferral; code AA flags a designated Roth contribution.

If Box 16 doesn’t line up with what you’d expect from your state’s rules, call payroll before you file. Fixing an incorrect Box 16 after filing is far harder than catching it in advance, and a mismatch can prompt an automated notice from the state.

Moving Between States Changes the Math

If you contribute in a state that taxes 401k deferrals and later retire in one that taxes distributions, you can end up paying state tax on the same dollars twice unless you plan for it. Some states offer relief. Virginia allows a subtraction for distributions from a retirement plan to the extent the contributions were previously taxed by another state. Massachusetts uses a cost-recovery rule that shields distributions until the previously taxed contributions are fully returned. Not every state has this kind of rule.

Protect yourself with records. For each year you contributed, keep the W-2 and note which state you lived in and whether it taxed the deferral. If you later move and start withdrawals, that documentation is what a preparer will use to claim any available credit or subtraction in your new state.

2026 Contribution Limits Cap the Deferral

How much state tax you can defer is capped by how much the IRS lets you contribute. For 2026:

  • The base elective deferral limit is $24,500 for employees under 50.7Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
  • Workers 50 and older can add a standard catch-up of $8,000, for a total of $32,500.
  • Workers aged 60 through 63 can add an enhanced catch-up of $11,250 instead of $8,000, for a total of $35,750. This higher catch-up was created by SECURE 2.0.

The limits apply to the combined total of your traditional and Roth 401k contributions. In a conforming state with a 5% income tax, maxing out the base $24,500 as a traditional deferral saves $1,225 in state tax for that year on top of the federal savings. In Pennsylvania or Massachusetts, that same contribution saves you nothing at the state level in the current year, but the money grows in the account either way.