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.

Advertisement

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:00 to decimal number 8.0 (or 8.5 for 8 hours 30 mins).
  • Now you can calculate salary: =D2 * Hourly_Rate (e.g. 8.5 * $5 = $42.50).
Advertisement

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 to 0 after reaching 24 hours! To fix this, press Ctrl + 1Custom ➔ type format code [h]:mm so Excel displays total like 45:30 hours correctly!
  • Don't Forget * 24: Standard time 8:00 multiplied by $5 rate gives wrong money $1.67. Always multiply time by 24 first before calculating total salary!

📚 Related Resources

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement