The basic formula: gross pay minus deductions equals taxable wages

Payroll tax calculation starts with your gross pay — the total amount your employer pays you before any deductions. From that amount, your employer subtracts certain deductions to arrive at your taxable wages. The tax is then calculated as a percentage of those taxable wages, not your full gross pay.

The deductions that reduce your taxable wages fall into two categories: pre-tax deductions (which lower the amount subject to income tax) and post-tax deductions (which do not). Pre-tax deductions include contributions to a traditional 401(k), health insurance premiums, and dependent care accounts. Post-tax deductions include Roth 401(k) contributions and wage garnishments. Social Security and Medicare taxes are calculated on gross pay with fewer deductions allowed, which is why those amounts sometimes look different from your income tax withholding.

The actual percentage withheld depends on the tax bracket your income falls into, the number of dependents you claim, and your filing status — all information you provide on Form W-4 when you start a job.

Key Takeaways

  • Federal income tax is calculated on your gross pay minus pre-tax deductions like 401(k) contributions and health insurance premiums.
  • 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.
  • Your W-4 form tells your employer how much to withhold based on your filing status, number of dependents, and other income sources.
  • State and local income taxes vary by location and are calculated separately from federal tax using similar but different rules.
  • Your employer withholds tax each pay period, but the exact amount depends on your pay frequency and how your W-4 is filled out.

How federal income tax withholding is determined

Your employer uses a withholding calculation based on the W-4 form you completed. The IRS publishes tax tables and a calculation method that employers use to determine how much federal income tax to hold from each paycheck. The calculation accounts for your filing status (single, married filing jointly, head of household, or married filing separately), the number of dependents you claim, and any additional income or jobs you report.

The withholding tables assume you will earn the same amount in every pay period for the entire year. If you are paid weekly, your employer divides your annual income into 52 periods. If you are paid biweekly, it divides into 26 periods. The tax is then calculated on that per-period amount using the tax brackets for that year. This is why changing your pay frequency or getting a raise mid-year can change your withholding amount.

You can adjust your withholding by submitting a new W-4 to your employer at any time. The form does not require your employer's permission — you can change it whenever your circumstances change, such as getting married, having a child, or taking a second job.

Social Security and Medicare tax: fixed percentages with different limits

Social Security tax is 6.2% of your gross pay, but only up to a wage cap that changes each year. In 2024, the cap is $168,600, meaning once you earn that much in a calendar year, no more Social Security tax is withheld from your paychecks for the rest of that year. Your employer also pays 6.2% on your behalf, for a total of 12.4% (if you are self-employed, you pay both portions).

Medicare tax is 1.45% of your gross pay with no wage cap — it applies to every dollar you earn. Your employer also pays 1.45%, for a total of 2.9%. Additionally, if your income exceeds certain thresholds ($200,000 for single filers, $250,000 for married filing jointly), an extra 0.9% Medicare tax is withheld from your wages. This additional tax has no employer match.

Both Social Security and Medicare taxes are withheld from your paycheck automatically and are not affected by your W-4 form. They are calculated on your gross pay before pre-tax deductions are subtracted.

State and local income tax calculations

State income tax is calculated separately from federal tax and varies significantly by location. Some states have no income tax at all (including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming). Other states use tax brackets and withholding methods similar to the federal system, while some use a flat tax rate applied to all income.

Your employer withholds state tax based on a state W-4 form (or equivalent document) that you complete. The form may ask for different information than the federal W-4 — some states ask for dependents, others do not. A few states allow you to claim additional withholding allowances that reduce your state tax.

Local income taxes exist in some cities and counties, typically in Ohio, Pennsylvania, Kentucky, and Indiana, though other areas may have them as well. Local tax is usually a small percentage and is withheld in addition to state and federal tax. Your employer will know whether your work location is subject to local tax.

How pay frequency affects the amount withheld each period

The amount withheld from each paycheck depends partly on how often you are paid. If you are paid weekly, your per-period income is lower than if you are paid monthly, so the tax calculation produces a smaller withholding amount per check — but you receive more checks per year. If you are paid monthly, each check is larger, the withholding per check is larger, but you receive fewer checks.

The total tax withheld over the year should be roughly the same regardless of pay frequency, assuming your income and W-4 stay constant. However, if you change from biweekly to weekly pay (or vice versa) without updating your W-4, your withholding may no longer match your actual tax liability. This is because the withholding tables assume a specific pay frequency.

If you change jobs or your pay frequency changes, you may want to review your W-4 to make sure your withholding is still accurate for your new situation.

Pre-tax deductions that reduce federal income tax withholding

Certain deductions are subtracted from your gross pay before federal income tax is calculated. These include contributions to a traditional 401(k) or 403(b), health insurance premiums paid through your employer, contributions to a Health Savings Account (HSA), dependent care account contributions, and commuter benefits. Because these amounts are subtracted first, they reduce the amount of income subject to federal income tax.

For example, if your gross pay is $2,000 and you contribute $200 to your 401(k), your taxable income for federal income tax purposes is $1,800. Federal income tax is calculated on $1,800, not $2,000. However, Social Security and Medicare taxes are still calculated on the full $2,000 gross pay.

Post-tax deductions like Roth 401(k) contributions, wage garnishments, and union dues do not reduce your federal income tax withholding. They are subtracted from your paycheck after taxes are calculated.

What happens if too much or too little tax is withheld

Throughout the year, your employer withholds tax based on your W-4 and pay frequency. At the end of the year, you file a tax return that calculates your actual tax liability based on your total income, deductions, and credits. If more tax was withheld than you owe, you receive a refund. If less was withheld, you owe the difference.

If you consistently owe money at tax time, you can adjust your W-4 to increase withholding. If you consistently receive a large refund, you can adjust your W-4 to decrease withholding and take home more money each pay period. The IRS provides a withholding estimator on its website to help you determine whether your current withholding is on track.

Certain life changes — marriage, divorce, a new child, a second job, or a significant change in income — are good times to review and update your W-4.

Frequently Asked Questions

Why is my Social Security tax different from my federal income tax?

Social Security tax is a fixed 6.2% of gross pay up to an annual cap, while federal income tax is calculated using tax brackets and depends on your filing status and dependents. Social Security tax is also withheld on gross pay before pre-tax deductions, whereas federal income tax is withheld on gross pay minus pre-tax deductions. This is why the two amounts rarely match.

Does my employer pay any of my payroll taxes?

Yes. Your employer pays 6.2% Social Security tax and 1.45% Medicare tax on your behalf — the same percentages you pay. These employer contributions do not appear on your paycheck but are a cost to your employer. Self-employed people pay both the employee and employer portions, totaling 15.3% for Social Security and Medicare combined.

Can I change my W-4 in the middle of the year?

Yes, you can submit a new W-4 to your employer at any time. Changes take effect on the next paycheck or within a few pay periods, depending on your employer's payroll system. If your circumstances change — such as getting married, having a child, or taking a second job — updating your W-4 can help may support the correct amount of tax is withheld for the rest of the year.

What if I have two jobs — how is tax calculated?

Each employer withholds tax independently based on the W-4 you give them. If you do not account for your second job on your W-4s, you may have too little tax withheld overall. You can reduce withholding at one job and increase it at another, or claim fewer allowances at both jobs to increase total withholding across both paychecks.

Is the tax withheld from my paycheck my final tax bill?

No. Withholding is an estimate based on your W-4 and pay frequency. Your actual tax liability is determined when you file your tax return at the end of the year. If you withheld too much, you get a refund. If you withheld too little, you owe the difference. The goal is to get as close as possible so you do not owe or receive a large refund.