Pre-tax guide

Which states tax your 401(k) and HSA contributions (2026)

By Barron Hansen, Founder · Updated July 27, 2026

Pre-tax money never reaches the wage figure your state starts from. Your employer subtracts a 401(k) deferral, an HSA contribution or a health FSA reduction before Box 1 of your W-2 is written, and almost every jurisdiction that taxes wages begins its own arithmetic from that federal number or from federal taxable income. Nothing has to be legislated for the exclusion to carry across. It arrives with the starting point. What breaks the pattern is a state that writes its own definition of compensation instead. Pennsylvania and New Jersey both do, and between them they tax most of what a payroll system treats as pre-tax. The rest decouple on a single item each: California on health savings accounts, Massachusetts on the traditional IRA deduction, and Alabama and New York on the pension contributions public employees make under Section 414(h). No two of the exceptions work the same way, and the one that reaches the most ordinary paychecks is the HSA. The table below gives each state's rule, what it adds back, and what it still leaves alone.

Which states tax a pre-tax contribution?

Divergence is narrow and specific. 6 of the 42 jurisdictions that tax wages add at least one pre-tax item back into their own base, and no two of them add back the same set. Find your state below. If it is not listed, your contribution reduces state taxable wages the way it reduces federal ones.

StateTaxed when you contributeStill excluded
Alabama414(h) pension pickups401(k) deferrals, HSA contributions, health FSA, dependent-care FSA, pre-tax health premiums, commuter benefits, traditional IRA contributions
CaliforniaHSA contributions401(k) deferrals, 414(h) pension pickups, health FSA, dependent-care FSA, pre-tax health premiums, commuter benefits, traditional IRA contributions
Massachusettstraditional IRA contributions401(k) deferrals, 414(h) pension pickups, HSA contributions, health FSA, dependent-care FSA, pre-tax health premiums, commuter benefits
New Jersey414(h) pension pickups, HSA contributions, health FSA, dependent-care FSA, pre-tax health premiums, traditional IRA contributions401(k) deferrals, commuter benefits
New York414(h) pension pickups401(k) deferrals, HSA contributions, health FSA, dependent-care FSA, pre-tax health premiums, commuter benefits, traditional IRA contributions
Pennsylvania401(k) deferrals, 414(h) pension pickups, dependent-care FSA, traditional IRA contributionsHSA contributions, health FSA, pre-tax health premiums, commuter benefits

The two right-hand columns run across the 8 pre-tax items this calculator collects, and the estimate applies all six rules, for Alabama, California, Massachusetts, New Jersey, New York and Pennsylvania. One of those items is not a payroll line: nobody's employer withholds a traditional IRA contribution, so "taxed" in that column means the state refuses the federal deduction rather than more money leaving your check. Pennsylvania and New Jersey also tax 403(b), 457, SEP and SIMPLE contributions, which this calculator gathers into a single retirement line.

The other 36 wage-taxing jurisdictions are absent from the table, and 9 more tax no wages at all, so they have nothing to add back. For most of that first group the position rests on the structural rule below rather than on a plan-specific document from that state's revenue department, and we would rather say so than imply a separate confirmation for every state. Which ones those are is published in full: our tax data sources and gap ledger.

Why most states follow the federal exclusion

Start with where a state return begins. Thirty-six states and the District of Columbia compute income tax from federal adjusted gross income or from federal taxable income, according to the Tax Policy Center's survey of state conformity. A 401(k) deferral, a 403(b) contribution, a payroll HSA deduction and a cafeteria-plan salary reduction have all been taken out of those federal figures before the state ever sees them. Conformity is passive here: the state inherits the exclusion by inheriting the number.

Five states build their own base from scratch, and the same survey names them: Alabama, Arkansas, Mississippi, New Jersey and Pennsylvania. Two of the five are where the broad divergences live. Arkansas and Mississippi write their own definitions and still exclude deferrals, which is a useful reminder that an own-base state is not automatically a strict one. Everything else in the table comes from a federal-start state that decoupled from one specific provision, and each of those is narrow by design.

Pennsylvania taxes the contribution itself

