How it works
Quickly calculate total shift duration minus break time for payroll or time tracking.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
3-
?startTime=Start TimeTime · Optional · Default: 09:00
-
?endTime=End TimeTime · Optional · Default: 17:00
-
?breakDuration=Total Break Time (minutes)Number · Optional · Default: 30
Outputs
1-
resultResultText · Primary output
result contains the calculator’s complete rendered result area, including its visible result cards, tables, charts, and messages.
Calculate total hours worked between two times
Description
The Hours Calculator is a simple yet effective tool for tracking your working hours. Whether you are filling out a timesheet, checking your payroll, or managing your schedule, this tool allows you to enter your start time and end time to find the exact duration of your shift. It also allows you to subtract break duration (like an unpaid 30-minute lunch) to get your net working hours.
Inputs
- Start Time: The time you clocked in.
- End Time: The time you clocked out.
- Break Duration (minutes): The total amount of unpaid time taken during your shift.
Outputs
- Total Hours: The net duration expressed in hours and minutes.
Chart
- N/A: This tool provides a direct duration result.
“Good to Know”
- Overnight Shifts: This tool automatically detects if your end time is earlier than your start time and assumes you worked through midnight (the “Next Day” logic).
- Rounding: For payroll purposes, many companies round time to the nearest 15 minutes. Note your exact times and check against your company’s policy.
- Format: Use a standard 24-hour format or AM/PM selection (depending on your browser’s time picker) to ensure accuracy.
Examples
Example 1: Standard 9-to-5
- Input: Start: 09:00, End: 17:00, Break: 30 mins
- Output: 7 hours 30 minutes
Example 2: Short Shift
- Input: Start: 12:00, End: 15:45, Break: 0 mins
- Output: 3 hours 45 minutes
Example 3: Overnight Shift
- Input: Start: 22:00, End: 06:00, Break: 60 mins
- Output: 7 hours 0 minutes