Start with gross pay and subtract what the IRS requires
Payroll taxes are calculated from your gross pay — the total amount you earn before any deductions. The calculation itself is straightforward: you explore a tax rate to your income, then withhold that amount from your paycheck. The complexity comes from having multiple taxes to calculate at once, each with its own rate and rules.
The main payroll taxes are Social Security (6.2%), Medicare (1.45%), and federal income tax (which varies by bracket and withholding elections). If you live in a state with income tax, you'll also calculate that. Each one uses slightly different rules about what counts as taxable income and what doesn't.
Most employees never do this math themselves — their employer's payroll software handles it. But understanding the calculation helps you spot errors on your pay stub, plan for tax time, and know whether your withholding is on track.
Key Takeaways
- Social Security tax is 6.2% on wages up to a yearly cap (the cap changes annually), and Medicare is 1.45% on all wages with no cap.
- Federal income tax withholding depends on your W-4 form and your tax bracket, not a flat percentage like Social Security and Medicare.
- Your employer withholds these taxes from each paycheck and sends them to the IRS on your behalf.
- You can estimate your annual tax liability using the IRS withholding calculator, then adjust your W-4 if you're over- or under-withheld.
- Self-employed people calculate payroll taxes differently and owe both the employee and employer portions.
Social Security and Medicare: the fixed-rate taxes
Social Security and Medicare are the easiest payroll taxes to calculate because they use a flat percentage. Take your gross pay, multiply by 6.2% for Social Security, and multiply by 1.45% for Medicare. That's your employee contribution.
Social Security has a yearly wage cap — in 2024 it's $168,600, but this changes annually. Once you've earned that much in a calendar year, your employer stops withholding Social Security tax for the rest of the year. Medicare has no cap; you pay 1.45% on every dollar you earn. High earners also pay an additional 0.9% Medicare tax on income above $200,000 (single) or $250,000 (married filing jointly).
Your employer also pays matching amounts — 6.2% for Social Security and 1.45% for Medicare — but those don't come out of your paycheck. They're a separate business expense. Self-employed people have to pay both sides, which is why their calculation is different.
Federal income tax withholding: the variable piece
Federal income tax withholding is not a flat percentage. Instead, it depends on your W-4 form, your pay frequency, your filing status, and your tax bracket. Your employer uses IRS tables to look up how much to withhold based on these factors.
The W-4 is where you control your withholding. You tell your employer how many "allowances" or "dependents" you claim, and whether you have other income or jobs. Fewer allowances mean more tax withheld; more allowances mean less. If you claim zero allowances, your employer withholds the maximum. If you claim more, less comes out.
The IRS publishes withholding tables for weekly, biweekly, semimonthly, and monthly pay periods. Your payroll department looks up your gross pay and claimed allowances in the right table, then calculates the withholding. The math is mechanical once you know the inputs.
State and local income tax: varies by location
Not all states have income tax. Nine states have none: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (which taxes only dividends and interest). If you live in one of these, you skip this step.
If your state has income tax, your employer withholds it using a similar method to federal withholding — a state W-4 form, state tax tables, and your gross pay. Some states use a flat tax rate (like Colorado at 4.4%), while others use brackets like the federal system. A few states also have local income taxes on top of state tax, which your employer withholds separately.
The calculation is the same principle: gross pay times the rate or bracket, minus any state-specific deductions or credits. Your pay stub should show state and local withholding as separate line items.
How to check if your withholding is correct
The IRS Withholding Calculator is the most accurate tool. You enter your filing status, income, dependents, other jobs, and any deductions you plan to claim. The calculator tells you how much total tax you should pay for the year, then works backward to tell you whether your current withholding is on track.
You can access the calculator at irs.gov. It takes about 10 minutes and asks for information from your most recent tax return. If the calculator says you're under-withheld, you can file a new W-4 with your employer to increase withholding. If you're over-withheld, you can decrease it.
Run the calculator once a year, or whenever your life changes — a new job, marriage, divorce, a child, or a major change in income. Adjusting your W-4 mid-year is free and takes one conversation with payroll.
Self-employed payroll tax calculation
If you're self-employed, you pay both the employee and employer portions of Social Security and Medicare. That's 12.4% for Social Security (up to the yearly wage cap) and 2.9% for Medicare (no cap), plus 0.9% additional Medicare on high income. You also owe federal income tax, calculated the same way as an employee.
Self-employed people pay these taxes quarterly using Form 1040-ES. You estimate your annual net income, calculate the tax, and send it to the IRS four times a year. The due dates are April 15, June 15, September 15, and January 15 of the following year.
You can deduct half of your self-employment tax when you file your annual return, which reduces your taxable income slightly. Keep records of all income and business expenses throughout the year so you can calculate your net income accurately for each quarterly payment.
Reading your pay stub to verify the math
Your pay stub shows gross pay at the top, then lists each deduction: federal income tax, Social Security, Medicare, state income tax, and any others. The amounts should match the calculations described above. Social Security should be 6.2% of gross (up to the cap), and Medicare should be 1.45% of gross.
If you see a number that doesn't match, first check whether you've hit the Social Security wage cap for the year. If not, recalculate: multiply your gross by 0.062 for Social Security and 0.0145 for Medicare. If your numbers don't match the stub, contact your payroll department. Errors happen, and they're usually corrected quickly once flagged.
Keep several months of pay stubs so you can spot patterns. If withholding suddenly changes without a reason you understand, ask payroll why. It might be a system update, a change in your W-4, or a mistake.
Frequently Asked Questions
What if I have two jobs — do I pay payroll taxes on both?
Yes. Each employer withholds Social Security and Medicare on your wages from that job. You could end up over-withheld on Social Security if your combined income exceeds the yearly cap, because each employer withholds independently. You can claim a credit for the overage when you file your tax return, or adjust your W-4 at your second job to reduce withholding.
Can I change my withholding if I think I'm over-withheld?
Yes. File a new W-4 with your employer. You can claim more allowances to reduce withholding, or fewer to increase it. Changes take effect on your next paycheck. There's no penalty for adjusting your withholding during the year.
Do bonuses get taxed differently?
Bonuses are subject to the same payroll taxes as regular wages — Social Security, Medicare, and federal income tax. Some employers withhold a flat 22% federal income tax on bonuses, while others use the regular withholding tables. Either way, you'll reconcile any difference when you file your return.
What happens if my employer withholds the wrong amount?
If too little was withheld, you'll owe the difference when you file your return, plus interest. If too much was withheld, you'll receive a refund. You can also adjust your W-4 mid-year to correct the problem going forward. Keep records of your pay stubs to document what was withheld.
Do I have to file a W-4, or does my employer do it for me?
You file the W-4 — it's your form. Your employer doesn't fill it out for you. You complete it when you're hired and submit it to payroll. You can update it anytime if your situation changes. Your employer uses the information you provide to calculate withholding.