This tutorial builds a payroll template in Google Sheets for a fictional landscaping company in Boise with 12 employees. It calculates overtime, tax withholding and net pay, flags a missing timesheet, and fills a pay stub from a drop-down. The tax rates are practice examples, not tax advice.

⬇️ Download Free from NextGenTemplates👥 Join Free on Skool & Download
Both are free · same practice file · pick the one you like
Free Google Sheet · opens the Make a copy screen
Watch the video tutorial
The video shows the finished payroll first, then builds every formula on the practice tabs and ends with a live test.
What you will build
For the pay period from 11/09/2026 to 11/22/2026 the finished sheet shows $22,756.66 total gross pay, $15,973.28 net pay, $24,497.54 employer cost, $955.13 overtime pay and 11 employees paid, with one timesheet still missing.

The starting data
The Employees tab holds each person’s pay type, rate, 401(k) percent, a flat federal withholding estimate and the health premium. The Payroll tab already has the names and hours.

Step 1: Pay type and rate with XLOOKUP
Enter these in C16 and D16, press F4 to lock the ranges, then fill down to row 27.
=XLOOKUP($B16,Employees!$B$4:$B$15,Employees!$D$4:$D$15)
=XLOOKUP($B16,Employees!$B$4:$B$15,Employees!$E$4:$E$15)

Step 2: Gross pay and overtime
Salaried staff get the annual salary divided by 26 pay periods. Hourly staff get regular pay plus overtime at 1.5 times the rate.
=IF(C16="Salary",ROUND(D16/26,2),ROUND(D16*E16+D16*1.5*F16,2))

Step 3: 401(k), federal and state tax
The 401(k) comes out first, so federal and state tax use the smaller amount.
=ROUND(G16*XLOOKUP($B16,Employees!$B$4:$B$15,Employees!$F$4:$F$15),2)
=ROUND((G16-H16)*XLOOKUP($B16,Employees!$B$4:$B$15,Employees!$G$4:$G$15),2)
=ROUND((G16-H16)*$H$8,2)

Step 4: Social Security, Medicare, health and net pay
Social Security and Medicare use gross pay. No health premium is taken when nothing is paid.
=ROUND(G16*$J$8,2)
=ROUND(G16*$L$8,2)
=IF(G16=0,0,XLOOKUP($B16,Employees!$B$4:$B$15,Employees!$H$4:$H$15))
=SUM(H16:M16)
=G16-N16

Step 5: Status, totals and colors
The status column marks any hourly employee without hours. Add a total row in row 28 with SUM, then two conditional formatting rules for the status text.
=IF(AND(C16="Hourly",E16=""),"MISSING HOURS","OK")
=SUM(G16:G27)

Step 6: Summary cards and payroll status
These go in B11, D11, G11, J11, M11 and O11.
=G28
=O28
=ROUND(G28*(1+$J$8+$L$8),2)
=ROUND(SUMPRODUCT((C16:C27="Hourly")*D16:D27*1.5*F16:F27),2)
=COUNTIF(G16:G27,">0")
=IF(COUNTIF(P16:P27,"MISSING HOURS")=0,"PAYROLL READY TO RUN",COUNTIF(P16:P27,"MISSING HOURS")&" TIMESHEET MISSING")

Step 7: The pay stub
Add a drop-down from the employee names in C8. One formula in C13 fills the five earnings lines, one in F13 fills the seven deduction lines, and two more in E21 and C24 return net pay and status.
=TRANSPOSE(XLOOKUP(C8,Payroll!B16:B27,Payroll!C16:G27))
=TRANSPOSE(XLOOKUP(C8,Payroll!B16:B27,Payroll!H16:N27))
=XLOOKUP(C8,Payroll!B16:B27,Payroll!O16:O27)
=XLOOKUP(C8,Payroll!B16:B27,Payroll!P16:P27)

Test it with the missing timesheet
Type 80 regular hours and 6 overtime hours for Tyler Brooks. The badge turns green, 12 employees are paid, total gross pay becomes $25,115.16, and Tyler’s net pay is $1,614.96.

Functions used
| Job | Functions |
|---|---|
| Pull employee settings | XLOOKUP |
| Pay and deductions | IF, ROUND, SUM |
| Checks and cards | AND, COUNTIF, SUMPRODUCT |
| Pay stub | XLOOKUP, TRANSPOSE |
Download the free practice file
Make your own copy and build along. The solution tabs are included.
⬇️ Download Free from NextGenTemplates👥 Join Free on Skool & Download
Both are free · same practice file · pick the one you like
Free Google Sheet · opens the Make a copy screen
Want it ready to use?
The Payroll Calculator and Payslip Generator in Google Sheets is a ready-made template on Next Gen Templates.
- Grant tracker in Google Sheets
- Sales CRM in Google Sheets
- Sales tracker in Google Sheets
- Google reference: XLOOKUP function
To go further, join the Google Sheets Complete Course on Next Gen Templates Academy. Code BF40 gives 40% off until 1 December 2026, 23:59 IST.
Frequently asked questions
How do I make a payroll template in Google Sheets?
Keep employee rates on one tab, type the hours on a payroll tab, and use XLOOKUP, IF, ROUND and SUM to calculate gross pay, deductions and net pay.
How is overtime calculated in this sheet?
Hourly staff get the rate times regular hours, plus the rate times 1.5 times overtime hours. Type the weekly overtime total, which in the United States means hours over 40 in each week.
Does a 401(k) contribution lower Social Security tax?
No. In this sheet the 401(k) lowers the federal and state tax base, while Social Security and Medicare are calculated on gross pay.
Can I use the tax rates in my own payroll?
No. The rates are practice examples. Use IRS Publication 15-T, your state rules or your payroll provider for real withholding.
How does the pay stub fill itself?
A drop-down picks the employee, and XLOOKUP returns that row from the payroll tab. TRANSPOSE turns the row into a column.
Is the practice file free?
Yes. Use the copy button on this page to make your own copy in Google Drive.
Conclusion
An employee settings tab, a handful of rounded formulas and one status check turn a payroll sheet into something you can review before payday. Replace the practice rates with your own verified rates before using it.
More Google Sheets tutorials
- Grant Tracker in Google Sheets: Step by Step Tutorial
- Sales CRM in Google Sheets: Lead Tracker, Pipeline Stages & Follow-Up Alerts (Free Template)
- Sales Tracker in Google Sheets: Daily Log, Monthly Report & Rep Targets (Free Template)
- Employee Skills Matrix in Google Sheets: Heatmap, Skill Gaps & Training Plan
- Purchase Order Tracker in Google Sheets: Free Template with Overdue Alerts
- Gantt Chart in Google Sheets: Auto Timeline, Progress Bars & Today Line (Free Template)

