Build a Simple Payroll Calculator in Excel
By ExcelReady TeamUpdated 6 min read
The short answer
To do simple payroll in Excel, list each employee's hours and hourly rate, then calculate gross pay with overtime. Look up a tax rate from a band table with VLOOKUP and TRUE for an approximate match, multiply, and round to cents with ROUND. Net pay is gross minus deductions. Real tax rules vary, so use your official tables.
Key takeaways
- Gross pay = regular hours × rate + overtime hours × rate × 1.5, using MIN and MAX to split the hours.
- VLOOKUP with TRUE finds the right band in a sorted tax table: the largest From value that is not above the pay.
- Wrap money results in ROUND(..., 2) so each line is in cents and the totals add up.
- Keep rates and bands in a separate table, so a rule change means editing one cell.
On this page+
Simple payroll in Excel takes hours and rates and turns them into gross pay, deductions and net pay for each person. One table holds the employees, a second table holds the rates and bands, and VLOOKUP and ROUND connect them. This guide builds a weekly payroll sheet for a small team. The tax bands are made-up examples to show the method: always use the official rates for your country.
How the payroll sheet is laid out#
Keep employee data on the left and the rules on the right. The finished sheet looks like this:
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Employee | Hours | Rate | Gross | Tax | Net |
| 2 | Ana | 38 | 22.50 | 855.00 | 85.50 | 769.50 |
| 3 | Ben | 44 | 18.00 | 828.00 | 82.80 | 745.20 |
| 4 | Chen | 40 | 31.00 | 1,240.00 | 186.00 | 1,054.00 |
| 5 | Dina | 46 | 26.40 | 1,293.60 | 194.04 | 1,099.56 |
And the withholding table in H1:I5:
| H | I | |
|---|---|---|
| 1 | From | Rate |
| 2 | 0 | 5% |
| 3 | 500 | 10% |
| 4 | 1,000 | 15% |
| 5 | 2,000 | 20% |
Only hours, rates and the band table are typed in. Gross, tax and net are formulas.
Step 1: Calculate gross pay with overtime#
Gross pay is regular hours at the normal rate plus overtime hours at a higher rate. This example pays 1.5 times the rate for hours over 40 in a week. Your rules may differ.
Split the hours first. Regular hours are the smaller of the hours worked and 40, and overtime is anything above 40:
=MIN(B2,40)
=MAX(0,B2-40)Then combine them in D2:
=ROUND(MIN(B2,40)*C2+MAX(0,B2-40)*C2*1.5,2)For Ben, that's 40 × 18 = 720 plus 4 × 27 = 108, so 828.00. For Ana, who worked 38 hours, the overtime part is 0 and gross is 855.00. Fill the formula down with Ctrl+D (Mac: ⌘D). The guide to calculating hours worked and overtime covers turning start and end times into hours.
Step 2: Look up the tax rate with VLOOKUP approximate match#
A band table lists the lower limit of each band in the first column, sorted from smallest to largest. VLOOKUP with TRUE as its last argument finds the largest value that is not bigger than the pay, which is exactly the band the pay falls in.
In E2:
=ROUND(D2*VLOOKUP(D2,$H$2:$I$5,2,TRUE),2)How it works for Chen's 1,240.00:
- VLOOKUP looks down H2:H5 for 1,240. There's no exact match.
- The largest value not above 1,240 is 1,000, so it uses that row.
- It returns the rate from column 2 of the table: 15%.
- 1,240 × 15% = 186.00, and ROUND keeps it to cents.
The $ signs lock the band table so it stays put when you fill down. The first column must be sorted ascending, or VLOOKUP returns wrong rates without any warning. Practise VLOOKUP approximate match to see how it walks down a sorted table, and read the VLOOKUP function guide for every argument.
Step 3: Calculate net pay#
Net pay is gross pay minus every deduction. With only tax, F2 is:
=D2-E2Ana takes home 769.50. If you have other deductions, such as a pension or benefit contribution, give each its own column and subtract them all: =D2-SUM(E2:G2). Keep each deduction's rate in a cell next to the band table rather than typing it into the formula.
Step 4: Round every money result#
Round each money result to two decimals at the step where you calculate it. Payroll deals in cents, and unrounded values can hide fractions that add up to a visible difference in the totals.
The rule of thumb:
- Round gross, tax and each deduction with
ROUND(..., 2). - Don't round net pay separately. It's the difference of rounded numbers, so it's already in cents.
- Don't rely on cell formatting. Formatting only changes what you see; the full value stays in the cell and flows into totals.
The ROUND function guide and the rounding lesson explain ROUND, ROUNDUP and ROUNDDOWN. Some rules round tax down rather than to the nearest cent, so check yours.
Step 5: Handle progressive tax bands#
Many real tax systems are progressive: each rate applies only to the part of pay inside its band, not to the whole amount. The flat-band lookup above is simpler, but it can make a small pay rise reduce take-home pay. For a progressive system, add a Base column with the tax due at the start of each band.
| From | Base tax | Rate on pay above From |
|---|---|---|
| 0 | 0 | 0% |
| 500 | 0 | 10% |
| 1,000 | 50 | 20% |
| 2,000 | 250 | 30% |
Tax is the base for the band plus the rate times the amount above the band's start. If this table is in H2:J5:
=ROUND(VLOOKUP(D2,$H$2:$J$5,2,TRUE)+(D2-VLOOKUP(D2,$H$2:$J$5,1,TRUE))*VLOOKUP(D2,$H$2:$J$5,3,TRUE),2)For 1,240.00, that's 50 + (1,240 − 1,000) × 20% = 98.00. Each VLOOKUP finds the same row and returns a different column.
Step 6: Add totals and checks#
Totals help you check the payroll before anyone is paid. Under the table, total each money column:
=SUM(D2:D5)Gross is 4,216.60, tax 548.34 and net 3,668.26. A quick check is =SUM(D2:D5)-SUM(E2:E5)-SUM(F2:F5), which must be 0. If it isn't, a formula wasn't filled down.
To show decimal hours as hours and minutes on payslips, INT and MOD split 7.75 into 7 hours and 45 minutes; see the guide to MOD and INT in Excel. For sales staff paid partly on results, the commission calculator in Excel uses the same VLOOKUP band method. And for another money model with ROUND on every row, see the loan amortization schedule.
Practise it#
Try the exercise on this page: look up a band rate with VLOOKUP and TRUE, then round the tax. Next, practise VLOOKUP approximate match in a live spreadsheet with band tables like this one, and practise ROUND, ROUNDUP and ROUNDDOWN so every payroll line comes out to the cent.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Dina's gross pay is in B2. The table in D1:E5 shows a simplified withholding rate for each pay band. In C2, look up her rate with VLOOKUP approximate match (TRUE), multiply it by her gross pay and round to 2 decimals with ROUND.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Rate | |||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Tip: VLOOKUP(B2,D2:E5,2,TRUE) returns the rate for the band. Multiply B2 by it, then wrap everything in ROUND(..., 2).
Practise this in a lesson
Frequently asked questions
Can I do payroll in Excel?
For a small team, yes: a sheet can calculate gross pay, deductions and net pay with a few formulas. You still need to follow your local tax and employment rules, and many businesses use payroll software once they grow.
How do I look up a tax rate by pay band in Excel?
Put the lower limit of each band in the first column of a table, sorted from smallest to largest, and the rate in the next column. Then use =VLOOKUP(pay,table,2,TRUE) to return the rate for the band the pay falls in.
How do I calculate overtime pay in Excel?
Split the hours with =MIN(B2,40) for regular hours and =MAX(0,B2-40) for overtime. Then multiply regular hours by the rate and overtime hours by the rate times 1.5, and add them.
Why do my payroll totals differ by a cent?
Unrounded values can hide fractions of a cent that add up across rows. Round each money result with ROUND(...,2) so the visible numbers and the totals match.