Payroll calculations in Excel

A payroll sheet takes hours and pay rates and turns them into gross pay, deductions, net pay and the employer's own costs. Each step is a short formula that refers to a rate table. This page builds one week of payroll step by step and explains the reasoning behind every formula.

All rates on this page and in the exercises are example rates for practice only. They are not current tax rates or tax law, and nothing here is tax advice or a way to work out anyone's actual taxes. The goal is spreadsheet skill: getting the structure and the formulas right.

Gross to net in plain English

Payroll runs on a few terms that are worth getting straight first:

A good payroll sheet keeps every rate in one table and has every formula point to it. When a rate changes, you change one cell, and the whole sheet follows.

Why this matters for MO-220 practice

The Excel for Accounting exam (MO-220) lists payroll under "Perform routine accounting activities". The skills are calculating gross and net pay for several employees, calculating the employer's payroll tax liabilities, and using functions to spot irregularities. This lesson has one exercise for each.

MO-220 task instructions describe the purpose rather than naming the function. You will see "flag any employee who worked more than 60 hours", not "use IF with OR". So the skill is to translate a business rule into the right formula. Accounting Exercises is not affiliated with Microsoft or Certiport.

Worked example: Summit Bike Repair

Summit Bike Repair runs payroll weekly. This is the week ending 6/14/2026. The example rate table sits in columns K and L:

CellExample rate table (column K)Value (L)
L4Overtime after (hours per week)40
L5Overtime pay multiplier1.5
L6Income tax withholding (example)10.00%
L7Social Security, employee and employer (example)6.20%
L8Medicare, employee and employer (example)1.45%
L9Unemployment tax, employer only (example)0.60%
L10Minimum hourly rate (example)$15.00

Employees are in rows 5 to 12, with the name in A, hours in B, hourly rate in C and pre-tax deduction percentage in D. Gross pay goes in column E.

Step 1: gross pay with overtime

An employee who works 40 hours or less is paid hours times rate. Above 40, the first 40 hours are paid at the normal rate and only the extra hours get the multiplier. That "if" turns into an IF function. In E5:

=IF(B5>$L$4,$L$4*C5+(B5-$L$4)*C5*$L$5,B5*C5)

Read it in three parts. The test asks whether hours are above the threshold. If yes, pay the threshold hours at the normal rate, then add the extra hours at the rate times the multiplier. If no, pay hours times rate. The threshold and multiplier are locked with dollar signs so every row uses the same table cells when you fill down.

For E. Haddad, 43.5 hours at $42.00:

Filled down, the column shows:

EmployeeHours (B)Rate (C)Gross pay (E)
E. Haddad43.542.001,900.50
A. Rivera43.519.75893.69
F. Larsen2125.00525.00
G. Mensah4117.00705.50
H. Ito48.516.75883.56
D. Novak44.521.25993.44
I. Petrov4032.001,280.00
B. Chen35.529.501,047.25

I. Petrov worked exactly 40 hours, so the test "more than 40" is false and there is no overtime. That edge case is a good one to check by hand.

Step 2: taxable wages, withholding and net pay

The second exercise continues with Copperleaf Studio, whose example table uses 12% withholding. Take E. Haddad there: 45 hours at $30.25, so gross pay is $1,436.88 (shown to the cent), with a 6% pre-tax deduction.

ColumnMeaningFormula in row 5E. Haddad
FTaxable wages=E5*(1-D5)1,350.67
GWithholding=F5*$L$6162.08
HNet pay=E5-E5*D5-G5-E5*($L$7+$L$8)1,078.67

Follow the money. From $1,436.88 gross, the pre-tax deduction takes $86.21. Withholding is 12% of taxable wages, $162.08. Social Security and Medicare together are 7.65% of gross pay in this example, $109.92. What is left, $1,078.67, is net pay. Note the order: withholding is based on taxable wages, after the deduction, while the example Social Security and Medicare are based on gross pay.

Step 3: employer taxes and review flags