Pennsylvania is the strictest state in the country on the way in. Its Personal Income Tax guide says that a direct employee contribution to a qualified employer plan, naming 401(a) and 401(k) plans, 403(a) and 403(b) annuities, SEP and SIMPLE accounts and 457(b) arrangements, is subject to Pennsylvania income tax and to employer withholding at the time of the contribution. Defer part of your pay into a 401(k) here and you save federal tax on it and no state tax at all. Health savings accounts are the one place Pennsylvania follows the federal rules, so HSA and health FSA money is left alone.

That produces the trap this guide exists to name. Pennsylvania does not tax retirement distributions, so it appears near the top of every list of retirement-friendly states, and readers carry the impression backwards into their paycheck math. The exemption is real, and it lands at the other end of the timeline. On the contribution side Pennsylvania is the harshest state there is, which is the opposite of the way that reputation usually gets read.

One more consequence follows from the same rule. Act 32 municipal earned income tax rides the same pre-deferral compensation figure the state uses, so a deferral does not shrink the local bill either. Philadelphia goes further than the state it sits in. Its Department of Revenue names Section 125 benefits, 401(k) deferrals, HSAs and FSAs as employee contributions that stay inside the Wage Tax base, so the HSA and health FSA money Pennsylvania leaves alone is taxed by the city, and so is a pre-tax medical premium. Section 132 commuter benefits are not on that list. A Philadelphia resident filling a 401(k) to the limit reduces exactly one line on the pay stub, and it is the federal one.

New Jersey allows the 401(k) and taxes nearly everything else

New Jersey is Pennsylvania's mirror image. Its regulations let an employee defer tax on both employee and employer contributions to a 401(k) plan, then require every other retirement arrangement, naming 403(b), 457, 414(h), SEP, the federal Thrift Savings Plan and individual retirement accounts, to be included in gross income. SIMPLE and SARSEP contributions sit in that group as well, on both the employee and the employer side.

Cafeteria plans are the other half of the rule, and this is where New Jersey reaches ordinary benefits rather than retirement saving. The state never adopted the federal Section 125 treatment, so a health FSA reduction, a dependent-care account and a pre-tax health premium are all New Jersey wages, and a payroll HSA contribution is too. Of the 8 pre-tax lines this calculator collects, New Jersey taxes 6. The 401(k) is the one that survives.

California decouples on one item, and it is the HSA

California conforms on every retirement plan in this engine. A 401(k), 403(b), 457 or 414(h) contribution reduces California wages exactly as it reduces federal wages, and the state's cafeteria-plan treatment follows the federal one. Health savings accounts are the single exception. The Franchise Tax Board's Schedule CA instructions state it plainly: federal law allows a deduction for contributions to an HSA, and California does not conform to that provision.

Your W-2 shows the effect. Box 16, California state wages, comes out higher than Box 1 by the amount of the HSA contribution, because Schedule CA adds it back. Employer contributions to your account are California income too, and so are the account's investment earnings each year. Nothing else about a California paycheck changes, which is why this is easy to miss until the return is being prepared.

The 414(h) and traditional-IRA exceptions

Section 414(h) covers the mandatory pension contributions a public employer picks up on behalf of teachers, police officers, firefighters and state employees. The pickup removes that money from federal wages. It does not remove it from Alabama or New York wages: Alabama's retirement system tells employers that state income tax applies to the employee's full compensation including the retirement contribution, and New York requires members of its public retirement systems to report 414(h) amounts as an addition on Form IT-201. Both rules reach public employees and nobody else, and Pennsylvania and New Jersey tax the same money under their broader rules.

There is a box for this in the calculator now. Open the advanced inputs, enter your annual pickup, and those four states add it back while every other one leaves it alone. New York City charges it as well, because the city taxes what the state taxes, so a New York City teacher pays both the state rate and the city rate on the same money. What the city adds on its own, an addback for its own flexible benefits program, is not modelled, because nothing here asks who your employer is.

