What payroll taxes are and why you calculate them

Payroll taxes are the amounts withheld from an employee's paycheck and the amounts an employer pays on top of wages. You calculate them because they fund Social Security, Medicare, and federal and state income tax systems. If you run a business with employees, you must withhold the correct amounts and send them to the IRS and your state — getting the math wrong creates penalties and back-tax bills that compound quickly.

The calculation itself is straightforward once you know which tax applies to which employee, what their gross pay is, and what deductions or exemptions they have claimed. Most payroll software does this automatically, but understanding the steps helps you catch errors, answer employee questions, and know what you owe before a payment is due.

Key Takeaways

  • Federal income tax withholding depends on the W-4 form the employee filed, their gross pay, and the pay frequency — use the IRS withholding tables or Publication 15-T to find the amount.
  • Social Security tax is 6.2% of gross pay up to an annual wage cap (the cap changes each year), and Medicare tax is 1.45% of all gross pay with no cap.
  • Employers pay a matching amount for Social Security and Medicare, plus federal and state unemployment taxes, which are not withheld from employee paychecks.
  • State income tax withholding varies by state and depends on the employee's W-4 state form and state tax tables, which you must obtain from your state revenue department.
  • The order of calculation matters: start with gross pay, subtract pre-tax deductions, calculate federal and state income tax, then subtract Social Security and Medicare.

Step 1: Determine the employee's gross pay

Gross pay is the total amount earned before any deductions. For a salaried employee, divide the annual salary by the number of pay periods in a year. For an hourly employee, multiply the hourly rate by the hours worked in the pay period, including any overtime at the appropriate rate.

Example: An employee earning $52,000 per year paid biweekly has a gross pay of $2,000 per pay period ($52,000 ÷ 26). An hourly employee working 40 hours at $18 per hour has a gross pay of $720 for that week.

If the employee has pre-tax deductions — such as contributions to a traditional 401(k), health insurance premiums, or dependent care accounts — subtract those from gross pay to get the amount subject to federal income tax withholding. Social Security and Medicare are calculated on the full gross pay before these deductions.

Step 2: Calculate federal income tax withholding

Federal income tax withholding is based on three pieces of information: the employee's W-4 form (Form W-4, Employee's Withholding Certificate), their gross pay, and the pay frequency. The IRS publishes withholding tables in Publication 15-T that show you exactly how much to withhold for each combination.

The W-4 form tells you the employee's filing status (single, married, head of household, etc.), how many dependents they claim, and whether they want extra withholding. Employees file a new W-4 when they start a job and can update it anytime their situation changes — marriage, a second job, a child born, or a change in tax liability.

To use the IRS tables: locate the table that matches the pay frequency (weekly, biweekly, semimonthly, monthly). Find the row that covers the employee's gross pay range and the column that matches their filing status and dependent claims. The number in that cell is the federal income tax to withhold. If the employee requested extra withholding on their W-4, add that amount to the table result.

The IRS updates these tables annually, usually in late fall for the following year. You can find Publication 15-T on the IRS website or request it from your tax software provider.

Step 3: Calculate Social Security and Medicare taxes

Social Security tax is 6.2% of gross pay, but only up to an annual wage cap. The cap changes each year — for 2024, it is $168,600, meaning once an employee's year-to-date gross pay reaches that amount, you stop withholding Social Security tax for the rest of the year. Medicare tax has no cap.

Medicare tax is 1.45% of all gross pay with no upper limit. Additionally, employees earning over a certain threshold pay an extra 0.9% Medicare tax — this threshold is $200,000 for single filers and $250,000 for married filing jointly. You withhold this additional tax once the employee's year-to-date pay crosses the threshold.

Example: An employee with year-to-date gross pay of $165,000 receives a paycheck for $4,000. Social Security tax is $4,000 × 6.2% = $248, but only $3,600 of the $4,000 is subject to Social Security tax (because $165,000 + $4,000 = $169,000, which exceeds the $168,600 cap). So you withhold $3,600 × 6.2% = $223.20. Medicare tax is $4,000 × 1.45% = $58.

Your payroll software tracks year-to-date pay automatically and stops withholding Social Security tax when the cap is reached. If you calculate by hand, keep a running total of each employee's gross pay through the year.

Step 4: Calculate state income tax withholding

State income tax withholding varies significantly by state. Some states have no income tax at all (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming). Others use a flat tax rate, and still others use progressive brackets similar to federal tax.

To calculate state income tax, you need the employee's state W-4 form (or equivalent document — some states call it a DE-4 or IT-4) and your state's withholding tables or instructions. Contact your state revenue or taxation department to obtain the current tables and instructions for your state. Many states post these online; others require you to request them.

The calculation process is similar to federal withholding: find the table for your pay frequency, locate the row matching the employee's gross pay, and read across to the column matching their filing status and claimed dependents. Some states also allow employees to request additional withholding.

If an employee works in one state but lives in another, you typically withhold for the state where they work, not where they live. Employees in states with no income tax still file W-4s in states where they work if that state has income tax.

Step 5: Calculate employer payroll taxes

