Forum Discussion
Musical1FL
Feb 25, 2025Copper Contributor
Formula for Subtracting End time from Start time to a Number
Hi ,I'm looking subtract an ending time (as in work shift) from starting time and rendering a number. I have the two time columns formulated as 'time' as 1:30 PM and want to make the hours worked a...
insightsgeek
Feb 26, 2025Brass Contributor
Hi,
I tried the following formula:
=(B2-A2)*24
A2 => Start Time
B2 => End TimeMultiplying by 24 converts the result from a time value to a decimal number representing hours.
Example:
Make sure the column with the result is formatted as a Number or General to display the correct output.
Handling Overnight Shifts (Past Midnight)
If shifts cross midnight, Excel may return a negative value. To fix this, use:
=MOD(B2-A2,1)*24
Hope this helps! Let me know if you need further clarification. 😊