A W-2 form summarizes a full year of wages and tax withholding from an employer, and while most people glance only at the final numbers needed for tax filing software, understanding the individual boxes can help catch errors and better understand exactly how pay and withholding worked over the year.
The key boxes, explained
Box 1: Wages, tips, other compensation
This is taxable federal income for the year — notably, it's often lower than gross annual salary, since pre-tax deductions (401(k) contributions, certain health insurance premiums, HSA contributions) are subtracted before this figure is calculated, similar to the pre-tax deduction concept covered in our pay stub guide.
Box 2: Federal income tax withheld
The total federal income tax withheld from paychecks throughout the year, based on the W-4 elections on file. This figure is compared against actual tax liability when filing, determining whether a refund is due or additional tax is owed.
Boxes 3 and 4: Social Security wages and tax withheld
Social Security tax applies up to an annual wage base limit that adjusts periodically — wages above that limit aren't subject to additional Social Security tax, which is why Box 3 can differ from Box 1 for higher earners, and why some pre-tax deductions (like traditional 401(k) contributions) don't actually reduce Social Security wages the way they reduce federal taxable wages.
Boxes 5 and 6: Medicare wages and tax withheld
Medicare tax, unlike Social Security tax, has no wage base limit — all covered wages are subject to it, and higher earners above certain thresholds may see an additional Medicare tax withheld, reflected here.
Box 12: a frequently confusing set of codes
Box 12 uses letter codes to report various specific items — a common one is code D, representing traditional 401(k) contributions, or code W for employer HSA contributions. These codes explain many of the gaps between gross pay and Box 1 wages, and understanding what each code on your specific W-2 represents can clarify exactly what was and wasn't taxed.
State and local sections
Near the bottom, state wages and state tax withheld (and local, if applicable) are reported separately from federal figures — relevant if you moved between states during the year or work in a different state than where you live, situations that can create more complex state filing requirements.
What to check for accuracy
- Personal information — name, Social Security number, and address should all match current records exactly.
- Box 1 wages — a rough sanity check against expected annual pay minus known pre-tax deductions.
- Multiple W-2s if you changed jobs — confirming all employers from the year are accounted for before filing.
A W-2 is a standardized IRS form, but the specific codes in Box 12 and other details can vary meaningfully by employer and benefits offered — the IRS instructions for Form W-2 provide the complete, current list of codes if a specific one on your form isn't immediately clear.