How to Calculate Minutes Between Two Times in Excel

Last updated on November 10th, 2026 at 10:22 am

In Excel, subtract the start time from the end time and multiply by 1440. With the start in A2 and the end in B2, type =(B2-A2)*1440 in C2 and format C2 as General. For a range that runs past midnight, such as a 10:00 PM to 6:00 AM shift, use =MOD(B2-A2,1)*1440.

Both formulas work in Excel for Microsoft 365, Excel 2016 through 2024 and Excel for the web, matching Microsoft’s Subtract times page.

Which formula do you need?

Your situationFormula in C2Example result
Both times on the same day=(B2-A2)*14409:15 AM to 10:45 AM = 90
The end time may be after midnight=MOD(B2-A2,1)*144010:00 PM to 6:00 AM = 480
The cells hold dates and times=(B2-A2)*144010/7/2026 11:30 PM to 10/9/2026 2:15 AM = 1,605
You need whole minutes=ROUND((B2-A2)*1440,0)1:05 PM to 1:52 PM = 47
You want hours and minutes, like 26:45=B2-A2 with the [h]:mm format1,605 minutes shows as 26:45

Why the number is 1440

Excel doesn’t store a time as “9:15.” It stores it as a fraction of one day. 6:00 AM is 0.25, 12:00 PM is 0.5, and 6:00 PM is 0.75. Microsoft’s TIMEVALUE function page describes time values the same way, as a decimal from 0 up to just under 1.

So when you subtract one time from another, the answer is also a fraction of a day. A day has 24 × 60 = 1,440 minutes, so multiplying by 1440 converts that fraction into minutes. Multiply by 24 for hours, or by 86400 for seconds.

Two terms you’ll see below:

  • General format: Excel’s plain number format. A cell set to General shows 90 rather than a clock time.
  • Fill handle: the small square at the bottom-right corner of a selected cell. Drag it down to copy a formula to the rows below.

Calculate minutes between two times on the same day

  1. Type the start time in A2, such as 9:15 AM. Leave a space before AM or PM, or use 24-hour time (21:15 for 9:15 PM). When Excel recognizes a time, the entry lines up on the right side of the cell.
  2. Type the end time in B2, such as 10:45 AM.
  3. Click C2, type =(B2-A2)*1440 and press Enter.
Excel formula bar showing =(B2-A2)*1440 with a column of results of 90, 510 and 47 minutes
Multiply the time difference by 1440 to get minutes. The fictional calls last 90, 510 and 47 minutes, displayed as General numbers.
  1. If C2 shows a time like 12:00 AM or 2:00 PM instead of 90, Excel has copied the time format into the result. With C2 selected, open the number format drop-down in the Number group on the Home tab and choose General.
Number Format drop-down on the Excel Home tab with General highlighted for a cell that shows a time instead of minutes
C2 still has a Time display (1), so its numeric result of 90 appears as midnight. Open Number Format (2) and choose General (3) to show 90. The menu is recreated before the format change.
  1. Drag C2’s fill handle down to calculate the other rows.

Here’s what a short call log looks like with the formula filled down:

Start (A)End (B)Minutes (C)Caller (D)
9:15 AM10:45 AM90Alex
8:00 AM4:30 PM510Jordan
1:05 PM1:52 PM47Priya

You’ll know it worked when column C shows plain numbers you can check in your head: 9:15 to 10:45 is an hour and a half, which is 90 minutes.

Calculate minutes when the time crosses midnight

A night shift from 10:00 PM to 6:00 AM breaks the basic formula. Because 6:00 AM is a smaller number than 10:00 PM, =(B2-A2)*1440 returns -960 instead of 480. If the cell has a time format, you’ll see #####, since Excel can’t show a negative time in its default date system.

Use MOD to wrap the result back into a single day:

=MOD(B2-A2,1)*1440

MOD returns the remainder after division, and the remainder keeps the sign of the divisor (see Microsoft’s MOD function reference). Dividing by 1 turns -0.6667 of a day into 0.3333 of a day, which is 480 minutes. For same-day times it changes nothing, so it’s a safe default for shift logs.

