Calculate your daily and weekly work hours accurately
Day
Start Time
End Time
Break (Mins)
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
Weekly Summary
Total Decimal Hours: 0.00
Total Time: 0h 0m
Estimated Earnings: $0.00
How to Calculate Your Work Hours
Managing your time effectively is crucial for both personal productivity and ensuring you are paid correctly. Our Work Hours Calculator is designed to simplify the process of tracking daily and weekly employment durations by accounting for start times, end times, and unpaid breaks.
The Calculation Formula
The basic logic used to calculate hours worked is:
Total Hours = (End Time – Start Time) – Break Duration
Why Accurate Tracking Matters
Payroll Accuracy: Ensure your paycheck matches the actual hours you spent on the clock.
Overtime Awareness: Easily identify when you have exceeded your standard 40-hour work week.
Project Management: For freelancers, tracking hours per day is essential for accurate client billing.
Work-Life Balance: Visualizing your total weekly commitment helps in managing stress and scheduling personal time.
Example Calculation
If you start work at 08:30 AM and finish at 05:15 PM (17:15) with a 45-minute lunch break:
Convert to 24-hour format: 17:15 – 08:30 = 8 hours and 45 minutes.
Enter your times in 24-hour format or use the time picker provided. If you didn't work a specific day, simply leave the start and end times blank. The break duration should be entered in minutes (e.g., enter '60' for a one-hour lunch).
function calculateWorkHours() {
var totalMinutes = 0;
var hourlyRate = parseFloat(document.getElementById('hourly_rate').value) || 0;
for (var i = 1; i <= 7; i++) {
var startVal = document.getElementById('start_' + i).value;
var endVal = document.getElementById('end_' + i).value;
var breakVal = parseFloat(document.getElementById('break_' + i).value) || 0;
if (startVal && endVal) {
var startParts = startVal.split(':');
var endParts = endVal.split(':');
var startMinutes = (parseInt(startParts[0]) * 60) + parseInt(startParts[1]);
var endMinutes = (parseInt(endParts[0]) * 60) + parseInt(endParts[1]);
// Handle overnight shifts
if (endMinutes 0) {
totalMinutes += dailyDiff;
}
}
}
var totalHoursDecimal = totalMinutes / 60;
var hoursDisplay = Math.floor(totalMinutes / 60);
var minsDisplay = totalMinutes % 60;
// Display results
document.getElementById('work-result-container').style.display = 'block';
document.getElementById('res_decimal').innerHTML = totalHoursDecimal.toFixed(2);
document.getElementById('res_formatted').innerHTML = hoursDisplay + 'h ' + minsDisplay + 'm';
var earningsBox = document.getElementById('earnings_box');
if (hourlyRate > 0) {
var totalEarnings = totalHoursDecimal * hourlyRate;
document.getElementById('res_earnings').innerHTML = '$' + totalEarnings.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
earningsBox.style.display = 'block';
} else {
earningsBox.style.display = 'none';
}
}