TIME builds a time of day from three numbers. =TIME(9,30,0) returns 0.395833, which a time format shows as 9:30 AM. Excel stores a time as a fraction of a day: noon is 0.5, 6 pm is 0.75, and one hour is 1/24 or 0.041667. TIME is to times what DATE is to dates: the safe way to create one inside a formula.
The three arguments
All three arguments are required, even if you only have hours and minutes. Use 0 for seconds: =TIME(9,30,0).
- hour is the hour. A value above 23 wraps around, so
TIME(27,0,0) is the same as TIME(3,0,0). TIME never returns a day count, only a fraction below 1. - minute can exceed 59.
TIME(0,90,0) is 1:30. - second can also exceed 59 and rolls into minutes.
This makes TIME good for converting a total of minutes or seconds into a clock time: =TIME(0,B2,0) for 135 minutes gives 2:15. For a total above 24 hours, TIME wraps back to the start, so use division instead: =B2/1440, formatted as [h]:mm.
Times are fractions
Because a time is a fraction of a day, arithmetic works on it directly. =TIME(17,45,0)-TIME(9,15,0) returns 0.354167, which a time format shows as 8:30. To get decimal hours, multiply by 24: =(B2-A2)*24 returns 8.5. To get minutes, multiply by 1,440.
Combining with dates
A date-and-time value is a date serial plus a time fraction. Add TIME to a date to build a timestamp: =DATE(2025,3,15)+TIME(9,30,0). Format the cell as dd-mmm-yyyy hh:mm to read it.
Patterns
- Shift start from decimal hours:
=TIME(INT(A2),MOD(A2,1)*60,0) turns 9.5 into 9:30. - Finish time from a duration:
=A2+TIME(2,30,0) adds two and a half hours. - Over midnight:
=MOD(End-Start,1) handles a shift from 22:00 to 06:00, where a plain subtraction would be negative. - Time from text parts:
=TIME(LEFT(A2,2),MID(A2,4,2),0) for text such as 09:30.
Display
If a TIME result shows as 0.395833, the cell has a General or Number format. Apply a time format. If it shows ##### the result is negative, which can't be displayed as a time.