Google Sheets

Payroll Template in Google Sheets: Step by Step Tutorial

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.

Finished payroll register in Google Sheets
Finished payroll register in Google Sheets

⬇️  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.

Automatic pay stub with earnings and deductions
Automatic pay stub with earnings and deductions

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.

Employees tab with pay type and rates
Employees tab with pay type and rates

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)

XLOOKUP formulas returning pay type and rate
XLOOKUP formulas returning pay type and rate

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))

Gross pay formula filled down
Gross pay formula filled down

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)

401(k), federal and state tax columns
401(k), federal and state tax columns

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

Total deductions and net pay
Total deductions and net pay

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)

Conditional formatting rules for the status column
Conditional formatting rules for the status column

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")

Summary cards and payroll status badge
Summary cards and payroll status badge

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)

Pay stub filled by XLOOKUP formulas
Pay stub filled by XLOOKUP formulas

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.

Pay stub after the missing hours are entered
Pay stub after the missing hours are entered

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.

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.

PK
Written by PK (Priyendra Kumar)
Microsoft Certified Professional with 15+ years in data analysis, dashboards and automation. Creator of PK: An Excel Expert and NeoTech Navigators on YouTube. About the author
Tested in the real tool · Last reviewed December 1, 2026
PK
Meet PK, the founder of NeotechNavigators.com! With over 15 years of experience in Data Visualization, Excel Automation, and dashboard creation. PK is a Microsoft Certified Professional who has a passion for all things in Excel. PK loves to explore new and innovative ways to use Excel and is always eager to share his knowledge with others. With an eye for detail and a commitment to excellence, PK has become a go-to expert in the world of Excel. Whether you're looking to create stunning visualizations or streamline your workflow with automation, PK has the skills and expertise to help you succeed. Join the many satisfied clients who have benefited from PK's services and see how he can take your data analysis skills to the next level!
https://neotechnavigators.com