← Functions
timedatefunctionsbeginner

Excel TIME Function

TIME builds a valid Excel time from hour, minute, and second values, returning a decimal Excel can calculate and format as a clock time.

TIME takes an hour, a minute, and a second and combines them into a single time value Excel can calculate with. It's the time equivalent of the DATE function: instead of building a date from year, month, and day, TIME builds a time from three separate numbers you might have sitting in different cells. The result behaves like any other clock time in Excel, which means it also inherits the quirks of Excel's clock: feed it 24 hours and it resets to 0, feed it a negative result and it errors out.

Available in: Excel 365, Excel 2021, Excel 2019, Excel 2016, and earlier versions, going back to the earliest releases of Excel. Also available in Excel for the web and the Excel mobile apps.

Syntax

=TIME(hour, minute, second)
ParameterRequiredDescription
hourYesA number from 0 to 23. Values above 23 don't error, they roll into the next day and reset.
minuteYesA number from 0 to 59. Values above 59 roll forward into the hour, so 90 minutes becomes 1 hour 30 minutes.
secondYesA number from 0 to 59. Same rollover rule applies here: 90 seconds becomes 1 minute 30 seconds.

Basic Example

A timesheet stores an employee's clock-in hour and minute in separate columns instead of one formatted time. To turn those two numbers into an actual time value:

=TIME(B2, C2, 0)

// B2  = 9 (the hour column)
// C2  = 15 (the minute column)
// 0   = no seconds tracked, so this stays fixed

For Maria Chen's row, B2 holds 9 and C2 holds 15. TIME combines them into 0.385416667, the decimal Excel uses internally for 9:15 AM. Format the cell as time and it displays as 9:15:00 AM. Nothing about the calculation changes, only the display.

How TIME Works

It returns a fraction of a day, not a special "time" type

Excel has no dedicated time data type. TIME(9,15,0) returns 0.385416666666667, exactly the number Excel stores if you type 9:15 AM directly into a cell. The formula and the manual entry are identical under the hood. A time format just tells Excel to display that decimal as a clock reading instead of a number.

Out-of-range minutes and seconds roll forward, not sideways

Push a minute or second value past its normal range and TIME doesn't error. It carries the overflow into the unit above it, the same way a stopwatch turns 90 seconds into 1 minute 30 seconds. =TIME(9, 90, 0) returns 10:30:00, not an error and not a literal "9:90:00." This rollover is genuinely useful for calculated durations, and it's a detail most references skip entirely.

Excel resets every 24 hours

TIME(24,0,0) returns 0, not 1. TIME(25,0,0) returns the same value as TIME(1,0,0), which formats as 1:00:00 AM. TIME behaves exactly like a 24-hour clock: once the total reaches a full day, it wraps back to midnight and keeps counting from there.

TIME can't represent a duration longer than 24 hours on its own. If you need to track something like 30 hours of accumulated work time, don't pass 30 into the hour argument, it will just wrap around to 6:00:00. Instead, build the duration with plain addition and format the result cell with the custom number format [h]:mm:ss, which displays hours beyond 24 instead of resetting them.

Negative results throw an error instead of returning one

TIME won't quietly hand back a negative time. If the hour, minute, and second arguments combine to less than zero, such as TIME(-2, 0, 0), Excel returns #NUM! instead of guessing at something like "yesterday's time." More on this in Handling Errors below.

Common Use Cases

Building shift start times from separate timesheet columns

A payroll sheet logs punch-in hours and minutes in two columns instead of one time field.

=TIME(B2, C2, 0)   // builds the clock-in time from hour column B and minute column C

Combining a date and a time into a single timestamp

An order log stores the ship date in one set of columns and the ship time in another, but sorting requires one combined value.

=DATE(E2, F2, G2) + TIME(H2, I2, J2)

// DATE(E2, F2, G2)  = the shipping date
// TIME(H2, I2, J2)  = the shipping time
// adding the two combines date and time into one serial number

Calculating an end time from a start time and a duration

A shift starts at a known time and runs for a set number of hours and minutes. Calculate when it ends.

=B2 + TIME(C2, D2, 0)

// B2            = shift start time, already formatted as time
// TIME(C2, D2, 0) = duration in hours (C2) and minutes (D2)

Handling Errors

