Practice free

TIME function

TIME builds a time value from hour, minute and second numbers and returns it as a decimal part of a day. Format the result as a time, since noon comes back as 0.5.

Example

Read it as a sentence: make the time 12:00 PM from 12 hours, 0 minutes and 0 seconds, which gives 12:00 PM.

Practice this in the app

Syntax

TIME(hour, minute, second)

hour (required)
Hour; values above 23 wrap around.
minute (required)
Minute; overflow carries into hours.
second (required)
Second; overflow carries into minutes.

Returns: A fraction of a day between 0 and 0.99999.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=TIME(12,0,0) 12:00 PM Noon
=TIME(25,0,0) 1:00 AM Hour past 24
=TIME(0,90,0) 1:30 AM Minutes past 59
=TIME(0,0,3600) 1:00 AM Seconds past 59
=TIME(1,-30,0) 12:30 AM Negative minutes net positive
=TIME(32767,0,0) 7:00 AM Largest hour
=TIME(0,-1,0) #NUM! Net negative
=TIME(-1,0,0) #NUM! Negative hour

Watch out for

  • The result is a decimal (noon is 0.5), so format as a time.
  • Hours over 23 are wrapped, so TIME(25,0,0) is 1 AM; use arithmetic for durations over a day.

Where it works

Excel
TIME is in every version of Excel from 2007 on.
Google Sheets
Same name, same behaviour for everyday use.

Part of Date and time functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .