Skip to main content
Paystub Pilot

How to Match Your Final Pay Stub to Your W-2

Jul 13, 20268 min read
PP

Prepared by Paystub Pilot

Payroll and tax research

Reviewed against IRS W-2 instructions and Pub 15 box-by-box reconciliation.

Your final pay stub of the year should closely match your W-2, but the boxes rarely match line-by-line. Here is exactly which YTD figures flow into which W-2 boxes, why differences happen, and how to fix a real error before tax filing.

Reconciliation diagram showing one $90,000 YTD gross splitting into three W-2 wage boxes: Box 1 ($78,000, after 401(k) and pre-tax health), Box 3 and Box 5 ($87,000, after pre-tax health only), with Box 4 and Box 6 derived from those, and the Box 5 minus Box 1 gap equal to the traditional 401(k)
Reconciliation diagram showing one $90,000 YTD gross splitting into three W-2 wage boxes: Box 1 ($78,000, after 401(k) and pre-tax health), Box 3 and Box 5 ($87,000, after pre-tax health only), with Box 4 and Box 6 derived from those, and the Box 5 minus Box 1 gap equal to the traditional 401(k)

Why Your Final Stub and Your W-2 Almost Never Match Line-for-Line

Every January, millions of workers find their W-2 and final pay stub don't match. Box 1 differs from gross. Box 3 and Box 5 diverge sharply. Box 2 (federal tax) typically aligns, but little else does. This frustrates people, but the W-2 is usually correct: each box reports a different income category, and pre-tax deductions carve the same YTD gross into multiple values.

Understanding these adjustments matters for two reasons. You might need to file before receiving your W-2 using only your final pay stub, in which case knowing which YTD figures map to which boxes is essential. Or your W-2 contains a genuine error, and catching it in January costs far less than amending after filing. This article breaks down each box tied to pay stub data, shows exactly how it's built, and walks you through spotting real mistakes.

Start by pulling your final pay stub of the year, the one dated in late December, not the stub marked "pay period ending December 31" that hit your account in January. The IRS timestamps by pay date, not pay period end date, so a check deposited January 2, 2026 for December 2025 work goes on your 2026 W-2. Wrong pay date is the leading source of early-year mismatches.

Box 1: Wages, Tips, and Other Compensation

Box 1 is federal taxable wages: the IRS's starting point for income tax. It begins with YTD gross and subtracts pre-tax deductions only: traditional 401(k), health insurance, HSA, FSA, commuter benefits, dental, vision.

The core reconciliation formula applies here and to the boxes that follow: take YTD gross from the final stub, subtract YTD pre-tax contributions (traditional 401(k), medical, dental, vision, HSA, FSA, qualified commuter), and the result should land within a few cents of Box 1. Pre-tax deductions are removed before federal income tax is calculated, so they shrink the Box 1 wage figure below gross.

Box 1 and Box 3 stop matching the moment you contribute to a traditional 401(k), because 401(k) contributions reduce Box 1 but not Social Security wages. A Roth 401(k) is post-tax and doesn't reduce Box 1, so don't subtract it. The most common reconciliation error appears at employers that offer both flavors of 401(k), where workers inadvertently double-count or miss one of the codes. The W-2 marks traditional 401(k) with Code D and Roth 401(k) with Code AA; only Code D shrinks Box 1.

Moving expense reimbursements are fully taxable now and already in Box 1, no adjustment needed. The same applies to taxable fringes: company car personal use, tuition assistance above $5,250, or excess group-term life insurance. These show as separate line items on earlier stubs that boosted your gross without touching net pay.

Box 2: Federal Income Tax Withheld

Box 2 reports federal income tax withheld during the calendar year and will ordinarily match the corresponding YTD total on a final stub. A mismatch deserves a payroll reconciliation, but it can reflect a year-end correction, voided payment, or another payroll entry processed after the stub was issued. Pre-tax deductions and imputed income may change taxable wages; they do not themselves change tax already withheld.

Ask payroll whether a late correction, void, or off-cycle payment explains the difference. If not, request a corrected wage statement before filing.

Box 3 and Box 4: Social Security Wages and Tax

Box 3 is Social Security wages, governed separately from federal income tax. Two key differences from Box 1: 401(k) contributions don't reduce Box 3 (they reduce Box 1 but not Social Security wages), and Box 3 is subject to an annual wage base cap, $184,500 in 2026, above which Social Security tax stops entirely. Once earnings cross that threshold mid-year, your employer is barred from withholding further Social Security tax for the rest of the year, and Box 3 on the W-2 stops moving even though your gross keeps climbing.

Apply the same formula from Box 1 with one adjustment: skip 401(k) when subtracting. Take YTD gross, subtract pre-tax health, dental, vision, HSA, and FSA, but leave 401(k) contributions out. If the result is under $184,500, Box 3 equals that number; if it exceeds the cap, Box 3 stops there. Box 4 (Social Security tax) should be Box 3 multiplied by 6.2%, rounded.

Wage-base hits cause most of the Box 3 confusion. A high earner crosses the cap mid-year, Social Security withholding stops, and Box 3 looks artificially low against the YTD gross. It isn't an error.