Massachusetts diverges on something else entirely. It follows the federal treatment of 401(k), 403(b), 457, 414(h) and HSA money, and it never adopted the federal deduction for traditional IRA contributions, so an IRA contribution is Massachusetts income in the year you make it. Pennsylvania and New Jersey refuse the same deduction under their own broader rules, which makes three states in all.

This one took two attempts to model, and the obstacle was federal rather than local. Massachusetts disallows a deduction you took on your federal return, so the addback only means something if the deduction existed, and under Section 219(g) it often does not. Once a workplace retirement plan covers you, the deduction phases out between $81,000 and $91,000 of income for a single filer and between $129,000 and $149,000 for a couple filing jointly, and it disappears entirely above those ranges. Most people reading a paycheck calculator have a plan at work. Granting the deduction to all of them would have cut the wrong federal number and then raised the wrong state one, from the same input, in opposite directions.

So the calculator asks. Open the advanced inputs and you will find an annual IRA field sitting apart from the payroll lines, with a checkbox for whether a retirement plan at work covers you, and a second one for your spouse when you file jointly. It is Box 13 of your W-2. Enter a contribution and the estimate tells you how much of it is actually deductible before it tells you what that saves, because the gap between the two is the part people do not expect. A different rule applies if you are not covered but your spouse is: the range moves up to $242,000 to $252,000, and if neither of you is covered the whole contribution is deductible at any income. The field is deliberately separated from everything above it, because funding an IRA does not change your paycheck. You move that money yourself. What it changes is the tax on the paycheck, and in Massachusetts, New Jersey and Pennsylvania it changes only the federal half.

Contributions and retirement income are two different questions

Everything on this page is about the moment money leaves your paycheck. Whether a state taxes the pension, the 401(k) withdrawal or the IRA distribution years later is a separate rule, decided separately, and the two frequently point in opposite directions. Pennsylvania is the clearest case: it taxes on the way in and exempts on the way out, so a sentence about its retirement income tells you nothing about its payroll treatment.

States that tax a contribution generally track your basis afterwards, so the same dollars are not taxed a second time when you withdraw them. New Jersey, Pennsylvania and Massachusetts all do. Those are distribution mechanics, well outside what a per-paycheck estimate can answer, so they are named here rather than modelled. If you are planning withdrawals rather than contributions, this guide is the wrong half of the question.

Pre-tax contributions FAQ

Does my state tax my 401(k) contribution?
Only Pennsylvania does, out of the 42 jurisdictions that tax wages. Everywhere else the deferral has already left your federal wage figure before the state starts counting, so it lowers state tax the way it lowers federal tax. New Jersey allows the 401(k) exclusion and taxes nearly every other retirement plan.
Which states tax HSA contributions?
Only 2 of them do: California and New Jersey. Neither conforms to the federal health savings account rules, so a payroll HSA contribution stays inside state wages and shows up as a higher Box 16 than Box 1 on your W-2. Every other state with an income tax follows the federal exclusion.
Why does Pennsylvania tax my 401(k) contribution?
Because Pennsylvania does not start from federal income. It writes its own definition of compensation, and that definition counts an employee contribution to a qualified plan as pay in the year it is made. The exemption arrives later instead: Pennsylvania does not tax the money when you withdraw it in retirement.
Does a 401(k) reduce my state income tax?
In 41 of the 42 jurisdictions that tax wages, yes, by your state marginal rate times the amount you defer. Pennsylvania is the exception. In the 9 jurisdictions with no wage income tax there is nothing to reduce, so the deferral saves federal tax only.
What about 403(b), 457 and IRA contributions?
Pennsylvania and New Jersey tax those going in, along with SEP and SIMPLE contributions. Massachusetts refuses the traditional IRA deduction and nothing else. The IRA and the 414(h) pension pickup each have their own box now. What this calculator still gathers into one retirement line is the 403(b), 457, SEP and SIMPLE group, so a New Jersey 403(b) is the case it gets wrong.
Is retirement income taxed the same way as contributions?
No, and Pennsylvania is the reason to ask. It taxes the contribution and exempts the distribution, which is why it reads as retirement friendly while being the strictest state on the way in. This guide covers contributions only, the part that changes the paycheck you get this month.