TIME returns #NUM! when the hour, minute, and second arguments combine to a negative result. This is the only error TIME throws on its own; it doesn't return #VALUE! or #N/A under normal use.

Common causes of #NUM!:

  • A negative hour argument, like TIME(-1, 0, 0)
  • A formula that subtracts a larger duration from a smaller one before the result reaches TIME
  • A referenced cell that calculates to a negative number without you realizing it
=IFERROR(TIME(B2, C2, D2), "Negative time: check inputs")

Because #NUM! is the only error TIME can throw, wrapping just the TIME() call in IFERROR is safe here; it won't accidentally swallow an unrelated error the way it would with a function that throws several error types. If TIME is nested inside a larger formula, wrap only the TIME() call itself rather than the entire formula, so a genuine #NUM! from a negative time doesn't get confused with a different problem elsewhere in the calculation.

If you're chaining TIME into a bigger formula, like subtracting one shift's end time from another's start time, check the subtraction for negatives before it hits TIME. That's almost always the real source of the #NUM! error, not TIME itself.

Notes & Gotchas

What does the TIME function actually return in Excel?

TIME returns a number representing a fraction of a 24-hour day, somewhere between 0 and 0.999988426 (23:59:59). It never returns a value of exactly 1, since that would represent the start of the next day rather than a time within the current one. Apply a time format to see it as a clock reading instead of a decimal.

What is the difference between TIME and NOW?

TIME constructs a time from hour, minute, and second values you supply. NOW returns the computer's current date and time automatically, with no arguments at all. Use TIME when you're building a time from known components; use NOW when you need whatever time it is right now, and note that NOW recalculates every time the workbook does.

Can TIME be used with other functions?

Yes. TIME is almost always paired with something else rather than used alone. Common pairings include DATE (to build a full timestamp), HOUR/MINUTE/SECOND (to pull components back out of an existing time), and simple addition or subtraction (to calculate durations or shift end times).

What errors or issues should I watch for with TIME?

The main one is the #NUM! error, which appears whenever the combined arguments produce a negative time; hour above 23, minute above 59, or second above 59 will not cause this, since those roll forward instead. Separately, TIME has no concept of time zones or daylight saving. It builds a plain, zone-agnostic time value, so any adjustment for a specific location has to happen in a separate formula.

How do you insert the current time in Excel?

Use =NOW(), which returns the current date and time as a live value that updates on recalculation. If you only want the time to display, format the cell using a time format like h:mm:ss AM/PM; the date portion is still stored, it's just hidden from view. For a time that doesn't change once entered, press Ctrl+Shift+; instead.

Why does TIME reset to 0 at 24 hours and 48 hours?

Because TIME models a single day's clock, not an open-ended counter. TIME(24,0,0) and TIME(48,0,0) both return 0, the same as midnight, since each full 24-hour cycle wraps back to the start. This matches how a physical clock face works: it doesn't count past 12, it just goes around again.

Does TIME work with durations longer than 24 hours?

Not directly. Feed TIME an hour value above 23 and it wraps around instead of accumulating, which silently produces the wrong result for anything tracking total elapsed hours. Build the duration with regular addition instead, and format the result cell with [h]:mm:ss so hours display past 24 rather than resetting.

What happens if you pass a decimal into TIME's arguments?

TIME doesn't truncate decimal values, it cascades the fraction down into the next smaller unit instead. TIME(9, 30.9, 0) returns 9:30:54, not 9:30:00, because the .9 of a minute converts into 54 seconds (0.9 × 60) rather than getting dropped. The same cascading happens with a fractional hour: TIME(9.5, 0, 0) returns 9:30:00, the half-hour carried down into minutes. A fractional second is kept as-is, since seconds are already the smallest unit TIME accepts. If you're feeding TIME a calculated value that might carry a fractional minute or second, expect that fraction to reappear in the next unit down, not disappear.

Related Functions

FunctionUse this when...
DATEYou need to build a calendar date from year, month, and day instead of a clock time.
HOURYou already have a time value and need to pull just the hour back out of it.
MINUTEYou need to extract only the minute component from an existing time.
SECONDYou need to extract only the seconds component, keeping in mind it rounds fractional seconds.
NOWYou need the current date and time from the system clock instead of a constructed value.