Do 401(k) contributions count as earned income? It depends on which tax you’re asking about. Traditional pre-tax 401(k) contributions are not counted as earned income for federal income tax, but they are counted as wages for Social Security and Medicare taxes. Roth 401(k) contributions count for both. The same paycheck dollars get treated differently depending on which line of the tax code is doing the counting, and that split ripples into your W-2, your eligibility for other tax breaks, and your future Social Security benefit.
Federal Income Tax: Traditional Contributions Are Excluded, Roth Contributions Are Not
Traditional 401(k) deferrals come out of your paycheck before federal income tax is calculated. Your employer leaves them out of Box 1 of your W-2, which is the wage figure that flows onto your Form 1040. For your annual income tax return, those contributions are not part of your taxable earned income for the year.1Internal Revenue Service. 401(k) Plan Overview The tax is deferred, not eliminated: you’ll owe ordinary income tax on the money when you withdraw it in retirement.
Roth 401(k) contributions work the opposite way. You pay income tax on the money before it goes into the account, so those dollars stay in your gross income for federal tax purposes.2Internal Revenue Service. Roth Account in Your Retirement Plan Box 1 on your W-2 is unchanged by a Roth deferral. The tradeoff is that qualified withdrawals in retirement come out completely tax-free, including investment gains.
Social Security and Medicare Taxes: Every Dollar Counts
The rules diverge sharply once you leave income tax. Every dollar you defer into a 401(k), traditional or Roth, is subject to Social Security tax (6.2%) and Medicare tax (1.45%). The IRS is explicit that elective deferrals of both types are wages for FICA purposes,3Internal Revenue Service. Retirement Plan FAQs Regarding Contributions – Are Retirement Plan Contributions Subject to Withholding for FICA, Medicare or Federal Income Tax and the statute defining FICA wages specifically includes amounts deferred under a section 401(k) arrangement.4Office of the Law Revision Counsel. 26 USC 3121 – Definitions
Social Security tax applies only on wages up to the annual wage base, which is $184,500 for 2026.5Social Security Administration. Contribution and Benefit Base Medicare tax has no cap. An additional 0.9% Medicare surtax applies once wages exceed $200,000 for single filers, $250,000 for joint filers, or $125,000 for married filing separately.6Internal Revenue Service. Topic No 560 – Additional Medicare Tax Your 401(k) deferrals don’t reduce the wage figure for any of these calculations.
Your W-2 Shows the Split in Black and White
Because federal income tax and FICA tax treat 401(k) contributions differently, your W-2 shows different wage numbers across the boxes when you defer on a traditional basis:
- Box 1 (Wages, tips, other compensation) is your federal taxable wages. Traditional 401(k) deferrals are excluded; Roth deferrals are included.
- Box 3 (Social Security wages) includes both traditional and Roth 401(k) deferrals, up to the $184,500 wage base for 2026.
- Box 5 (Medicare wages) also includes both types, with no cap.
- Box 12, Code D reports your traditional 401(k) elective deferrals for the year.7Internal Revenue Service. General Instructions for Forms W-2 and W-3
- Box 12, Code AA reports your designated Roth 401(k) contributions.7Internal Revenue Service. General Instructions for Forms W-2 and W-3
A quick sanity check for someone contributing only on a traditional basis: Box 3 minus Box 1 should roughly equal the Code D amount in Box 12. Small differences can arise from other pre-tax benefits like health insurance premiums.8Internal Revenue Service. Topic No 424 – 401(k) Plans
Why the Distinction Matters Beyond Your Tax Bill
IRA Eligibility
To contribute to a Traditional or Roth IRA, you need taxable compensation at least equal to what you want to contribute. For 2026, the IRA limit is $7,500, or $8,600 if you’re 50 or older. The IRS defines compensation for IRA purposes to include salary reduction amounts deferred under a 401(k). So someone earning $60,000 who defers $24,500 into a traditional 401(k) still has $60,000 of compensation for IRA eligibility, even though Box 1 shows only $35,500. Maxing out a 401(k) does not disqualify you from also funding an IRA. On a joint return, a non-working spouse can contribute to an IRA based on the working spouse’s compensation, as long as combined contributions don’t exceed the couple’s total taxable compensation.9Internal Revenue Service. Retirement Topics – IRA Contribution Limits
Earned Income Tax Credit
Traditional 401(k) contributions can meaningfully boost the Earned Income Tax Credit for workers in the EITC income range. Because pre-tax deferrals lower your adjusted gross income, they can move you into a more favorable spot on the EITC phase-in or phase-out curve. Roth deferrals don’t produce this effect, since they don’t reduce AGI. For a single parent with two or more children, EITC increases at roughly 21 cents for each dollar of income removed from the W-2 through traditional 401(k) deferrals. In the phase-out zone, traditional contributions can recover a substantial amount of credit that would otherwise be lost.
Future Social Security Benefits
Because 401(k) deferrals stay in FICA wages, they also stay in your Social Security earnings record. The Social Security Administration bases your future retirement benefit on your highest 35 years of FICA-taxed earnings, and contributing to a 401(k) does not reduce the earnings used in that calculation. Your future benefit is unaffected by how much you defer.
Employer Contributions Are Not Your Earned Income
Employer matching and non-elective contributions follow different rules from your own deferrals. Those amounts don’t show up in any wage box on your W-2, and they’re not subject to federal income tax or FICA in the year the employer makes them.3Internal Revenue Service. Retirement Plan FAQs Regarding Contributions – Are Retirement Plan Contributions Subject to Withholding for FICA, Medicare or Federal Income Tax They grow tax-deferred and are taxed as ordinary income when you take them out in retirement. Employer contributions also don’t count as your compensation for qualifying for other tax benefits like IRA contributions; only what you personally earn through work counts there.