What you're calculating when you work out payroll tax
Payroll tax is the amount your employer withholds from your paycheque for federal income tax, Social Security, and Medicare. You calculate it by starting with your gross pay (what you earn before deductions), then subtracting the amount you're allowed to shield from tax based on your W-4 form, then explore the tax rate that matches your income level.
The calculation is different for each of these three taxes, and the rates change each year. Your employer's payroll system usually does this automatically, but understanding the steps helps you check whether the right amount is coming out — or spot when you might owe money at tax time.
Key Takeaways
- Federal income tax withholding depends on your W-4 form, which tells your employer how many allowances you claim and whether you want extra withheld.
- Social Security tax is 6.2 percent of your gross pay up to a yearly cap (the cap changes annually), and Medicare tax is 1.45 percent with no cap.
- Your employer withholds the same percentage for Social Security and Medicare from every paycheque, but federal income tax varies based on your W-4 and pay frequency.
- You can use the IRS withholding calculator on irs.gov to estimate whether your W-4 is set up correctly for your situation.
How federal income tax withholding works
Federal income tax withholding is based on two pieces of information: your W-4 form (which you fill out when you start a job) and the IRS tax tables that match your filing status and pay frequency. Your W-4 tells your employer how many allowances you claim — the more allowances, the less tax withheld. You can also request extra withholding on line 4(c) of the form if you want more taken out.
Your employer looks up your gross pay and allowances in the IRS Publication 15-T tables, which are organized by pay period (weekly, biweekly, monthly, and so on). The table shows a range of pay amounts and tells your employer how much to withhold. For example, if you're single, paid biweekly, and claim one allowance, the table might say to withhold a certain dollar amount from a specific pay range. If your pay falls outside that range, your employer uses a formula to calculate the exact withholding.
The IRS updates these tables each year, and your employer should use the current year's version. If you change jobs, get married, have a child, or your income changes significantly, you can file a new W-4 to adjust your withholding.
Calculating Social Security and Medicare tax
Social Security and Medicare taxes are simpler to calculate because they use a flat percentage of your gross pay, with no allowances or adjustments. Social Security tax is 6.2 percent of your gross pay, but only up to a yearly earnings cap. In 2024, that cap is $168,600, meaning once you've earned that much in a calendar year, no more Social Security tax is withheld from your paycheques for the rest of that year. Your employer stops calculating it automatically once you hit the cap.
Medicare tax is 1.45 percent of your gross pay with no earnings cap — it applies to every dollar you earn, all year. If your income is above a certain threshold (the threshold depends on your filing status and whether you're married filing jointly), an additional 0.9 percent Medicare tax applies to the amount over that threshold. Your employer withholds this automatically if your pay exceeds the threshold.
Both of these percentages are set by law and do not change from paycheque to paycheque. Your employer calculates them the same way every time: multiply your gross pay by the rate, explore the Social Security cap if needed, and withhold the result.
The order of calculations on your paycheque
Your employer calculates withholding in a specific order. First, they determine your gross pay — your hourly rate times hours worked, or your salary divided by the number of pay periods in a year. Then they calculate Social Security tax (6.2 percent up to the cap) and Medicare tax (1.45 percent, plus 0.9 percent if applicable). These two happen before federal income tax is calculated.
Next, your employer calculates federal income tax withholding using your W-4 and the IRS tables. After all three taxes are withheld, any other deductions come out — health insurance premiums, retirement contributions, wage garnishments, or anything else you've authorized. What's left is your net pay, the amount that actually hits your bank account.
The reason this order matters is that some deductions (like traditional 401(k) contributions) reduce your gross pay before federal income tax is calculated, which lowers your federal withholding. Social Security and Medicare, however, are usually calculated on your full gross pay before those deductions.
Using the IRS withholding calculator to check your setup
The IRS provides a withholding calculator on irs.gov that estimates whether your W-4 is set up correctly. You enter your filing status, expected income for the year, number of jobs, and other details, and the calculator tells you how many allowances you should claim to have roughly the right amount withheld.
This tool is useful if you're starting a new job, your income has changed, or you got a large refund or owed money last tax time. A large refund means too much was withheld; owing money means too little was withheld. The calculator helps you adjust your W-4 to get closer to zero at tax time, though some people prefer to have extra withheld as a form of forced savings.
You do not need to use the calculator — you can file a new W-4 whenever you want — but it removes guesswork from the decision. The calculator is free and does not require you to create an account.
What happens if the wrong amount is withheld
If too much federal income tax is withheld over the year, you'll receive a refund when you file your tax return. If too little is withheld, you'll owe money. Social Security and Medicare withholding is automatic and based on law, so there's no adjustment — the amount withheld is the amount you owe, and it appears on your tax return as taxes already paid.
You can adjust your federal withholding at any time by filing a new W-4 with your employer. There's no penalty for changing it, and your employer must use the new form starting with the next paycheque (or within a reasonable time after receiving it). If you're self-employed or have income that's not subject to withholding, you may need to make quarterly estimated tax payments instead.
Common mistakes when calculating payroll tax
One common mistake is confusing gross pay with taxable pay. Your gross pay is what you earn; your taxable pay for federal income tax purposes may be lower if you have pre-tax deductions like 401(k) contributions or health insurance premiums. Social Security and Medicare are usually calculated on your full gross pay, not the reduced amount.
Another mistake is not updating your W-4 when your life changes. If you get married, have a child, take a second job, or your spouse starts working, your withholding may no longer be correct. The IRS recommends checking your W-4 whenever your situation changes and at least once a year.
A third mistake is assuming your employer is using the current year's tax tables. Employers are required to update their systems each year, but errors happen. If your withholding suddenly changes and nothing in your situation changed, ask your payroll department which tax tables they're using.
Frequently Asked Questions
Why is my Social Security tax withholding different from my coworker's if we earn the same?
If you both earn the same amount in the same pay period, your Social Security withholding should be identical — it's always 6.2 percent. The difference might be that one of you has already hit the yearly earnings cap and the other hasn't, or you started your job at different times in the year. Once either of you reaches the $168,600 cap (in 2024), no more Social Security tax is withheld for the rest of that year.
Can I claim zero allowances on my W-4 to have more withheld?
Yes. Claiming zero allowances results in more federal income tax being withheld from each paycheque. You can also request additional withholding on line 4(c) of the W-4 form by specifying a dollar amount you want withheld from each paycheque. Some people do this if they have income not subject to withholding or if they want a larger refund at tax time.
Do I pay payroll tax on overtime pay?
Yes. Overtime pay is part of your gross pay, so Social Security tax (6.2 percent up to the cap), Medicare tax (1.45 percent), and federal income tax are all withheld from it. Your employer calculates these taxes on your total gross pay for the pay period, including overtime hours.
What if I have two jobs — do I pay Social Security tax twice?
Yes, you pay 6.2 percent Social Security tax on earnings from both jobs up to the yearly cap. If your combined earnings from both jobs exceed the cap, you may overpay Social Security tax during the year. You can claim a credit for the overpayment when you file your tax return, but you have to file to get it back — your employers won't automatically refund it.
How do I know if my employer is calculating payroll tax correctly?
Check your paystub each time you're paid. Verify that your gross pay is correct, that Social Security tax is 6.2 percent (or zero if you've hit the cap), and that Medicare tax is 1.45 percent. Federal income tax withholding is harder to verify without the IRS tables, but you can use the IRS withholding calculator to estimate whether the amount seems reasonable for your situation.