Box 5 and Box 6: Medicare Wages and Tax

Medicare wages in Box 5 follow the same formula as Box 3 (YTD gross minus pre-tax health, dental, vision, HSA, FSA, skipping 401(k)) with one meaningful difference: there is no cap. Medicare wages have no ceiling, so Box 5 keeps growing with every paycheck regardless of how high earnings go.

That said, the tax rate does change at $200,000. Your employer withholds 1.45% up to that amount, then an extra 0.9% on everything above it (thresholds differ for joint filing, but $200,000 is what payroll uses). Box 6 (Medicare tax) should be: wages under $200,000 multiplied by 1.45%, plus wages above $200,000 multiplied by 2.35%. High earners will see Box 6 run higher than a simple 1.45% multiplication because the Additional Medicare Tax applies to the full amount above $200,000, not just a single paycheck.

A useful internal consistency check: Box 5 should exceed Box 1 by roughly the annual traditional 401(k) contribution, and Box 5 should match Box 3 unless the Social Security wage-base cap was hit. When Box 1 is the lowest of the three, Box 3 is capped below Box 5, and Box 5 is the highest, the W-2 boxes are internally consistent.

Boxes 12 and 14: The Information Codes

Box 12 lists supplemental income and deductions with code letters. Code D: traditional 401(k). Code AA: Roth 401(k). Code BB: Roth 403(b). Code W: HSA contributions (yours plus employer match). Code C: group-term life over $50,000. Code Y/Z: nonqualified deferred comp. Code DD: employer health coverage value (informational, doesn't affect federal tax). New for tax year 2026: Code TT reports qualified overtime compensation, the FLSA premium portion eligible for the federal overtime deduction, so it should reconcile to the overtime premium on your YTD stub lines.

Match Box 12 against your final stub: Code D should equal your YTD traditional 401(k). Code AA should equal YTD Roth 401(k). Code W should include both your HSA contribution and any employer contribution. Code DD shows the full health insurance cost (employee + employer paid portions) for reference only. Employers report the entire value of health insurance they provide under IRC §106 even though you don't pay income tax on it, which is why Code DD appears on the W-2 despite having no effect on your federal tax.

Box 14 is a catch-all for items without their own code: state disability insurance (SDI), state family leave insurance (SFLI), union dues, charitable payroll deductions, after-tax life insurance. Box 14 entries skip your federal return but may matter on state returns. Example: California SDI in Box 14 can be claimed on some state returns.

Boxes 15 through 20: State and Local Information

Boxes 15–20 report state and local wages and tax. Box 16 (state taxable wages) follows state-specific rules that often diverge from the federal Box 1. Most states mirror Box 1, but not all. Pennsylvania doesn't allow 401(k) deductions at state level: Pennsylvania Box 16 will match Box 5, not Box 1. New Jersey disallows some pre-tax health premiums, so Box 16 sits higher than Box 1. Before blaming the W-2, check your state's rules.

Box 17 is state tax withheld. It should match your YTD state tax from your final stub. Boxes 18–20 handle local income tax (city or county), local tax withheld, and the locality name. New York City, Philadelphia, Columbus, and many Ohio municipalities tax wages locally.

What to Do If a Real Error Exists

If you've worked through every box and the mismatch isn't explained by pre-tax deductions, the Social Security wage base, or state-specific rules, the next step is to request a corrected W-2, formally Form W-2c, from the employer. Employers are required to issue corrections; most do so within a few weeks of a written request. If the correction hasn't arrived by the end of February, calling the IRS at 800-829-1040 prompts the IRS to contact the employer directly and, if necessary, to authorize the employee to file Form 4852 (Substitute for W-2) using the final paystub as the source document.

Filing on estimated figures and amending later is the wrong approach. Form 1040-X processing runs months, attracts more scrutiny than an original return, and delays any refund. The better path when the W-2c is delayed is Form 4868, which extends the filing deadline to October 15 without penalty, provided any tax owed is paid by April 15.

Hold onto the final stub for each year for at least three years after filing. The full retention guidance covers the longer-retention cases. Underwriters, Social Security examiners, and benefits administrators will eventually ask for it.

Related Articles

Apr 3, 20268 min read

How to Calculate Take-Home Pay: 2026 Worked Examples

Learn the formula for calculating your take-home pay from your salary. Includes real examples at $40K, $75K, and $120K annual salary.

Read More
Jun 11, 20268 min read

Pay Stub Deductions Explained (2026): Taxes & Withholdings

A line-by-line look at pay stub deductions: federal tax, state tax, FICA, health insurance, 401(k), and other withholdings.

Read More
Jun 22, 20268 min read

What Does YTD Mean on a Pay Stub? (And Why It Resets)

YTD means year-to-date, the sum of pay, taxes, and deductions since January 1. It resets every January 1, not on your hire date.

Read More

Create a Pay Stub Preview

Generate the watermarked PDF, check the tax lines and totals, then buy the clean copy for $2.49 if it matches your records.

Create Your Pay Stub