Excel guide · 6 min read
How to calculate elapsed time in Excel
=C2-B2 gives the elapsed time in days, so multiply by 24 for hours or 1440 for minutes, or format the cell as [h]:mm. For time elapsed so far, subtract from a fixed "as of" cell instead of NOW(), as in =($H$1-B2)*24, so the numbers stay put until you change the date in H1.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Ticket | Opened | Closed | Due | As of | Nov 3, 2026 14:30 | ||
| 2 | T-5101 | Oct 30, 2026 8:45 | Oct 31, 2026 11:20 | Nov 1, 2026 8:45 | ||||
| 3 | T-5102 | Nov 1, 2026 16:10 | Nov 3, 2026 16:10 | |||||
| 4 | T-5103 | Nov 2, 2026 9:00 | Nov 3, 2026 9:00 | Nov 4, 2026 9:00 | ||||
| 5 | T-5104 | Nov 3, 2026 13:05 | Nov 4, 2026 13:05 | |||||
| 6 | T-5105 | Oct 28, 2026 10:30 | Oct 31, 2026 10:30 | |||||
| 7 | T-5106 | Nov 3, 2026 11:40 | Nov 3, 2026 10:55 | Nov 4, 2026 11:40 | ||||
| 8 | T-5107 | Nov 2, 2026 17:50 | Nov 3, 2026 8:05 | Nov 3, 2026 17:50 |
Download this sheet as an Excel practice file (.xlsx)
Elapsed time from a start to an end
The sheet is a support queue. Each cell in Opened and Closed holds a full date and time, which Excel stores as one number: whole days before the decimal point, the time of day after it. Subtracting two of them gives the gap in days, with the fraction as part of a day. That is why a ticket open for a day and a half shows 1.5.
Turn the day count into the unit you need: *24 for hours, *1440 for minutes. Wrap it in ROUND so 26.583333 does not leak into reports. To show hours and minutes instead of a decimal, leave the plain =C2-B2 and format the cell with Home > Number Format > More Number Formats > Custom, type [h]:mm. The square brackets let the hours run past 24; plain h:mm would show 2:35 for this ticket and silently drop the day.
Result: 26.58
26.58 hours: T-5101 was opened at 8:45 on Oct 30 and closed at 11:20 the next day. Formatted as [h]:mm the same gap reads 26:35.
Elapsed time so far: use an "as of" cell, not NOW()
For tickets that are still open, you want the time since they were opened. The obvious formula is =NOW()-B3, but NOW() is volatile: it recalculates on every edit, so the hours change while you are reading them, a printed report never matches the file, and a sort or filter by age can reshuffle as you work. Two people opening the same file see different numbers.
Put the moment you measure from in one cell instead, here H1. Type it by pressing Ctrl+; (today's date), a space, then Ctrl+Shift+; (the current time) and Enter. That is a fixed value. Every formula points at $H$1, so the whole sheet is measured from the same instant, and you refresh it on purpose by retyping H1. If you do want a live clock, put =NOW() in H1 alone and the rest of the formulas need no change.
Combine both cases in one formula: use the closed time when there is one, otherwise the as-of time. =IF(C3="",$H$1,C3)-B3 works for every row, so you can fill it down the whole column.
Result: 46.33
46.33 hours. T-5102 is still open, so it is measured to 2:30 PM on Nov 3 in H1. On a closed row the same formula uses the Closed time.
Days, hours or minutes
Pick one unit per column, and decide what a "day" means. INT of the gap counts full 24-hour periods. Subtracting the dates alone counts calendar days. T-5102 was opened at 4:10 PM on Nov 1: at 2:30 PM on Nov 3 that is 1 full day (INT($H$1-B3) is 1) but 2 calendar days (INT($H$1)-INT(B3) is 2). SLAs usually mean the first, "opened 2 days ago" labels the second.
For minutes, round the result: =ROUND((C8-B8)*1440,0) gives 855 for T-5107. Without ROUND, times stored as fractions of a day often come out as 854.9999999, and a later INT or comparison with = turns that into the wrong number.
Result: 6
6 full days. T-5105 has been open since 10:30 AM on Oct 28, and at 2:30 PM on Nov 3 that is 6 days and 4 hours, or 148 hours.
A "2d 3h 15m" label
For a readable age like "1d 2h 35m", work in whole minutes first, then split them with INT and MOD: INT(m/1440) is the days, INT(MOD(m,1440)/60) the hours left over, and MOD(m,60) the minutes. Rounding to minutes at the start is what keeps the label honest. If you split the raw fraction instead, a gap of exactly 3 days stored as 2.9999999 can show as "2d 23h 59m" or even "2d 23h 60m".
LET (Excel 365 and 2021) names the minute count once so the formula stays readable. In older versions, repeat the ROUND part three times: =INT(ROUND((C2-B2)*1440,0)/1440)&"d "&INT(MOD(ROUND((C2-B2)*1440,0),1440)/60)&"h "&MOD(ROUND((C2-B2)*1440,0),60)&"m".
You may see =TEXT(C2-B2,"d \d h \h m \m") suggested. It works for short gaps, but "d" in a format means day of the month, so it wraps back to 1 after 31 days and cannot show 45d. The result of either method is text: keep a numeric hours column for sorting, totals and averages.
Result: 1d 2h 35m
1d 2h 35m for T-5101, the same 26.58 hours as above.
Negative times and overdue countdowns
If the end is earlier than the start, the result is negative, and a cell formatted as a time or [h]:mm shows ##### because Excel's default 1900 date system cannot display negative times. T-5106 was closed at 10:55 but opened at 11:40: =C7-B7 is a negative fraction of a day. Usually that is a typing mistake, so the ##### is a useful alarm. Multiply by 24 or 1440 and keep the cell as a number to see the real value, -45 minutes.
Negative times are legitimate in countdowns. Time left until the due time is Due minus the as-of cell, and it goes negative once a ticket is overdue. Show the size with ABS and say the direction in words, which never produces #####.
For the "2d 3h 15m" label on a value that can be negative, take ABS of the minutes and add the sign in front: =LET(m,ROUND((C7-B7)*1440,0),IF(m<0,"-","")&INT(ABS(m)/1440)&"d "&INT(MOD(ABS(m),1440)/60)&"h "&MOD(ABS(m),60)&"m") gives "-0d 0h 45m". Switching the workbook to the 1904 date system (File > Options > Advanced) also lets negative times display, but it moves every existing date in the file by four years and a day, so avoid it in a workbook that already has dates.
Result: Overdue by 76:00
Overdue by 76:00. T-5105 was due at 10:30 AM on Oct 31, 76 hours before the as-of time. For T-5102 the same formula says "Due in 1:40".
Which method to pick
For totals, averages, sorting or comparing with a target, keep the elapsed time as a number: decimal hours with *24 or a [h]:mm formatted duration. For a dashboard label people read, add the "2d 3h 15m" text in a separate column. For anything still running, measure to an as-of cell and only make it =NOW() if the sheet is a live screen nobody prints. If start and end are times without dates and can cross midnight, use the MOD fix from the over-midnight guide instead of a plain subtraction.
Common mistakes
Formatting the result as h:mm
h:mm shows the time of day, so 26 hours appears as 2:00. Use the custom format [h]:mm for durations.
Using NOW() in every row
Each recalculation moves the numbers and the sheet never matches a printout. Point all rows at one as-of cell and refresh that cell on purpose.
Getting ##### for some rows
The result is negative. Check for swapped or mistyped times, or show the value in hours with *24, or use ABS with an "Overdue by" label.
Start or end typed as text
A time pasted as text, such as "2026-11-01 16:10 " with a trailing space, gives #VALUE!. Check with =ISNUMBER(B3) and convert the column with Data > Text to Columns > Finish.
FAQ
How do I calculate elapsed time from a date to now in Excel?
Use =(NOW()-B2)*24 for hours, or better, type the current date and time into one cell such as H1 and use =($H$1-B2)*24. The fixed cell keeps the results stable until you update it.
How do I show elapsed time over 24 hours in Excel?
Format the cell with the custom format [h]:mm. The brackets let the hour count keep going past 24; h:mm restarts at 0 every day.
How do I convert elapsed time to minutes in Excel?
Multiply the difference by 1440, the number of minutes in a day, and round it: =ROUND((C2-B2)*1440,0).
Why does my elapsed time show #####?
Either the column is too narrow, or the end is before the start so the result is negative. Excel cannot display a negative time in the default date system, so multiply by 24 to see it as a number.
How do I show elapsed time as days, hours and minutes?
Convert to whole minutes first, then split: =LET(m,ROUND((C2-B2)*1440,0),INT(m/1440)&"d "&INT(MOD(m,1440)/60)&"h "&MOD(m,60)&"m") in Excel 365 or 2021.
Functions used
ROUNDRounds to digitsIFPicks a result from a testINTRounds down to integerMODRemainder after divisionLETNames values inside a formulaTEXTNumber to formatted textABSAbsolute value
Related guides
- Calculate hours between two dates and times in Excel
- Calculate hours worked overnight in Excel
- How to calculate hours worked (and overtime) in Excel
- How to calculate days between two dates in Excel
- How to divide in Excel
- How to average time and durations in Excel
Updated