Startseite » Excel EN » How to Calculate Hours in Excel: Track Time Like a Pro

How to Calculate Hours in Excel: Track Time Like a Pro

If you want to know how to calculate hours in Excel, you’re in the right place! ⏱️ Whether you’re managing a timesheet, tracking work hours, or calculating overtime, Excel offers simple and accurate ways to compute total hours worked — including start and end times, breaks, and even time over multiple days. In this guide, we’ll show you exactly how to do it across Windows, macOS, and Ubuntu/Linux using formulas, formatting tips, and time-saving keyboard shortcuts. ✅


🧠 Why Calculate Hours in Excel?

From freelancers and project managers to HR departments and students, Excel is used to:

  • ⌚ Track start and end times
  • 📊 Log total working hours
  • 💼 Calculate overtime or shift durations
  • 🧾 Create printable or automated timesheets
  • 🔄 Convert time to decimal for payroll systems

💡 Excel treats time as a fraction of a 24-hour day, so 6 hours = 0.25 (6/24).


✅ Basic Time Calculation Formula

To calculate total hours:

=EndTime - StartTime

Example:

Start TimeEnd TimeFormulaResult
08:0017:00=B2 - A29:00

📌 Format the result cell as Time (hh:mm) or [h]:mm to avoid errors over 24 hours.


✅ Include Breaks in Calculation

=EndTime - StartTime - BreakTime

Example:

StartEndBreakFormulaResult
08:0017:001:00=B2 - A2 - C28:00

✅ Always ensure all times are entered in Time Format (hh:mm).


✅ Sum Hours Across Multiple Days

When hours go over 24, Excel may reset to zero unless you use a custom format:

  • Select total cell → Right-click → Format Cells
  • Choose Custom > [h]:mm

This allows totals like 26:30 instead of showing 2:30.

🧠 [h]:mm shows accumulated hours across dates, not just within a day.


✅ Convert Time to Decimal Hours

Need to calculate decimal hours for payroll?

=(EndTime - StartTime) * 24

Example:

StartEndFormulaResult
09:0017:30=(B2 - A2) * 248.5

✅ Format result as Number to display decimals properly.


⌨️ Keyboard Shortcuts to Speed Up Time Calculations

TaskWindowsmacOSUbuntu/Linux (LibreOffice Calc)
Insert current timeCtrl + Shift + ;Cmd + Shift + ;Ctrl + Shift + ;
Insert current dateCtrl + ;Cmd + ;Ctrl + ;
Format cellsCtrl + 1Cmd + 1Ctrl + 1
Enter edit mode in cellF2Ctrl + UF2
Fill formula downCtrl + DCmd + DCtrl + D

⚡ Quick tip: Use Ctrl + to toggle formula view on/off in Excel.


🐧 How to Calculate Hours in LibreOffice Calc (Ubuntu/Linux)

LibreOffice Calc handles time similarly to Excel:

  1. Enter start and end times in hh:mm format
  2. Use =End - Start for duration
  3. For decimals: multiply by 24
  4. Format cell as [HH]:MM to allow totals > 24h

✅ Formulas:

=B2 - A2
=(B2 - A2) * 24

LibreOffice uses semicolon (;) instead of commas (,) in some regions.


🧼 Common Time Calculation Issues

IssueSolution
Result shows ######Column too narrow → expand width
Incorrect total timeUse [h]:mm format to avoid reset at 24h
Wrong decimal outputEnsure cell format is Number
Errors in subtractionDouble-check cell format is Time
Negative time showing ######Ensure EndTime > StartTime

🧠 If tracking overnight shifts, use =End + 1 - Start to include next day.


📊 Real-World Use Cases

Use CaseDescription
Employee time trackingStart/end/breaks → total hours and overtime
Freelance billingLog hours worked per project
Call center logsAnalyze time spent per shift or task
School schedulesTrack class hours, breaks, and totals
Healthcare shiftsTrack nursing or doctor hours per patient

FAQs

How do I calculate hours worked in Excel?
Use =EndTime - StartTime, format the result as [h]:mm.

How can I calculate hours worked including breaks?
Use =EndTime - StartTime - BreakTime.

How do I convert Excel time to decimal?
Multiply the time difference by 24: =(EndTime - StartTime) * 24.

Does Excel handle times over 24 hours?
Yes, but you must format the cell as [h]:mm.

How can I calculate time in LibreOffice Calc?
Use the same formulas as Excel; format cells as [HH]:MM.

Can I track hours across multiple rows?
Yes, sum all time values with =SUM(D2:D10) and format as [h]:mm.


✅ Conclusion: Calculate Hours in Excel with Precision

Knowing how to calculate hours in Excel gives you the power to track time, manage work logs, and streamline reporting with total accuracy. ⏱️ Whether you’re handling payroll, freelance projects, or academic planning, Excel’s formulas and formatting make time management easy and reliable.

Best of all, these methods work seamlessly on Windows, macOS, and Ubuntu/Linux, with powerful shortcuts to speed up your workflow. ⌨️ Take control of your time — one formula at a time!

Complete List of Windows Keyboard Shortcuts

If you need help for Windows, you can find a whole list of all keyboard shortcuts here.

https://keyboard-shortcuts.org/

Advertisment