The third exercise, for Bluebird Veterinary, looks at the employer's side. The employer pays its own share of Social Security and Medicare plus unemployment tax, all on gross pay. In F5:

=E5*($L$7+$L$8+$L$9)

Bluebird's unemployment rate in the example table is 1.20%, so the combined rate is 8.85%. For A. Rivera, gross pay of $1,650.00 gives employer taxes of $146.03. Summed with =SUM(F5:F12), the week's employer taxes are $963.36. That total is a liability until it is paid, and the bookkeeping side records it as an expense and a payable. See payroll journal entries for how these amounts are posted.

Payroll review is the last step. Bluebird wants a flag on any row where someone worked more than 60 hours or is paid below the example minimum hourly rate in L10. Either condition is enough, so the test uses OR. In G5:

=IF(OR(B5>60,C5<$L$10),"Check","OK")

Two rows come back as Check: I. Petrov, with 69.5 hours, and H. Ito, paid $14.25 an hour. Everyone else shows OK. A flag column like this doesn't decide anything. It points a person at the rows that need a second look.

Common mistakes

Each exercise is checked against these errors, and the feedback tells you which one you made.

Ignoring overtime

A plain =B5*C5 pays every hour at the regular rate. E. Haddad's gross pay drops from $1,900.50 to $1,827.00. Anyone over the threshold is underpaid.

Paying every hour at the overtime rate

The opposite slip multiplies all hours by 1.5 once the threshold is passed. E. Haddad would get 43.5 × $42.00 × 1.5 = $2,740.50. Only the hours above 40 earn the premium.

Calculating withholding on gross pay

Withholding in these exercises is based on taxable wages, after the pre-tax deduction. Using gross pay overstates it: for Copperleaf's E. Haddad, $172.43 instead of $162.08.

Leaving Social Security and Medicare out of net pay

If net pay subtracts only the deduction and withholding, it comes to $1,188.59 for E. Haddad, which is $109.92 too high. Employee payroll taxes come out of the employee's pay too.

Leaving out unemployment tax

The employer's cost includes unemployment tax on top of its Social Security and Medicare share. Without it, A. Rivera's employer taxes would be $126.23 instead of $146.03.

Flagging only when both conditions are true

Using AND instead of OR flags a row only when someone works over 60 hours and is paid below the minimum. At Bluebird, nobody meets both, so no rows are flagged, and both real problems are missed.

How to check your payroll sheet

Related topics: payroll journal entries shows how gross pay, withholdings and employer taxes are recorded, and accrued expenses adjusting entries covers wages earned but not yet paid at period end.

Frequently asked questions

How do I calculate overtime pay in Excel?

Use IF to test whether hours are above the threshold. If they are, pay the threshold hours at the normal rate and the extra hours at the rate times the overtime multiplier. If not, pay hours times rate. Keep the threshold and multiplier in table cells and lock them with dollar signs.

What is the difference between gross pay and net pay?

Gross pay is what the employee earned before anything is taken out. Net pay is what they receive after deductions, withholding and employee payroll taxes are subtracted.

Are the tax rates in these exercises real?

No. They are example rates for practice only. They are not current tax law and not tax advice, and you should not use them to work out actual payroll taxes. The exercises teach the spreadsheet structure and formulas.

How do I flag rows that need review?

Combine IF with OR when any one condition should trigger the flag, for example =IF(OR(B5>60,C5<$L$10),"Check","OK"). Use AND only when every condition must be true at once.

Why do the formulas use dollar signs?

The rate table cells, such as $L$4 and $L$6, must stay the same on every row. Dollar signs make those references absolute, so they don't shift when you fill the formula down. The employee's own cells, such as B5 and C5, stay relative so each row uses its own hours and rate.

Is this good MO-220 practice?

Yes. Gross and net pay, employer payroll tax liabilities and spotting irregularities are all listed under the exam's payroll skill. The tasks describe the purpose rather than the function, as the exam does. They are not official exam content.

Practice it now: Payroll: gross to net

A free exercise with new numbers every time. No sign-up.

Start the free exercise