Skip to content

TIME

Builds a time of day from an hour, a minute and a second. The result is a fraction of a 24-hour day.

Syntax

=TIME(, , )

Date and time

All versions of Excel.

Try it

Edit the formula in C2 or change the inputs. The sheet recalculates as you type.

C2
A
B
C
D
1
Hour
Minute
Time
2
9
30
9:30 AM
3

C2 =ROUND(TIME(A2,B2,0),6) returns 9:30 AM

How TIME works

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.

Arguments

hour
The hour, normally 0 to 23. A larger number wraps around the clock, so 27 is treated as 3 am. Fractions are cut off.
minute
The minute, normally 0 to 59. Values of 60 or more roll into the hours, so 90 minutes is 1 hour 30 minutes.
second
The second, normally 0 to 59. Values of 60 or more roll into the minutes. Use 0 when you only have hours and minutes.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Build 9:30 AM

C2 =ROUND(TIME(A2,B2,0),6)

Result: 9:30 AM

Excel stores 9:30 as 0.3958333, which is 9.5 hours out of 24. The ROUND keeps the stored value short here. The time format shows it as 9:30 AM.

C2
A
B
C
D
1
Hour
Minute
Time
2
9
30
9:30 AM
3

C2 =ROUND(TIME(A2,B2,0),6) returns 9:30 AM

Example 2

Hours worked, with a time subtraction

C2 =(B2-A2)*24

Result: 8.5

Subtracting gives 8:30 as a fraction of a day. Multiplying by 24 turns it into 8.5 hours.

C2
A
B
C
D
1
Start
End
Hours worked
2
9:15
17:45
8.5
3

C2 =(B2-A2)*24 returns 8.5

Example 3

Hours wrap round after 24

B2 =TIME(A2,0,0)*24

Result: 3

27 hours wraps to 3 am, which is 3 hours into the day. Multiplying by 24 shows that as 3.

B2
A
B
C
1
Hours
Hours into the day
2
27
3
3

B2 =TIME(A2,0,0)*24 returns 3

Example 4

Convert minutes to a clock time

B2 =TIME(0,A2,0)*24

Result: 2.25

135 minutes rolls over into 2 hours 15 minutes, which is 2.25 hours. In a real sheet, leave off the *24 and format the cell as h:mm to read 2:15.

B2
A
B
C
1
Minutes
Decimal hours
2
135
2.25
3

B2 =TIME(0,A2,0)*24 returns 2.25

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In C2, build a time of day from the hour in A2 and the minute in B2. Fill it down to C4.

Answer in C2, then it fills down to C4.

C2
A
B
C
D
E
F
G
1
Hour
Minute
Start time
Shift start
Shift end
Hours worked
2
9
15
9:15
17:45
3
13
30
4
8
0
5

Common mistakes

  • All three arguments are required. =TIME(9,30) is rejected, so write =TIME(9,30,0).
  • TIME wraps at 24 hours. It can't return 30 hours. For durations above a day, divide minutes by 1,440 and format the cell as [h]:mm.
  • The result is a fraction, so 0.395833 isn't an error. Apply a time format, or multiply by 24 for decimal hours.
  • Subtracting a later time from an earlier one gives a negative number, shown as #####. For shifts over midnight, use MOD(end-start,1).
  • Hours and minutes aren't decimal. TIME(0,150,0) is 2:30, not 1:50. To convert decimal hours such as 9.5, use TIME(INT(A2),MOD(A2,1)*60,0).

Questions people ask

How do I enter a time in a formula?

Use `=TIME(9,30,0)` for 9:30 AM. Always include all three arguments, and format the cell as a time.

How do I calculate hours between two times?

Subtract and multiply by 24: `=(B2-A2)*24`. For a shift that crosses midnight, use `=MOD(B2-A2,1)*24`.

Why does TIME return a decimal like 0.395833?

Excel stores times as a fraction of a 24-hour day. Format the cell as a time, such as `h:mm AM/PM`, to read it as 9:30 AM.

How do I add hours to a time or date?

Add a TIME value: `=A2+TIME(3,0,0)` adds three hours. You can also add a fraction of a day directly, such as `+3/24`.

How do I convert decimal hours like 7.75 into a time?

Divide by 24: `=7.75/24`, formatted as a time, shows 7:45. Or use `=TIME(INT(A2),MOD(A2,1)*60,0)`.

Learn TIME in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.