How to Calculate Working Hours in Excel (Khmer)
Learn how to calculate total working hours, subtract lunch break, handle night shifts, and calculate total pay in Excel step by step with Khmer video guide.
Hello everyone! Today I show you how to calculate working hours in Excel step by step with easy formulas and video guide in Khmer language.
Calculating employee working hours is super common for payroll, timesheets, and HR reports. Here are 4 simple methods to handle normal shifts, lunch breaks, decimal hours, and night shifts!
Method 1: Basic Working Hours Calculation
If employee start work at 08:00 AM (cell A2) and finish at 05:00 PM (cell B2):
Use simple subtraction formula:
=B2 - A2
- Make sure cell format is set to Time (e.g.
h:mm). - Result will show
9:00(9 hours).
Method 2: Subtract Lunch Break (1 Hour)
Most employees have 1 hour lunch break. To subtract lunch break automatically:
Option A: If Lunch Break is 1 Hour
=(B2 - A2) - TIME(1, 0, 0)
Option B: If Lunch Break is recorded in cell C2 (e.g. 01:00)
=(B2 - A2) - C2
Result will show 8:00 (8 net working hours).
Method 3: Convert Time to Decimal Hours (For Salary Calculation)
If you want to calculate total pay by multiplying working hours with hourly salary rate (e.g. $5/hour), you MUST convert time into decimal numbers!
Because Excel treats 1 day as 24 hours, multiply result by 24:
=((B2 - A2) - TIME(1, 0, 0)) * 24
- Change cell format from Time to General or Number.
- Result will change from
8:00to decimal number8.0(or8.5for 8 hours 30 mins). - Now you can calculate salary:
=D2 * Hourly_Rate(e.g.8.5 * $5 = $42.50).
Method 4: Calculate Night Shift Hours (Cross Midnight)
If employee work night shift starting at 10:00 PM (22:00) and finish at 06:00 AM next morning, standard formula =B2 - A2 will show error ##### because end time is smaller than start time!
Use MOD function to solve night shift easily:
=MOD(B2 - A2, 1)
Or convert directly to decimal hours:
=MOD(B2 - A2, 1) * 24
Result will calculate exact 8.0 hours correctly!
📹 Watch Khmer Video Tutorial
Watch video step by step below to see how to calculate working hours in Excel:
💡 Quick Tip:
- Total Hours Over 24 Hours (
[h]:mm): When you sum weekly or monthly working hours using=SUM(), Excel resets to0after reaching 24 hours! To fix this, pressCtrl+1➔ Custom ➔ type format code[h]:mmso Excel displays total like45:30hours correctly!- Don't Forget
* 24: Standard time8:00multiplied by$5rate gives wrong money$1.67. Always multiply time by24first before calculating total salary!
📚 Related Resources
Related Tutorials
Opens in new tab ↗IF vs Equal (=) vs EXACT Function in Excel (Khmer)
Learn the difference between Equal (=) operator and EXACT function in Excel for case-sensitive text comparison step by step with Khmer video guide.
How to Split Decimal Number into Two Parts in Excel (Khmer)
Learn how to split decimal number into two parts (integer and decimal) in Excel step by step with simple formulas and Khmer video guide.
How to Convert Number into Khmer Number and Back in Excel (Khmer)
Learn how to convert number into Khmer number and back in Excel step by step with simple custom format, formulas, and Khmer video guide.