The four jobs
Payroll template Google Sheets: the four jobs it has to do
Hours times rate is the first formula anyone writes for payroll, and it is right for exactly as long as nobody works a long week. Every payroll template Google Sheets users pass around has to do four jobs, in order: hours worked, gross pay with overtime done properly, net pay after what comes off, and what the pay run costs the business on top. Most sheets get the first job right and guess at the other three.
Our free Payroll Template does all four on the federal rules, and the sections below walk through each formula in it, so you can check it or build your own.
The one input the file leaves to you is the income tax withheld, because it is the one number a template cannot fill in. Every formula below is the one in the file, recalculated to the cent against the examples on this page. The rules are the federal ones, cited to the IRS and the Department of Labor; state rules are not covered here, and none of this is tax or legal advice.
Overtime
Overtime counts per workweek, not per pay period
The federal rule is short. Covered employees who are not exempt get at least one and a half times their regular rate for hours over 40 in a workweek. The Department of Labor defines the workweek as a fixed and regularly recurring period of 168 hours, seven days in a row, and it is just as clear that averaging hours over two or more weeks is not permitted.
That second sentence is where biweekly payroll sheets go wrong. Take Dana, an example employee paid $22 an hour every two weeks, who works 44 hours one week and 36 the next. The pay period adds up to exactly 80 hours, so a sheet that tests the period against 80 finds no overtime at all. Tested week by week, the first week has 4 overtime hours.
| How the sheet counts | Overtime hours | Gross pay |
|---|---|---|
| Per pay period: 80 hours against 80 | 0 | $1,760.00 |
| Per workweek: 44 hours, then 36 | 4 | $1,804.00 |
The $44 gap is the extra half on those 4 hours. So the sheet keeps one row per person per workweek on a Weeks tab, and the pay run adds the weeks up. Overtime hours on each row are =MAX(0, D2-Rates!$B$9), with the hours in D and 40 in one labelled cell on a Rates tab, so nothing is typed into two hundred formulas. Our Excel timesheet guide covers that split from the timesheet side, and it works the same in Sheets.
The regular rate
Overtime pay is half the regular rate on top
Time and a half is worked out on the regular rate, which is not always the hourly rate on the offer letter. The Department of Labor’s formula is the pay for the workweek, less a few exclusions the law lists, divided by the hours worked in it, and all pay for hours worked, services or performance goes in. A bonus can stay out only when both the decision to pay it and the amount are made at or near the end of the period, with no earlier promise. A bonus announced in advance for hitting a target goes in.
Here is what that does to a week. Dana works 45 hours at $22 and earns a $90 bonus promised for the week’s target. Straight time is 45 times $22 plus the $90, which is $1,080. The regular rate is $1,080 divided by 45, so $24.00, and the extra half on 5 overtime hours is 5 times $12, or $60.00. Gross pay is $1,140.00. Paying 5 hours at $33 and adding the bonus afterwards gives $1,135.00, five dollars short.
=ROUND(0.5*I2*G2,2)
The overtime extra, in J2 on the Weeks tab: hours in D, hourly rate in E, promised bonus in F, overtime hours in G, straight-time pay in H as =D2*E2+F2 and the regular rate in I as =IF(D2>0, H2/D2, 0). Gross for the week is =ROUND(H2,2)+J2. With no bonus it pays the same as overtime hours times rate times 1.5.
Formula reviewed 18 November 2026
Keep that extra half in its own column instead of folding it into one overtime figure. The IRS explains in Publication 15-T that for 2025 to 2028 employees can deduct qualified overtime compensation, which it defines as the “half” portion of time and a half, and that employers must report it and give each employee a statement showing it. The column is that figure, ready for whoever prepares the year-end forms. It is still generally subject to Social Security and Medicare, so it counts in gross like everything else.
Gross to net
From gross pay to net: what comes off, and from where
In this payroll template Google Sheets layout, a second tab, Pay run, takes one row per person per pay date. Gross is the sum of that person’s weeks for the date, =SUMIFS(Weeks!$K:$K, Weeks!$A:$A, A2, Weeks!$B:$B, B2), with the pay date in A and the name in B. Then come the deductions, and the federal ones split into two kinds: the ones a formula can work out, and the one it cannot.
Reference
The Rates tab, line by line
The federal figures a payroll sheet needs for 2026, and the cell each one lives in. B1 holds the tax year: the free copy ships set for 2027, so for a 2026 pay date set B1 to 2026 and B3 to 184,500, and before the first 2027 run check B3 against the wage base in the 2027 Publication 15.
i. Comes off the paycheck
ii. Paid by the business on top
7 lines4 withheld · 3 paid by the employer
Why year-to-date pay matters: Social Security stops for the year once a person’s pay reaches the wage base, Additional Medicare starts past $200,000, and FUTA stops at $7,000. Each needs to know what the person was paid earlier in the year.
Rates from IRS Topic 751 and Topic 759, checked 18 November 2026 at irs.gov
We build spreadsheets; we do not practise payroll or tax. These are the federal figures for 2026, your state adds its own, and anything unusual is worth a call to your accountant or payroll provider.
The wage base is the reason a payroll spreadsheet template needs one column most leave out: what the person was paid earlier in the same year. This one goes in D on the Pay run tab, and it works whatever order the rows are in.
=SUMIFS($C:$C,$B:$B,B2,$A:$A,"<"&A2,$A:$A,">="&DATE(YEAR(A2),1,1))
Year-to-date gross before this run: the same person’s gross on earlier pay dates since 1 January of this run’s year. Dana’s second pay run reads $1,804.00 here, the first run’s gross.
Formula reviewed 18 November 2026
Social Security then taxes only the part of this run still under the wage base, which is the one formula on the tab with a real edge to it:
=ROUND(MIN(C2,MAX(0,Rates!$B$3-D2))*Rates!$B$2,2)
Social Security in E2: gross in C, year to date in D, the wage base in Rates B3 and 6.2% in B2. On 2026 rates, someone at $183,000 before a $3,000 run pays on $1,500, which is $93.00; at $199,000 they pay nothing.
Formula reviewed 18 November 2026
Medicare is plain, =ROUND(C2*Rates!$B$4, 2). Additional Medicare only wakes up past $200,000, =ROUND(MAX(0, D2+C2-MAX(Rates!$B$6, D2))*Rates!$B$5, 2), so a $3,000 run that starts at $199,000 withholds $18.00 on the $2,000 above the line. Our formulas treat every dollar of gross as a Medicare wage; the IRS keeps a chart in Publication 15 of payments that are treated differently, so if anyone has benefits taken out before tax, let your provider confirm the taxable figure.
Federal income tax is the column no formula should fill. The IRS tells employers to work it out from the employee’s Form W-4 with the method and tables in Publication 15-T, and the 2026 tables were updated for the changes in P.L. 119-21, the One Big Beautiful Bill Act. Type the figure from your payroll provider, or work it out from Publication 15-T for that person’s W-4. A flat percentage for income tax is the one number a payroll sheet should never guess. State and local income tax and other deductions are typed the same way, and net pay is gross minus all of them, =C2-SUM(E2:J2).
A flat percentage for income tax is the one number a payroll sheet should never guess.
On Dana’s first pay run that reads: gross $1,804.00, Social Security $111.85, Medicare $26.16, and $1,665.99 left before income tax and any other deductions come off.
Employer cost
What one pay run costs the business
Gross pay is what the employee earns, not what the business pays. On top come the employer’s own 6.2% and 1.45%, and federal unemployment tax, which the IRS is clear employees never pay and never have withheld. FUTA runs to the first $7,000 of each person’s pay in the year, so it uses the same year-to-date column: =ROUND(MIN(C2, MAX(0, Rates!$B$8-D2))*Rates!$B$7, 2) in L, at 0.6% if you qualify for the full credit. Employer cost is then =C2+E2+F2+L2, plus whatever your state charges for unemployment.
For Dana’s first run that is $1,804.00 plus $111.85, $26.16 and $10.82, or $1,952.83 before state unemployment: about 8% over gross pay. Budget on that figure, not the pay rate. And if you pay every two weeks, budget for the occasional year with 27 paydays in it; our guide to years with 53 weeks covers why some years carry an extra one.
Records
What a payroll register template has to keep
A payroll register template is also your record, and the Department of Labor lists what it must hold for each worker who is not exempt. Most of it is already in the two tabs:
- On the Weeks tab: the day and time each workweek begins, hours worked each workweek, the basis of pay and regular hourly rate, straight-time earnings and overtime earnings for the workweek.
- On the Pay run tab: every addition to or deduction from wages, the wages paid each pay period, and the date of payment with the period it covers.
- Not in a pay sheet: hours worked each day, which belong on the timesheet, and the person’s full name, Social Security number, address, occupation, sex, and birth date if under 19. Keep those in a separate file that only the people who run payroll can open.
Keep payroll records at least three years and the timecards and rate tables behind them at least two, by the Department of Labor’s rules. The IRS asks for employment tax records for at least four years after you file the fourth quarter for the year. A Google Sheet keeps that easily; the job is making sure nobody deletes last year’s rows to tidy up.
The handover
Where a payroll spreadsheet stops
Everything above works out pay. None of it pays the government. Employers deposit the tax they withhold and their own share, report it on employment tax returns such as Form 941 each quarter and Form 940 for unemployment tax each year, and file a Form W-2 for every employee at the end of the year. A Google Sheets payroll template can feed those numbers; it cannot file them or tell you when they are due.
That makes the line fairly easy to draw. A sheet suits a few hourly people in one state, paid on a fixed schedule, with someone who runs it and checks it against the pay stubs. Hand over to payroll software or an accountant when people work in more than one state, when anyone is salaried and you are not sure whether they are exempt from overtime, when benefits come out before tax, when a garnishment order arrives, or the first time you are not sure whether a payment counts as wages. A payroll calculator spreadsheet is a fine way to check a provider’s figures, too: run the same pay period through both and compare.
If you would rather start from a finished file, our PTO Tracker, Payroll & Employee Records Spreadsheet ($49, Google Sheets and Excel) has a payroll register with one line per person per pay run: regular and overtime hours, overtime at your multiplier, bonus, deductions, gross and net, with salaried pay filled in from the pay frequency. Like this page, it leaves withholding for you to type from your provider or the tables, and a bonus promised in advance goes into the overtime rate, so Dana’s 45-hour week pays $1,140.00 there too. If the same person runs leave, our PTO tracker guide covers accrual per pay period.
If scheduling is the harder part, our Staff Schedule & Timesheet ($39, Google Sheets and Excel) builds the rota, records the hours worked and gives regular and overtime hours and gross pay per person for the pay period, with overtime counted inside each workweek, so a pay period that splits a week still pays it right. For clock times and rounding, our timesheet template guide for Google Sheets goes deeper.
Copy the Payroll Template, set Rates B1 to the year you are paying, and run last month’s payroll through it beside the real pay stubs. If a figure comes out more than a cent apart, tell us in the comments which column it was: that is usually where a payroll sheet finds its next fix. More free files live in our free Google Sheets templates and the Google Sheets hub.
FAQ
Common questions, answered briefly
How do I make a payroll template in Google Sheets?
How do you calculate overtime pay in Google Sheets?
Can Google Sheets calculate payroll taxes?
What percentage is taken out for Social Security and Medicare?
Can a small business run payroll in a spreadsheet?
Something we did not cover, such as salaried pay or a semimonthly schedule? Ask in the comments and we will add the formula.
People also ask