blog-5
To calculate your W-2 Box 1 wages, take the year-to-date gross pay on your final pay stub and subtract your pre-tax deductions (401(k), health insurance, HSA, FSA) and any nontaxable income. The result is your estimated federal taxable wages. The other boxes follow their own rules, Social Security and Medicare wages (Boxes 3 and 5) don't subtract 401(k), and your withheld-tax boxes come straight from the year-to-date totals on your stub. This gives you an accurate estimate, but always file with the official W-2 your employer issues.
You don't have to wait for your W-2 to know your taxable income, your final pay stub already holds the numbers. Calculating it yourself is useful for planning your return early, double-checking your W-2 when it arrives, or completing Form 4852 if the W-2 never shows up. We're a pay-stub resource, so this is our home turf: here's the exact method, box by box, plus the reasons your stub and W-2 won't match to the penny.
What You Need From Your Pay Stub
The single most important thing: use the year-to-date (YTD) column, not a single pay period. Your final pay stub of the year carries the YTD totals that map directly onto your W-2.
How to Calculate Box 1 (Federal Taxable Wages)
Box 1 is the number most people are after, your federal taxable wages, and it's the figure that flows onto your Form 1040. The formula is simple:
− Pre-tax deductions (401(k), health, HSA, FSA)
− Nontaxable income
= Box 1 Federal Taxable Wages
Pre-tax deductions lower your taxable income, which is exactly why Box 1 is almost always less than your gross pay. Here's a worked example for an employee earning $60,000:
Worked Example: $60,000 Salary
| YTD gross pay | $60,000 |
| Less: 401(k) contributions | − $6,000 |
| Less: pre-tax health insurance | − $3,000 |
| Box 1 federal taxable wages | $51,000 |
That $51,000 is what appears in Box 1, and what you'd report as wages when you file. Note the 401(k) and health insurance came out before tax, so they shrink the taxable figure.
The Other Boxes, One by One
Box 1 is the headline, but here's how to derive the rest from your stub. The 2026 figures are baked in.
| Box | What it is | How to get it from your stub |
|---|---|---|
| Box 1 | Federal taxable wages | YTD gross minus pre-tax deductions and nontaxable income |
| Box 2 | Federal income tax withheld | The YTD "Federal Tax" or "FIT" figure on your stub |
| Box 3 | Social Security wages | YTD gross minus health-type pre-tax items (not 401(k)), capped at $184,500 for 2026 |
| Box 4 | Social Security tax withheld | Box 3 × 6.2% (max $11,439 for 2026) |
| Box 5 | Medicare wages | Same basis as Box 3 but no cap; also adds taxable items like tips and group-term life over $50,000 |
| Box 6 | Medicare tax withheld | Box 5 × 1.45% (plus 0.9% on wages over $200,000) |
| Box 16 | State wages | Often the same as Box 1, with state-specific exceptions |
| Box 17 | State income tax withheld | The YTD state tax figure on your stub |
The Key Nuance: Box 1 vs Box 3
This trips up almost everyone who calculates their own W-2, and getting it right is what makes your numbers actually match. Pre-tax deductions don't all behave the same way.
The Same Worker, Box 1 vs Box 3
| YTD gross pay | $60,000 |
| Less: 401(k) (reduces Box 1 only) | − $6,000 |
| Less: health insurance (reduces both) | − $3,000 |
| Box 1 (federal wages) | $51,000 |
| YTD gross pay | $60,000 |
| Less: health insurance only (401(k) stays in) | − $3,000 |
| Box 3 (Social Security wages) | $57,000 |
Same person, same W-2: Box 1 is $51,000 but Box 3 is $57,000, a $6,000 gap that is exactly the 401(k) contribution. That difference is correct, not an error.
So if your Box 1 estimate came out lower than expected, check whether you subtracted your 401(k) from the Social Security and Medicare boxes by mistake, those boxes keep it in.
Why Your Pay Stub and W-2 Don't Match
If your final stub's gross pay doesn't equal any single box on your W-2, that's expected, not an error. The two documents report different things. Here are the usual reasons:
| Reason | Effect |
|---|---|
| Pre-tax deductions | Lower Boxes 1, 3, 5, and 16 below your gross pay (the most common reason) |
| Nontaxable income | Shows on your stub's gross but is excluded from the W-2 |
| Taxable fringe benefits | Items like group-term life insurance over $50,000 are added in, and can make Box 1 higher than your paycheck math |
| Bonuses or commissions | May be reported in ways that aren't obvious on the YTD totals |
| Multiple states | Wages split across states can make the state boxes differ from Box 1 |
Let the Tool Do the Math
Doing this by hand is fine for a quick check, but if you'd rather not run the calculations, a generator with a built-in calculator handles the math and lays the numbers out in W-2 format for you.
This is especially handy if you're reconstructing your numbers for a lost or missing W-2, where you need to organize your final pay stub's figures for Form 4852.
The Bottom Line
Calculating your W-2 from your pay stub comes down to one core move: start with YTD gross pay and subtract the right pre-tax deductions for each box. Box 1 subtracts everything pre-tax; Boxes 3 and 5 keep your 401(k) in. Expect your stub and W-2 to differ, that's normal, and it's caused by how different items are taxed. Use your calculation to plan and to verify, but file with the official W-2 whenever you have it.
Frequently Asked Questions
Start with the year-to-date gross wages on your final pay stub, then subtract your pre-tax deductions (such as 401(k), health insurance, HSA, and FSA) and any nontaxable income. The result is your estimated Box 1 federal taxable wages. For example, $60,000 gross minus $6,000 in 401(k) and $3,000 in health insurance equals $51,000 in Box 1.
Box 1 shows your taxable wages, which is your gross pay minus pre-tax deductions like 401(k) contributions and health insurance premiums. Those deductions reduce your federal taxable income, so Box 1 is almost always lower than the gross pay shown on your pay stub.
Pre-tax deductions affect the boxes differently. Retirement contributions like a 401(k) reduce Box 1 (federal taxable wages) but not Box 3 (Social Security wages), because 401(k) money is still subject to Social Security and Medicare tax. Pre-tax health insurance reduces both. That's why Box 3 is often higher than Box 1.
Start with year-to-date gross pay and subtract only the pre-tax deductions that are exempt from Social Security tax, mainly health insurance, but not 401(k) contributions. Box 3 is capped at the annual Social Security wage base, which is $184,500 for 2026. Box 4 is then 6.2% of Box 3.
This is normal. Your pay stub shows total gross pay, while your W-2 shows taxable wages after pre-tax deductions, so the numbers rarely match exactly. Nontaxable income (excluded from the W-2) and taxable fringe benefits like group-term life insurance over $50,000 (which can raise Box 1) also create differences.
The calculation gives you an estimate, useful for planning or for completing Form 4852 if your W-2 never arrives. For your actual tax return, always use the official W-2 your employer issues, since it includes details and adjustments your pay stub may not show.
You need your final pay stub's year-to-date figures: gross wages, pre-tax deductions (401(k), health insurance, HSA, FSA), any nontaxable income, and the year-to-date taxes withheld (federal, Social Security, Medicare, and state). The year-to-date column is the key, not the single pay period.
Divide the Social Security tax withheld on your pay stub by 0.062, and the result is your Box 3 Social Security wages. For example, $3,149.60 withheld divided by 0.062 equals $50,800. The same method works for Medicare: divide the Medicare tax withheld by 0.0145 to get your Box 5 wages.