Assembles a time value from separate hour, minute and second numbers.
TIME takes three numbers and returns a time Excel understands. It is the counterpart to DATE, and it exists for the same reason: times arrive split across columns, or need building from a calculation rather than typed.
The thing to know before anything else is that Excel stores a time as a fraction of a day. Midday is 0.5, six in the morning is 0.25, and one hour is 1/24. Every oddity below follows from that single fact, and none of it makes sense without it.
Values outside the normal range wrap rather than erroring, which is usually helpful and occasionally not. =TIME(25, 0, 0) returns 01:00, because 25 hours is one day and one hour and TIME keeps only the time part. That means TIME cannot represent a duration longer than 24 hours — for those you add raw numbers and format the result as [h]:mm.
=TIME(hour, minute, second)hourminutesecondHeaders in row 1, data in A2:D5. Columns B and C hold real times.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Staff | Clock in | Clock out | Break (mins) |
| 2 | Alice Moreau | 08:15 | 16:45 | 30 |
| 3 | Bruno Santos | 13:00 | 21:30 | 45 |
| 4 | Chen Wei | 22:00 | 06:00 | 60 |
| 5 | Dana Okafor | 09:30 | 14:00 | 0 |
=TIME(9, 30, 0)Result: 09:30
A time assembled from three numbers rather than typed as text.
=TIME(0, D2, 0)Result: 00:30
Turning a break of 30 minutes into a real time value, so it can be subtracted from a shift length.
=C2 - B2 - TIME(0, D2, 0)Result: 08:00
The shift calculation: clock out minus clock in minus the break, all as time values.
=TIME(25, 0, 0)Result: 01:00
The wrap. 25 hours is a day and an hour, and TIME keeps only the remainder — which is why it cannot hold a duration.
Reading about a formula is not the same as writing one. Open this function's exercise and type it into a real grid — you get instant feedback on exactly which cell is wrong and why.
Why it happens: The cell is formatted as General. A time is a fraction of a day underneath.
How to fix it: Format the cell as a time. The value is already correct.
Why it happens: The standard h:mm format only shows the time-of-day part, so 30 hours displays as 6:00.
How to fix it: Use the custom format [h]:mm — the square brackets tell Excel to let hours accumulate past 24.
Why it happens: Excel cannot display a negative time in the 1900 date system, which happens on an overnight shift where clock out is earlier than clock in.
How to fix it: Add a day when the end is earlier: =C4 - B4 + (C4 < B4).
Why it happens: An argument is negative.
How to fix it: TIME accepts values above the normal range but not below zero.
The h:mm format shows only the time-of-day part, discarding whole days. Apply the custom number format [h]:mm instead — the brackets tell Excel to keep accumulating hours rather than wrapping at midnight.
Multiply by 24. A time is stored as a fraction of a day, so 8:30 is 0.354166, and multiplying gives 8.5 — the figure a timesheet or payroll calculation needs.
Add one day when the end time is earlier than the start: =end - start + (end < start). The comparison returns TRUE, which is 1, so exactly one day is added only when needed.
Longer reads where this function does real work in a real sheet.