What payroll tax calculation actually involves
Payroll tax calculation means taking an employee's gross pay and subtracting the amounts owed to federal and state governments, plus Social Security and Medicare. The math itself is straightforward — you apply a percentage rate to the gross wage — but the rates change by year, vary by state, and depend on what the employee claimed on their W-4 form. Most employers use payroll software to do this automatically, but understanding the steps helps you catch errors or calculate it yourself if needed.
The calculation happens in this order: start with gross pay, subtract pre-tax deductions (like health insurance), calculate federal income tax withholding, calculate Social Security and Medicare tax, subtract post-tax deductions, and arrive at net pay. Each step uses a different method or table.
Key Takeaways
- Social Security tax is always 6.2% of gross pay up to an annual wage cap (which changes yearly), and Medicare tax is always 1.45% with no cap.
- Federal income tax withholding depends on the W-4 form the employee filed, the IRS withholding tables for the current year, and whether they are paid weekly, biweekly, or monthly.
- State income tax rates and rules vary widely — some states have no income tax, others use a flat rate, and others use brackets similar to federal tax.
- Pre-tax deductions like health insurance and retirement contributions reduce the amount subject to federal and state income tax, but not Social Security and Medicare tax.
- Employers must match the Social Security and Medicare taxes their employees pay, which is a separate cost not deducted from the employee's paycheck.
Social Security and Medicare tax: the fixed percentages
Social Security tax is 6.2% of the employee's gross wages, but only up to a wage base limit. That limit changes each year — in 2024 it was $168,600, meaning once an employee earns that much in a calendar year, no more Social Security tax is withheld from their remaining paychecks. Medicare tax is 1.45% of all gross wages with no upper limit. An additional 0.9% Medicare tax applies to wages over $200,000 for single filers (or $250,000 for married filing jointly), though this is less common in most workplaces.
These two taxes are the easiest part of payroll calculation because the rates never change within a year and the math is simple multiplication. If an employee earns $2,000 in a week and has not hit the Social Security wage cap, you withhold $124 for Social Security (2,000 × 0.062) and $29 for Medicare (2,000 × 0.0145). The employer must also pay matching amounts — another $124 and $29 — which come from the employer's budget, not the employee's paycheck.
Federal income tax withholding: using the W-4 and IRS tables
Federal income tax withholding is more complex because it depends on three things: the employee's W-4 form (which states their filing status and number of dependents), the IRS withholding tables for the current year, and the pay frequency. The IRS publishes new tables each year, and they change based on tax law and inflation adjustments.
The process works like this: take the employee's gross pay, subtract pre-tax deductions (health insurance, 401(k) contributions, and similar items), then look up the result in the IRS table that matches their pay frequency and filing status. The table tells you the base tax amount plus a percentage to apply to income above a certain threshold. For example, a biweekly paycheck for a single filer might have a base withholding of $15 plus 12% of wages over $300. If the adjusted gross is $1,500, you would withhold $15 + (1,200 × 0.12) = $159.
The W-4 form also includes a line for "extra withholding" — an amount the employee requests to have withheld each pay period beyond what the tables require. This is common for people with multiple jobs or side income. You simply add that amount to the result from the table.
State income tax: rates and methods vary by location
State income tax withholding depends entirely on which state the employee works in. Nine states have no income tax at all (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire for most income). The remaining states use one of three approaches: a flat tax rate applied to all income, tax brackets similar to the federal system, or a combination of both.
States that use brackets publish their own withholding tables or formulas, similar to the federal system. Some states allow employees to file a state W-4 form to adjust withholding, while others do not. A few states (like Illinois and Pennsylvania) use a flat rate — for example, 3.23% in Illinois — which makes the calculation simpler but leaves less room for adjustment. You must withhold based on the state where the employee works, not where they live, unless your state has a reciprocal agreement with the employee's home state.
If you operate in multiple states, you need the withholding tables or rules for each one. Most payroll software includes these automatically and updates them when rates change.
Pre-tax and post-tax deductions: what affects which taxes
Pre-tax deductions reduce the amount subject to federal and state income tax, but not Social Security and Medicare tax. Common pre-tax deductions include health insurance premiums, dental and vision coverage, 401(k) contributions, and dependent care accounts. If an employee earns $2,000 and contributes $200 to their 401(k), you calculate federal and state income tax on $1,800, but Social Security and Medicare tax on the full $2,000.
Post-tax deductions come out after all taxes are calculated and do not reduce any tax withholding. These include garnishments, union dues (in some cases), and voluntary contributions to certain accounts. The order matters: you withhold all taxes first, then subtract post-tax deductions, to arrive at the net pay the employee receives.
Some deductions are neither pre-tax nor post-tax — they are employer-paid and never appear on the employee's paycheck at all. Examples include workers' compensation insurance and employer-paid portions of health insurance. These do not affect payroll tax calculation.
A worked example: calculating one paycheck
Here is a complete example for a biweekly paycheck. Assume an employee in Pennsylvania earning $2,500 biweekly, single filer, no dependents, contributing $150 to their 401(k), and with $50 extra federal withholding requested on their W-4.
| Step | Amount |
| Gross pay | $2,500.00 |
| Minus 401(k) (pre-tax) | −$150.00 |
| Adjusted gross for income tax | $2,350.00 |
| Federal income tax (from IRS table + $50 extra) | −$287.00 |
| Pennsylvania income tax (3.07% of $2,350) | −$72.15 |
| Social Security (6.2% of $2,500) | −$155.00 |
| Medicare (1.45% of $2,500) | −$36.25 |
| Net pay | $1,809.60 |
The employer also pays $155 in Social Security tax and $36.25 in Medicare tax as their matching contribution. These amounts do not appear on the employee's paycheck but are a real cost to the employer.
Common mistakes and how to avoid them
The most frequent error is applying pre-tax deductions to Social Security and Medicare tax. Remember: 401(k) contributions, health insurance, and similar items reduce federal and state income tax but not payroll tax. Social Security and Medicare are always calculated on the full gross wage (up to the Social Security cap).
A second common mistake is using outdated withholding tables or rates. The IRS releases new federal tables each year, usually in late fall for the following year. States update their rates and brackets on varying schedules. If you calculate payroll manually, you must check the IRS website and your state tax agency website for current tables before the year begins and whenever rates change.
A third mistake is confusing the employee's W-4 filing status with their actual tax filing status. The W-4 is only for withholding purposes and may differ from how the employee actually files taxes. Use what the W-4 says, not what you assume about their personal situation.
Finally, some employers forget that the Social Security wage base cap resets on January 1 each year. An employee who hit the cap in November will owe Social Security tax again starting in January on the new year's wages.
Frequently Asked Questions
Do I have to calculate payroll tax myself, or can I use software?
Most employers use payroll software or a payroll service because it is faster and reduces errors. However, understanding the calculation helps you verify that the software is working correctly and troubleshoot if something looks wrong. Small employers with one or two employees sometimes calculate manually using IRS tables and state resources.
What happens if I withhold the wrong amount of federal tax?
If you withhold too much, the employee receives a refund when they file their tax return. If you withhold too little, they owe money at tax time. Either way, the error is corrected when they file. However, if you consistently withhold too little, the IRS may contact you about your withholding procedures. The employee can adjust their W-4 at any time to change future withholding.
Does an employee's second job change how I calculate their payroll tax?
Not directly. You calculate that employee's payroll tax the same way you calculate anyone else's — based on their W-4 and the wages you pay them. However, if they have a second job, their total income across both jobs may push them into a higher tax bracket or cause them to owe the additional 0.9% Medicare tax. That is their responsibility to manage through their W-4 or by adjusting withholding at one or both jobs.
What if an employee is exempt from federal income tax withholding?
Some employees claim exempt status on their W-4, meaning no federal income tax is withheld from their paychecks. You still withhold Social Security and Medicare tax. The employee must meet specific IRS criteria to claim exempt status — usually having no tax liability in the prior year and expecting none in the current year. If they claim exempt incorrectly, they may owe a large amount at tax time.
How do I handle payroll tax if an employee is paid in a different state than where they live?
Withhold based on the state where the work is performed, not where the employee lives. Some states have reciprocal agreements that allow employees to pay tax to their home state instead, but you must verify this with both states' tax agencies. When in doubt, withhold for the state where the work happens and let the employee sort out any credits or adjustments on their tax return.