How to Calculate Pay Periods and Sum Hours by Date in Google Sheets
Question details
The user needs to set up a timesheet to calculate pay-period date ranges and sum total hours by date and project grant.

- Product
- Google Sheets
- Device & OS
- not provided
- Scenario
- Creating a timesheet to track working hours and automatically assign them to specific pay periods and grants.
- Observed behavior
- The goal is to automatically calculate pay period date ranges, assign pay period numbers, and calculate total hours for each grant using formulas.
Ensure your raw timesheet data includes clear, separate columns for the date worked, hours logged, and project or grant name before applying summary formulas.
Use SUMIFS and Date Functions to Summarize Hours
Use standard spreadsheet functions like SUMIFS to automatically total your hours based on specific pay periods and grant names.
While Google Sheets has its own community for specialized scripts, standard spreadsheet formulas for timesheets are universally applicable. You can summarize timesheet data efficiently by combining reference tables with conditional sum formulas.
Create a separate reference table in your spreadsheet containing 'Start Date', 'End Date', and 'Pay Period Number' for the entire year.
In your main timesheet, add a 'Pay Period' column. Use a formula like VLOOKUP or IFS to compare the entry date against your reference table and output the correct pay period number.
Use the SUMIFS function to calculate totals. For example, enter `=SUMIFS(Hours_Column, Grant_Column, "Grant Name", Pay_Period_Column, 1)` to sum the hours for a specific grant during pay period 1.
For highly specific Google Workspace array formulas or App Script automation, consult the Google Sheets Help and Learning Center.

Create Timesheets and Calculate Hours Easily in WPS Spreadsheet
WPS Spreadsheet provides powerful functions like SUMIFS, VLOOKUP, and intuitive Pivot Tables to help you build professional timesheets and manage payroll calculations with ease.
- 1. Create a Timesheet: Open WPS Spreadsheet and create a new timesheet workbook with clear columns for dates, hours, and grant codes.
- 2. Apply Formulas: Use the built-in SUMIFS function from the Formulas tab to calculate hour totals automatically based on your criteria.
- 3. Use Pivot Tables: Select your data and click 'Insert' > 'PivotTable' to instantly group hours by pay period without writing manual formulas.

Frequently Asked Questions
How do I group timesheet data by bi-weekly pay periods?
You can calculate bi-weekly periods by taking a known start date and using the CEILING or FLOOR functions in your spreadsheet to group subsequent dates into 14-day intervals, or simply map them using a VLOOKUP reference table.
Can I calculate overtime hours automatically?
Yes, you can use a simple IF formula (e.g., `=IF(TotalHours>40, TotalHours-40, 0)`) to separate standard hours from overtime hours within a weekly pay period.
Why is my SUMIFS formula returning a zero or an error?
Ensure that the ranges you are summing and the criteria ranges are exactly the same size. Additionally, verify that your dates are formatted as actual date values and not as plain text.




