Formula Errors

How to Calculate Weekly Hours and Deduct a 45-Minute Break in Excel

Tauseeq MagsiTauseeq Magsi Oct 21, 2026 871 views

Question details

The user needs an Excel formula to accurately sum weekly work hours across multiple days while automatically subtracting a 45-minute break from any day where the total time worked exceeds five hours.

How to Calculate Weekly Hours with a 45-Minute Break Deduction in Excel
Product
Excel
Device & OS
not provided
Scenario
Setting up a weekly timesheet or time-calculation calendar where breaks are automatically deducted without needing manual text conversions.
Observed behavior
Timesheets need to perform direct calculations on time values natively stored as fractions of a day, outputting the correct weekly total hours.
Before you start

Ensure that the cells containing your start and end times are properly formatted as 'Time' (e.g., 08:00 AM) so that Excel can accurately calculate the mathematical differences between them.

Solution 1Recommended

Use MOD and IF Functions for Time Calculations

This recommended method calculates the elapsed time between two time values, converts it to decimal hours, and uses an IF statement to conditionally deduct 0.75 hours (45 minutes).

Excel handles dates and times as serial numbers, meaning 1 hour is technically 1/24th of a day. By multiplying the elapsed time by 24, you can convert the result into a standard numerical format (decimal hours).

The MOD function is highly recommended for time calculations because it seamlessly handles night shifts that cross over midnight.

1
Enter your shift times

Input a daily start time in cell A2 and an end time in cell B2. Make sure you use standard time formats.

2
Apply the elapsed time formula

Select cell C2 and enter the base time calculation formula: =MOD(B2-A2,1)*24. This will give you the total elapsed hours without breaks in decimal format.

3
Add the conditional break deduction

Modify the formula in cell C2 to include the break rule. Use this exact formula: =MOD(B2-A2,1)*24-IF(MOD(B2-A2,1)*24>5,0.75,0). This tells Excel to subtract 0.75 (which is 45 minutes) only if the initial calculation exceeds 5 hours.

4
Format the result cell

Because we multiplied by 24, the output is a decimal number. Right-click cell C2, select 'Format Cells', and set the format to 'Number' with two decimal places (e.g., 8.25 for 8 hours and 15 minutes).

5
Calculate the weekly total

Click the bottom-right corner of cell C2 and drag it down to apply the formula to the rest of the week's days. Then, in the cell below your last working day, use the AutoSum feature or type =SUM(C2:C8) to calculate your weekly total hours.

Use MOD and IF Functions for Time Calculations
Why 0.75?: Since 45 minutes is exactly three-quarters of an hour (45/60), deducting 0.75 correctly scales the time deduction when working with decimal hours.
Manage Timesheets Efficiently

Track Work Hours Seamlessly with WPS Spreadsheet

WPS Spreadsheet features robust built-in calculation capabilities that perfectly handle time values, complex IF statements, and conditional arithmetic to help you automate your daily timesheets.

  1. 1. Open a new worksheet: Launch WPS Office, open WPS Spreadsheet, and create a blank workbook.
  2. 2. Input the calculation formula: Enter your in/out times and simply paste the time deduction formula =MOD(B2-A2,1)*24-IF(MOD(B2-A2,1)*24>5,0.75,0) directly into the cell.
  3. 3. Use AutoSum for the week: Highlight your daily hours and click the 'AutoSum' button on the formula ribbon to instantly gather your weekly total.
Fully compatible with Microsoft Excel formulas, time functions, and formats.Comes with a rich library of free timesheet and payroll templates.A lightweight, feature-rich interface that loads instantly and works seamlessly across devices.
QA img-9

Frequently Asked Questions

Why is my total hours calculation showing up as a date like '1/0/1900'?

This happens because Excel tries to be smart and assumes the result of a time equation is also a time or date format. To fix this, simply right-click the cell containing your formula, select 'Format Cells', and change the formatting from Date/Time to 'Number' or 'General'.

How do I change the formula to deduct a 30-minute break instead?

Since the formula calculates in decimal hours, 30 minutes is 0.5 hours. Just change the '0.75' in the formula to '0.5'. The new formula would be: =MOD(B2-A2,1)*24-IF(MOD(B2-A2,1)*24>5,0.5,0).

Can I show the weekly total as hours and minutes (e.g., 38:45) instead of a decimal?

Yes. If you prefer the [h]:mm format, remove the '*24' from the formula and deduct the time value instead of the decimal. Use this alternative formula: =MOD(B2-A2,1)-IF(MOD(B2-A2,1)*24>5,TIME(0,45,0),0). Then, format your final cell using the Custom format [h]:mm.