WPS Spreadsheets: Calculate Timesheet Hours in Quarter-Hour Increments
Question details
Calculate daily timesheet hours from work periods before and after lunch, round the result to 15-minute increments, and optionally return decimal hours.
- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- A timesheet contains separate In, LunchOut, LunchIn, and Out times, and the user needs accurate daily and weekly totals, including shifts that cross midnight.
- Observed behavior
- The goal is to produce a daily total rounded to quarter-hour increments and a decimal-hours value such as 7.25 for weekly calculations.
Enter each start, break, and end value as a valid time in WPS Spreadsheets, such as 8:00 AM or 17:00. Confirm that the formula names In, LunchOut, LunchIn, and Out refer to the correct cells, or replace them with your cell references.
Calculate and round the daily timesheet total as a time value
Use this method when the result should display as hours and minutes, such as 7:15, while handling work periods that cross midnight.
MOD(...,1) keeps each elapsed work period positive even when the ending time is on the next day. MROUND then rounds the combined duration to the nearest 15-minute interval.
Select the daily total cell and enter =MROUND(MOD(LunchOut-In,1)+MOD(Out-LunchIn,1),TIME(0,15,0)). If you are not using named ranges, replace each name with the corresponding cell reference, such as B2, C2, D2, and E2.
Select the formula cell, open the Home tab, choose Number Format or open Format Cells, and apply the custom format [h]:mm. This allows totals longer than 24 hours to display correctly.
Drag the fill handle from the completed daily total cell down through the remaining timesheet rows to calculate each day.
Return rounded timesheet totals as decimal hours
Use this method when payroll, billing, or weekly calculations require decimal values such as 7.25 instead of an hours-and-minutes display.
Calculate quarter-hour timesheet totals directly in WPS Spreadsheets
WPS Spreadsheets can calculate split-shift durations, handle work periods that cross midnight with MOD, round totals to 15-minute intervals, and sum decimal-hour results for payroll or weekly reporting.
- 1. Open or create a timesheet: Launch WPS Office, open WPS Spreadsheets, and select a timesheet workbook or create a blank spreadsheet from the New tab.
- 2. Enter time values: Enter the In, LunchOut, LunchIn, and Out times in separate columns, using valid time entries such as 8:00 AM and 5:00 PM.
- 3. Calculate the rounded time total: Select the daily total cell and enter =MROUND(MOD(LunchOut-In,1)+MOD(Out-LunchIn,1),TIME(0,15,0)), replacing the names with cell references when necessary.
- 4. Convert to decimal hours when needed: For payroll or weekly totals, enter =MROUND(24*(MOD(LunchOut-In,1)+MOD(Out-LunchIn,1)),0.25) in a separate cell and format it as General or Number.
- 5. Sum the workweek: Select the weekly total cell and use =SUM(range) on the daily decimal-hours results, then save the workbook in its original Excel-compatible format if required.

Frequently Asked Questions
Why does the timesheet formula use MOD with 1?
MOD(...,1) keeps the elapsed time positive when an Out time occurs after midnight. It works for both same-day shifts and overnight work periods.
How do I display a total of more than 24 hours correctly?
Select the total cell, open Format Cells from the Home tab, choose Custom, and apply [h]:mm instead of the standard h:mm format.
How can I show 7 hours and 15 minutes as 7.25?
Multiply the combined time duration by 24 and round it with MROUND(...,0.25), then format the cell as General or Number.
Can I calculate the total when there is no lunch break?
Yes. Use a formula for the available work periods, such as =MROUND(MOD(Out-In,1),TIME(0,15,0)), or leave the break duration at zero in a dedicated break column.
How do I calculate a weekly timesheet total?
First calculate each day as a decimal-hour result, then select the weekly total cell and use =SUM(the_daily_result_range), such as =SUM(F2:F6).