Excel sheet comparing ##### from the basic formula with 480 minutes from the MOD formula for a 10 PM to 6 AM shift
The basic formula returns -960, which the Time-formatted cell displays as hashes in Excel’s default date system. MOD wraps the overnight difference into a day and returns 480 minutes. Red and green frames compare the two results.

If you’d rather see the logic spelled out, =(B2-A2+(B2<A2))*1440 gives the same answer. The comparison B2<A2 counts as 1 (one extra day) when the end time is earlier, and 0 otherwise.

Two limits to keep in mind:

  • These formulas assume the span is under 24 hours. A shift of 30 hours would come out as 360 minutes.
  • If the start and end times are identical, they return 0, not 1,440. For 24-hour shifts, enter dates with the times (next section).

Do these formulas work in Excel for the web and on a Mac?

Yes. The formulas themselves are the same in every current version of Excel, including Excel for the web and Excel for Mac. Only the way you reach Format Cells differs slightly.

Calculate minutes when the cells include dates

If your cells hold a full date and time, such as 10/7/2026 11:30 PM and 10/9/2026 2:15 AM, the date part does the work for you. Use the basic formula, =(B2-A2)*1440, and you’ll get 1,605 minutes (26 hours and 45 minutes).

Don’t use MOD here. It throws away whole days, so it would report only 165 minutes for this example. Entering dates with times is also the most reliable way to log spans longer than a day. For results in days or hours across several dates, see calculating the difference between two dates and times.

Get whole minutes and round to 5 or 15 minutes

Because Excel stores times as binary fractions, some differences are a hair off. For 1:05 PM to 1:52 PM, the raw result can be 46.99999999999999. Excel displays that as 47, but a formula that chops off decimals, such as INT, can return 46. Round instead:

  • =ROUND((B2-A2)*1440,0) gives the nearest whole minute.
  • =ROUNDDOWN(ROUND((B2-A2)*1440,6),0) counts only complete minutes when your times include seconds. The inner ROUND clears the tiny error first, so 9:00:00 to 9:12:40 gives 12.
  • =MROUND(ROUND((B2-A2)*1440,0),15) rounds to the nearest 15 minutes, for billing or timesheets. Change 15 to 5 or 6 for other increments. A 66-minute call becomes 60.
  • =CEILING.MATH(ROUND((B2-A2)*1440,0),15) always rounds up to the next 15, so the same call bills as 75.

Microsoft’s ROUND function page covers the related functions, and there’s more on choosing between them in this guide to rounding numbers in Excel.

Minutes as a number, or as h:mm?

Multiplying by 1440 gives a real number (90, 510, 1,605) that you can add, average, compare with a target or multiply by a per-minute rate. That’s usually what you want.

If you’d rather keep the result as a time, so it reads as 1:30 or 26:45, leave out the 1440 and use a custom format:

  1. In C2, type =B2-A2 (or =MOD(B2-A2,1) for overnight times).
  2. Press Ctrl + 1 to open Format Cells. On a Mac, right-click the cell and choose Format Cells.
  3. On the Number tab, select Custom.
  4. In the Type box, enter [h]:mm for hours and minutes, [mm]:ss for minutes and seconds, or [m] for total minutes only, then select OK.
Excel Format Cells dialog with the Custom category selected and the [h]:mm code typed in the Type box
For =B2-A2, use Custom [h]:mm to keep elapsed hours beyond 24. The sample from October 7 at 11:30 PM to October 9 at 2:15 AM previews as 26:45 (1,605 minutes). This is a recreated dialog.

The square brackets tell Excel to show elapsed time, so the total keeps counting past 24 hours or 60 minutes. Without them, 26:45 would show as 2:45. Microsoft lists these elapsed-time codes on its Format numbers as dates or times page. Keep in mind that a format changes only the display. The cell still holds a fraction of a day, so multiply by 1440 before you use it in minute math. If custom codes are new to you, this walkthrough on changing the number format in Excel shows where each option lives.

Totals, averages and blank rows

Once each row has its minutes in column C, the usual functions summarize them. For the call log above:

  • Total minutes: =SUM(C2:C4) returns 647.
  • Total as hours and minutes: =SUM(C2:C4)/1440 formatted as [h]:mm shows 10:47.
  • Average: =AVERAGE(C2:C4) returns about 215.7.
  • Calls over 30 minutes: =COUNTIF(C2:C4,">30") returns 3.

