To make a W-2 from pay stubs, start from the last pay stub of the calendar year and copy its year-to-date (YTD) totals into the W-2 boxes. Gross pay minus pre-tax deductions goes in box 1, federal income tax withheld goes in box 2, Social Security and Medicare wages and taxes go in boxes 3 to 6, retirement deferrals go in box 12, and state wages and tax go in boxes 16 and 17. Before you fill anything in, check that the YTD column is right, because the W-2 can only be as accurate as the stub it comes from.
If your stubs are in order, take the YTD totals from the year's last pay stub into the W-2 generator and preview the employee copies free.
Which pay stub do you start from?
Use the stub for the last pay date in the calendar year, not the last pay period worked. A W-2 covers wages *paid* between January 1 and December 31. If a pay period ends December 28 but the employee is paid on January 3, that check belongs to next year's W-2.
The YTD column on that final stub is the running total of every paycheck in the year, so you do not need to add up 26 or 52 stubs by hand. If you are unsure how the YTD column builds up, our guide to YTD on a pay stub walks through it.
Three checks before you start:
- Count the pay dates. A biweekly employee usually has 26 paychecks in a year, sometimes 27. If the YTD gross divided by the regular gross is far off, a stub was skipped or doubled.
- Include off-cycle payments. Bonuses, final checks and corrections paid on their own date must be inside the YTD totals.
- Rebuild the totals if you lost the last stub. Add up the per-period figures from the stubs you have, or use the YTD calculator to rebuild them.
Which YTD line goes in which W-2 box?
Here is a filled example. Dana is a salaried employee paid biweekly. Her final stub of the year shows these YTD totals (illustrative figures, not a tax calculation):
| Final stub, YTD column | Amount | |---|---| | Gross pay | $52,000.00 | | 401(k) deferral (pre-tax) | $2,600.00 | | Health insurance premium (pre-tax, cafeteria plan) | $1,800.00 | | Federal income tax withheld | $4,180.00 | | Social Security tax withheld | $3,112.40 | | Medicare tax withheld | $727.90 | | State income tax withheld | $1,950.00 |
And here is where each figure lands on her W-2:
| W-2 box | What goes in it | Dana's figure | |---|---|---| | Box 1: Wages, tips, other compensation | Gross pay minus 401(k) minus pre-tax health premium | $47,600.00 | | Box 2: Federal income tax withheld | YTD federal income tax | $4,180.00 | | Box 3: Social Security wages | Gross pay minus pre-tax health premium (401(k) is *not* taken out) | $50,200.00 | | Box 4: Social Security tax withheld | YTD Social Security (OASDI) tax | $3,112.40 | | Box 5: Medicare wages and tips | Same as box 3 in this example | $50,200.00 | | Box 6: Medicare tax withheld | YTD Medicare tax | $727.90 | | Box 12, code D | 401(k) elective deferrals | $2,600.00 | | Box 16: State wages | State taxable wages from the stub | $47,600.00 | | Box 17: State income tax | YTD state income tax | $1,950.00 |
A quick test that the stubs were right all year: box 4 should equal 6.2% of box 3 ($50,200 × 6.2% = $3,112.40), and box 6 should equal 1.45% of box 5 ($50,200 × 1.45% = $727.90). If those don't match, the withholding on one or more stubs was off, and you should find out why before making the W-2.
Box 16 depends on the state. Many states follow the federal treatment of 401(k) and cafeteria plan deductions, some don't. Use the state taxable wages your payroll figures show, not an assumption.
The boxes that come from the employer's records rather than the stub are the employer's EIN, name and address (boxes b and c), the employee's SSN, name and address (boxes a, e and f), and the state employer ID (box 15).
Why doesn't box 1 match gross YTD pay?
Because box 1 is *federally taxable* wages, not total pay. Some deductions come out before federal income tax is worked out, so they never reach box 1:
- Traditional 401(k), 403(b) and similar deferrals lower box 1 but not boxes 3 and 5. That is why Dana's box 3 is $2,600 higher than her box 1.
- Cafeteria plan (section 125) deductions, such as pre-tax health, dental and vision premiums, usually lower boxes 1, 3 and 5.
- Roth 401(k) contributions are taken after tax, so they do *not* lower box 1.
It also works the other way. Some things raise box 1 above cash pay, such as taxable fringe benefits that were run through payroll.
Boxes 3 and 5 can differ from each other too. Social Security wages stop at the yearly wage base, while Medicare wages have no cap. For an employee who earned above the wage base, box 3 is capped and box 5 keeps going.
If you aren't sure which deductions on the stub are pre-tax, pay stub deductions explained covers the common ones.
What if a stub earlier in the year was wrong?
The W-2 must show what was actually paid and withheld in the year, so a mistake on an earlier stub has to be dealt with before the totals go on the form.
- The YTD column carried the error forward. Recalculate the YTD totals from correct per-period figures, then issue a corrected final stub so the employee's records match the W-2.
- Tax was under- or over-withheld. Fixing the stub does not fix the deposit. If withholding was wrong, the payroll tax returns already filed for that quarter may need correcting as well. Talk to a tax professional about how to settle the difference.
- The W-2 was already given out. A wrong W-2 is corrected with Form W-2c, not by issuing a second W-2.
The simplest way to avoid this is to check the stubs each quarter rather than once in January.
What do you do with the W-2 once it is made?
A W-2 comes in several copies, each with its own job:
- Copy A goes to the Social Security Administration, together with Form W-3, which summarizes all of your W-2s. Our post on Form W-3 explains how the two fit together.
- Copies B, C and 2 go to the employee: B for their federal return, C for their records, 2 for state or local returns.
- Copy 1 goes to the state or local tax agency where required.
- Copy D stays with you.
The employee copies and the SSA filing share the same deadline. See when W-2s are due for the dates.
One thing to know: PayDocs makes the documents from your own payroll figures. It does not file anything with the IRS, the SSA or your state, so sending Copy A and the W-3 is still your job.
Household employers, such as people paying a nanny, follow the same box-by-box method. The extra step is reporting the employer taxes on your own return rather than on quarterly payroll returns.
Make the W-2 from your final stub
You have the YTD totals, you know which box each one goes in, and you've checked that boxes 4 and 6 add up. Take the YTD totals from the year's last pay stub into the W-2 generator and preview the employee copies free before you download.
Take the YTD totals from the year's last pay stub into the W-2 generator
FAQ
Can I make a W-2 from the last pay stub alone? Yes, if the YTD column on that stub is complete and correct. It already totals every paycheck in the calendar year. You still need the employer and employee details (EIN, SSN, addresses) from your own records.
Which pay stub number goes in box 1 of the W-2? YTD gross pay minus pre-tax deductions such as traditional 401(k) deferrals and cafeteria plan premiums. It is usually lower than gross pay.
Why are boxes 3 and 5 higher than box 1? Traditional 401(k) deferrals are taken out of box 1 but not out of Social Security and Medicare wages, so boxes 3 and 5 include them.
Does a paycheck paid in January for December work go on this year's W-2? No. W-2s follow the pay date, so a check paid in January goes on the next year's W-2.
What if I find a mistake after giving out the W-2? Issue a corrected form, Form W-2c, to the employee and the SSA instead of a second W-2.
Questions
Can I make a W-2 from the last pay stub alone?
Yes, if the YTD column on that stub is complete and correct. It already totals every paycheck in the calendar year. You still need the employer and employee details (EIN, SSN, addresses) from your own records.
Which pay stub number goes in box 1 of the W-2?
YTD gross pay minus pre-tax deductions such as traditional 401(k) deferrals and cafeteria plan premiums. It is usually lower than gross pay.
Why are boxes 3 and 5 higher than box 1?
Traditional 401(k) deferrals are taken out of box 1 but not out of Social Security and Medicare wages, so boxes 3 and 5 include them.
Does a paycheck paid in January for December work go on this year's W-2?
No. W-2s follow the pay date, so a check paid in January goes on the next year's W-2.
What if I find a mistake after giving out the W-2?
Issue a corrected form, Form W-2c, to the employee and the SSA instead of a second W-2.
Sources
Sources checked November 24, 2026. This article explains how pay documents work; it is not tax or legal advice.



