Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsTo find the elapsed time between two date-and-time values in Excel, subtract the start value from the end value—for example, =B2-A2. Format the result as [h]:mm to show total hours and minutes, including durations longer than 24 hours. If you need a numeric total, multiply the difference by 24 for hours, 1,440 for minutes, or 86,400 for seconds.
Calculate elapsed time between two date-time values
Put the start date and time in one cell and the end date and time in another. If the start is in A2 and the end is in B2, enter this in the result cell:
As an Amazon Associate I earn from qualifying purchases.
=B2-A2
Excel stores dates as sequential serial values and times as fractions of a day, so subtracting the earlier value from the later one returns the elapsed duration. This is Microsoft’s documented approach for date-and-time differences: calculate the difference between two dates.
Show hours and minutes
A new result may appear as a decimal because Excel is displaying the underlying fraction of a day. Apply a duration format to the result cell. In desktop Excel, select the cell, open Format Cells, choose Custom, and enter [h]:mm. Use [h]:mm:ss if seconds matter. Microsoft identifies [h]:mm as an elapsed-time format: format numbers as dates or times.
#1 Best Overall
- PERFECT DESIGN: Maximize your work area. The desktop whiteboard is designed to sit perfectly between a keyboard and monitor and is slope angled for comfortable reading and writing, or typing when you are using it as a keyboard stand.
- CONVENIENT REMOVABLE BASIC CALCULATOR - TSJ OFFICE desktop glass whiteboard with removable calculator is a great creative booster for your home & office. Upgraded 12-digit standard function calculator with LCD display is also great for homework. Detachable design allows you to use it freely in any occasion.
- SMOOTH WRITING & EASY TO WIPE: TSJ OFFICE mini desktop computer pad comes with a smooth and durable temple glass dry erase writing surface. This white board allows you to write and wipes clean with ease over and over. Our easel whiteboard always stays white and easy to read.
- HIDDEN STORAGE & PAD/MOBILE TRAY: De-clutter your desk by storing markers, magnetic eraser and other desktop accessories in the opening drawer or place markers on the accessory tray for quick access. And one more long tray on the top of the dry erase white board for your pad or mobile.
- CONTAINS EVERYTHING YOU NEED - This small glass whiteboard kit includes a W 15.8 " x D 7.1 " x H 1.9 " Desktop glass whiteboard, 4 markers and 1 eraser and A 12-digit standard function calculator. It comes with everything you need. Enjoy the standing whiteboard as soon as you receive it!
The square brackets let hours accumulate beyond 24. By contrast, h:mm displays the hour within a clock day, so a duration longer than a day can appear to wrap rather than show its full total.
Return a numeric total in hours
For decimal hours, multiply the date-time difference by 24:
Rank #2
- Removable Calculator: This desk glass white board with removale calculator is an excellent creativity booster for your daily office. The upgraded 12 digit standard functional calculator with LCD display is also an aultimate tool for homework
- Stylish Desk Organier: Our modern and elegant glass whiteboard adds a touch of simplicity and luxury to your desktop. As a perfect alternative to sticky notes and scratch paper, you can jot down anything and keep track with this desk notepad
- Smooth Writing and Erasing: This desk whiteboard with 4mm thick tempered glass surface, which allows you write without shadow, no ghosting and can be wiped clean with ease by eraser or paper without stain
- Built-in Storage: More than a desktop whiteboard for task management, daily to-dos and reminders , the large storage caddy base helps you declutter your supplies and keep your desk neat and tidy
- Multi-functional Design: Sitting compactly between your monitor and keyboard, you can use it as a desk to do list whiteboard, or phone charger, or phone/tablet holder, or keyboard stand. It can used for your office task organization, family schedule and workout plan
=(B2-A2)*24
For example, 31 hours and 30 minutes equals 31.5 decimal hours. The value is numeric, so it can be used in further calculations. The same multiplication-by-24 method is included in Microsoft’s guidance for adding or subtracting time: add or subtract time.
Free tools Windows power users keep installed
One-click scans. No signup required.
Choose a formula for the result you need
| What you need | Formula | How to read the result |
|---|---|---|
| Elapsed hours and minutes | =B2-A2 |
Format the result as [h]:mm. |
| Elapsed hours, minutes, and seconds | =B2-A2 |
Format the result as [h]:mm:ss. |
| Total decimal hours | =(B2-A2)*24 |
A numeric total, such as 31.5 hours. |
| Total minutes | =(B2-A2)*1440 |
A numeric total of elapsed minutes. |
| Total seconds | =(B2-A2)*86400 |
A numeric total of elapsed seconds. |
Microsoft documents the minute and second conversions, as well as the limits of the component functions, in its guidance on calculating time: calculate time in Excel.
Rank #3
- MODERN SLEEK DESIGN: Slope desktop whiteboard is ergonomic. Basic calculator, hidden compartments, pad/mobile, marker Tray, providing a smart storage & writing solution
- GLASS SURFACE: Desktop dry erase white board comes with a smooth and durable temple glass dry erase writing surface. Smooth and erases clean
- FUNCTION INTRODUCTION: Tablet/Phone and pen holder at the top. Calculate conveniently. For use with keyboard and monitor desk set. Multiple internal storage spaces
- IDEAL GIFT: Memo board fits in perfectly with any home, office or classroom setting, better organization, teaching and learning without paper large wasting
- WHAT'S INCLUDED: Board measures 17" x 6" and comes with 2 dry-erase markers and a double-sided eraser. You can insert the marker into the upper pen hole or the inner storage box
Handle time-only entries and intervals that cross midnight
Times on the same date
If both cells contain times on the same date and the end time is later, subtract them as usual—for example, =B2-A2. Format the result as h:mm or h:mm:ss. You can also use =TEXT(B2-A2,"h:mm") for a formatted display, but TEXT returns text rather than a numeric duration, so the result is less useful in later arithmetic.
Overnight interval with time-only values
Time-only entries do not say which date a clock time belongs to. If A2 is 10:00 PM and B2 is 6:00 AM, plain subtraction produces a negative result because Excel has no indication that B2 is on the following day.
Rank #4
- 2 Pair Black & Silver Complete Set: This set includes 2 pairs of calculator stands (1 black pair + 1 silver pair), made of sturdy aluminum alloy for long-lasting daily use
- Stable Desk Calculator Support: Designed as a reliable calculator stand, it elevates calculators to a comfortable angle, reducing wrist strain during daily use
- Convenient Organizer for Desktops: It functions as a practical calculator holder that keeps calculators upright and accessible, helping maintain tidy workspaces
- Ideal for Classroom & Office Use: This practical calculator holder for classroom supports standard desktop calculators, perfect for teachers, students, and office workers
- Non-Slip & Durable Construction: Featuring a stable base and strong adhesive, this calculator stand for desk stays securely in place without slipping or damaging surfaces
If the interval is known to be less than 24 hours, this formula adjusts for a midnight crossing:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall=MOD(B2-A2,1)
It returns the next-day difference for that under-24-hour case. It is not suitable when the intended elapsed time may be 24 hours or longer, because time-only values contain no date information to distinguish those durations.
Best Value
- PERFECT DESIGN: Maximize your work area. The desktop whiteboard is designed to sit perfectly between a keyboard and monitor and is slope angled for comfortable reading and writing, or typing when you are using it as a keyboard stand.
- CONVENIENT REMOVABLE BASIC CALCULATOR - TSJ OFFICE desktop glass whiteboard with removable calculator is a great creative booster for your home & office. Upgraded 12-digit standard function calculator with LCD display is also great for homework. Detachable design allows you to use it freely in any occasion.
- SMOOTH WRITING & EASY TO WIPE: TSJ OFFICE mini desktop computer pad comes with a smooth and durable temple glass dry erase writing surface. This white board allows you to write and wipes clean with ease over and over. Our easel whiteboard always stays white and easy to read.
- HIDDEN STORAGE & PAD/MOBILE TRAY: De-clutter your desk by storing markers, magnetic eraser and other desktop accessories in the opening drawer or place markers on the accessory tray for quick access. And one more long tray on the top of the dry erase white board for your pad or mobile.
- CONTAINS EVERYTHING YOU NEED - This small glass whiteboard kit includes a W 15.8 " x D 7.1 " x H 1.9 " Desktop glass whiteboard, 4 markers and 1 eraser and A 12-digit standard function calculator. It comes with everything you need. Enjoy the standing whiteboard as soon as you receive it!
Overnight or multi-day interval with dates
For overnight, multi-day, or otherwise date-sensitive intervals, enter a complete date and time in both cells. Make the end value’s date the actual later date, then use =B2-A2. This preserves the day relationship and allows Excel to calculate durations longer than 24 hours. Format the result as [h]:mm or [h]:mm:ss for a cumulative display.
Calculate calendar days, months, or years instead
Elapsed-time subtraction answers how much time passed. If you need whole calendar units between dates—rather than hours and minutes—Microsoft documents the DATEDIF function:
=DATEDIF(A2,B2,"d")returns the number of days.=DATEDIF(A2,B2,"m")returns the number of complete months.=DATEDIF(A2,B2,"y")returns the number of complete years.=DATEDIF(A2,B2,"ym")returns remaining months after complete years.=DATEDIF(A2,B2,"yd")returns remaining days after complete years.
These are calendar-unit calculations, not substitutes for a timestamp duration such as total hours. Microsoft’s DATEDIF function documentation says the function is retained for compatibility with older Lotus 1-2-3 workbooks, warns that it can calculate incorrectly in some scenarios, and does not recommend the "md" unit because of known limitations. The start date must precede the end date; a reversed range can return #NUM!.
Fix common date-and-time difference problems
- The answer is a decimal: The subtraction may be correct; the cell is showing the raw serial fraction. Apply
[h]:mmor another appropriate duration format. - The displayed total wraps after 24 hours: Change
h:mmto[h]:mmso elapsed hours accumulate. - An overnight result is negative: Use full date-time values with the end on the following date. Use
MODonly for a known interval shorter than 24 hours. HOUR,MINUTE, orSECONDgives too small a total: These functions return components, not unrestricted cumulative totals. For total hours, minutes, or seconds, multiply the serial difference by 24, 1,440, or 86,400.DATEDIFreturns an error or unexpected result: Check that the start date precedes the end date, and avoid the"md"unit. Microsoft also cautions thatDATEDIFmay be inaccurate in some situations.- Excel interprets a date unexpectedly: Enter a date format recognized by the workbook’s locale, or construct the date with
DATE(year,month,day)rather than relying on ambiguous text.
Formatting in Excel for the web
Microsoft’s guidance says Excel for the web can add and subtract values totaling more than 24 hours, but the described web workflow cannot apply a custom number format. If you need the cumulative [h]:mm display and cannot set it in the web version, use desktop Excel for the formatting step or display a numeric total such as =(B2-A2)*24. The limitation is specific to the cited workflow; it should not be read as a claim that web Excel cannot calculate the duration.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




