Every February, your employer sends you a W-2. It's this one-page summary of everything you earned and everything that was withheld for the year. Most people hand it straight to their tax preparer and don't think twice.
But here's something that surprised me when I first learned it: W-2s can be wrong. Not often — but it happens. Payroll departments make mistakes. Tax withholding rates get misconfigured. A benefits change gets processed incorrectly. Someone fat-fingers a number.
And if your W-2 is wrong, your tax return is wrong. Which means you either overpay the IRS (bad) or underpay them (worse — that comes with penalties).
The fix is simple: compare your W-2 against your final pay stub of the year. Your last stub has year-to-date totals that should match the W-2 almost exactly. If they do, you're good. If they don't, you've caught a problem before it becomes a tax headache.
What each document shows
Your pay stub is a snapshot of each pay period — what you earned, what was taken out, what you took home. The YTD column shows running totals for the calendar year.
Your W-2 is the annual summary. Total wages (Box 1), federal tax withheld (Box 2), Social Security wages and tax (Boxes 3-4), Medicare wages and tax (Boxes 5-6), state taxes (Box 17), retirement contributions (Box 12), and so on.
In a perfect world, your December pay stub's YTD figures line up with the corresponding W-2 boxes.
Why they sometimes don't match
The most common reason isn't actually an error — it's pre-tax deductions.
Your gross pay on your stub includes all compensation. But W-2 Box 1 (taxable wages) excludes pre-tax benefits like health insurance premiums, HSA contributions, and traditional 401(k) deferrals. So Box 1 will almost always be lower than your gross YTD. That's correct.
After accounting for pre-tax deductions, if the numbers still don't match, possible culprits include: a late-December payroll adjustment that didn't make it onto your final stub, an employer correction processed after the last pay period, or a genuine data entry error in the payroll system.
How to actually do the comparison
Eyeballing a PDF pay stub and a W-2 form side by side is doable but annoying. The fields aren't labeled the same way, they're in different positions on each document, and it's easy to compare the wrong numbers.
What works better: convert your final pay stub to a spreadsheet (a tool like StubSheet does this in seconds), then add your W-2 numbers in a column next to the YTD figures, and add a third column that calculates the difference. Any row that's not zero gets investigated.
Here are the key fields to compare:
- Gross YTD → W-2 Box 1 (remember: Box 1 will be lower by the amount of your pre-tax deductions)
- Federal tax withheld YTD → W-2 Box 2
- Social Security tax YTD → W-2 Box 4
- Medicare tax YTD → W-2 Box 6
- State tax withheld YTD → W-2 Box 17
- 401(k) contributions YTD → W-2 Box 12, Code D
If the differences are under a dollar, that's rounding — ignore it. If they're larger, dig in.
What to do when numbers don't match
Don't panic, and don't file your taxes until it's resolved.
Start with the pre-tax adjustment. Take your gross YTD, subtract annual health insurance premiums, HSA contributions, and 401(k) deferrals. Does the result match Box 1 now? If yes, there's no problem.
If there's still a gap, check whether your employer processed any late adjustments — a bonus, a correction, a true-up — that might not appear on your final regular stub.
If you can't explain the difference, contact your payroll or HR department. They can investigate and, if needed, issue a corrected W-2 (called a W-2c). This is more common than you'd think, and it's much better to handle it before filing than to deal with an IRS notice later.
The easy version
If all of this sounds like a lot of work — it's really not, once you have the data in a spreadsheet. The hard part is manually comparing two different document formats. The comparison itself is just subtraction.
Convert your last pay stub, line up the numbers, check for zeros. Twenty minutes of effort that could save you from filing an incorrect return.
And if you want to make next year even easier: convert each pay stub throughout the year as you receive it. By December, you'll have a complete spreadsheet ready to compare against your W-2 the day it arrives.