Employer payroll taxes are not withheld from the employee's paycheck — they are a cost to the business. You must calculate and pay these separately to the IRS and your state.

Employer Social Security tax is 6.2% of each employee's gross pay up to the annual wage cap, matching the employee's withholding. Employer Medicare tax is 1.45% of all gross pay with no cap, also matching the employee's withholding. Additionally, employers pay an extra 0.9% Medicare tax on employee wages over the threshold mentioned above.

Federal Unemployment Tax (FUTA) is 6.0% of the first $7,000 of each employee's annual gross pay. However, you receive a credit of up to 5.4% if you pay state unemployment tax on time, reducing your federal rate to 0.6% in most cases. This tax is paid only by the employer, not withheld from employees.

State Unemployment Tax (SUTA) varies by state and by industry. Rates typically range from 0.1% to 5.4% of gross pay, with a wage base cap that varies by state. New employers often pay a higher rate until they establish a history. Contact your state unemployment insurance office for your rate and wage base.

Example: For an employee with $4,000 gross pay, employer Social Security is $4,000 × 6.2% = $248, employer Medicare is $4,000 × 1.45% = $58, and federal unemployment (at 0.6% after credit) is $4,000 × 0.6% = $24 (only if year-to-date pay is under $7,000).

Putting it all together: A complete payroll calculation example

Here is a full example showing all the steps in order. Employee: Sarah, single, no dependents, paid biweekly, $52,000 annual salary, contributes $200 per pay period to her 401(k), year-to-date gross pay is $8,000 (this is her second paycheck).

ItemAmount
Gross pay (biweekly)$2,000.00
Pre-tax 401(k) deduction–$200.00
Taxable income for federal withholding$1,800.00
Federal income tax (from IRS tables)–$156.00
Social Security tax (6.2% of $2,000)–$124.00
Medicare tax (1.45% of $2,000)–$29.00
State income tax (varies by state)–$80.00
Net pay to employee$1,411.00
Employer costs (not withheld from employee)
Employer Social Security (6.2% of $2,000)$124.00
Employer Medicare (1.45% of $2,000)$29.00
Federal unemployment (0.6% of $2,000)$12.00
State unemployment (varies by state)$40.00
Total employer payroll tax$205.00

Sarah receives $1,411 in her paycheck. You owe the IRS and your state a total of $389 in withheld taxes plus $205 in employer taxes. Payroll software calculates all of this automatically and tracks year-to-date amounts so you know when Social Security and unemployment wage caps are reached.

Common mistakes to avoid

The most common error is using outdated withholding tables or W-4 forms. The IRS updates tables annually, and employees should file new W-4s when their situation changes. Using last year's table or an old W-4 can cause significant over- or under-withholding.

Another frequent mistake is calculating Social Security tax on pay above the annual wage cap. Once an employee's year-to-date gross pay reaches the cap, stop withholding Social Security tax when ready. Continuing to withhold creates an overpayment that the employee must claim on their tax return.

Confusing which taxes are withheld from the employee and which are paid by the employer causes payroll errors. Remember: federal and state income tax, Social Security, and Medicare are all withheld from the employee's paycheck. FUTA and SUTA are employer-only costs. Pre-tax deductions reduce the amount subject to federal income tax but not Social Security or Medicare.

Failing to update state withholding tables when your state changes its tax law or rates can result in incorrect withholding. Check your state revenue department's website annually for updates, usually in late fall or early winter.

Frequently Asked Questions

Do I have to use payroll software, or can I calculate taxes by hand?

You can calculate by hand using IRS Publication 15-T and your state's withholding tables, but it is error-prone and time-consuming, especially with multiple employees or when wage caps are reached. Payroll software is inexpensive and tracks year-to-date amounts automatically, reducing mistakes and the time spent on calculations.

What happens if I withhold the wrong amount of federal income tax?

If you withhold too much, the employee receives a refund when they file their tax return. If you withhold too little, they owe tax when they file. Either way, the employee bears the consequence, not you — but persistent under-withholding can trigger IRS penalties against your business for not following withholding rules. Use the current IRS tables and the employee's current W-4 to stay compliant.

When does the Social Security wage cap reset each year?

The Social Security wage cap resets on January 1 of each year. The IRS announces the new cap in October of the prior year. Once an employee's year-to-date gross pay reaches the cap, you stop withholding Social Security tax for the remainder of that calendar year, even if they continue working.

Do I withhold payroll taxes for an independent contractor?

No. Independent contractors are responsible for their own taxes. You do not withhold federal income tax, Social Security, Medicare, or unemployment taxes. Instead, you issue them a Form 1099-NEC at the end of the year if you paid them $600 or more. The contractor pays self-employment tax (Social Security and Medicare) when they file their own tax return.

What if an employee claims exempt on their W-4?

If an employee claims exempt status on their W-4, you do not withhold federal income tax from their paycheck. However, you still withhold Social Security, Medicare, and state income tax. Exempt status is rare and applies mainly to students or others with no tax liability. The employee must file a new W-4 each year to maintain exempt status.