To skip the helper column, =SUM(MOD(B2:B4-A2:A4,1))*1440 totals every row at once. It works as typed in Excel for Microsoft 365 and Excel 2021 or later. In Excel 2019 and 2016, press Ctrl + Shift + Enter to enter it as an array formula.

Rows without times yet return 0, which drags down an average. Wrap the formula so empty rows stay empty: =IF(OR(A2="",B2=""),"",MOD(B2-A2,1)*1440). SUM and AVERAGE ignore the blank results.

Common variations

Subtract an unpaid break

With the break in minutes in D2, use =MOD(B2-A2,1)*1440-D2. Jordan’s 8:00 AM to 4:30 PM day with a 30-minute lunch comes to 480 minutes. To turn that into paid hours, use the steps for calculating hours worked in Excel.

Minutes early or late

To compare an actual time in B2 with a scheduled time in A2, keep the sign: =ROUND((B2-A2)*1440,0). Arriving at 9:12 for a 9:00 start gives 12; arriving at 8:50 gives -10. Negative numbers display fine in General format. Only a time format turns them into #####.

Minutes from a start time until now

If A2 holds a full date and time, =(NOW()-A2)*1440 shows the minutes elapsed so far. If A2 holds a time only, use =MOD(NOW()-A2,1)*1440. NOW updates whenever the sheet recalculates (press F9 to refresh), so the number won’t tick up on its own.

Times stored as text

Times pasted from another system sometimes sit on the left of the cell and won’t calculate. Convert them inside the formula: =(TIMEVALUE(B2)-TIMEVALUE(A2))*1440. TIMEVALUE reads text such as “9:15 AM” or “21:15” and ignores any date in the text, so combine it with MOD for overnight times.

Avoid HOUR and MINUTE for totals

=MINUTE(B2-A2) returns only the minutes part of the clock reading (0 to 59), so 90 minutes comes back as 30. =HOUR(B2-A2)*60+MINUTE(B2-A2) fixes that for short spans but ignores whole days: the 26-hour-45-minute example above would give 165. The 1440 method has neither problem. The TEXT function has a different catch: =TEXT(B2-A2,"[m]") looks right but returns text, which SUM skips.

Going the other direction, adding minutes to a time, works by dividing by 1440: =A2+45/1440. There’s a worked example in this guide to adding 15 minutes to a time in Excel.

How do I turn the minutes into decimal hours?

Divide the minutes by 60, or calculate hours directly with =MOD(B2-A2,1)*24. 510 minutes becomes 8.5 hours. More options are in this guide to converting minutes to hours in Excel.

##### or a zero result

The cell shows #####

Either the column is too narrow or the result is a negative time. Microsoft’s page on correcting a ##### error covers both. Drag the right edge of the column header to widen it. If that doesn’t help, the end time is earlier than the start time: switch to the MOD formula, or format the cell as General.

You may see advice to switch the workbook to the 1904 date system so negative times display. That changes how every date in the workbook is stored, and Microsoft’s page on date systems in Excel explains that the two systems are 1,462 days apart, so dates copied between workbooks can shift by about four years. It’s better avoided for this task.

The result is 0, a decimal like 0.0625, or a clock time

The formula is missing *1440, or the result cell has a time format. Check the formula, then set the format to General.

#VALUE!

One of the cells holds text Excel can’t read as a time, such as “9.15” or “9:15am” with no space. Retype it as 9:15 AM, or use TIMEVALUE once the text is in a readable form.

The answer is off by 720 or 1,440 minutes

An error of 720 minutes (12 hours) is almost always an AM/PM mix-up. Typing 9:00 means 9:00 AM; for the evening, type 9:00 PM or 21:00. An error of 1,440 minutes means a date is involved: either one cell has a date and the other doesn’t, or MOD removed a full day from a date-and-time range.

Put =MOD(B2-A2,1)*1440 in your first row, format it as General and check one answer by hand. Once it matches, fill it down, then add a SUM or AVERAGE row for your totals.