Skip to content

TIMEVALUE

Converts a time written as text, such as "6:00 AM", into a decimal fraction of a day that Excel can calculate with.

Syntax

=TIMEVALUE()

Date and time

All versions of Excel.

Try it

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

B2
A
B
C
1
Time (text)
Value
2
6:00 AM
0.25
3

B2 =TIMEVALUE(A2) returns 0.25

How TIMEVALUE works

TIMEVALUE turns a time stored as text into a real time value. Excel stores times as fractions of a day: midnight is 0, noon is 0.5 and 6 pm is 0.75. =TIMEVALUE("6:00 AM") returns 0.25. Format the cell as a time and it displays as 6:00 AM.

Why you need it

Times that arrive from a CSV export, a booking system or a copy-paste are often text. They look right, but =A2+0.5 fails and a sum is zero. TIMEVALUE makes the conversion explicit, so the result is a number you can add, subtract, compare and chart.

The one argument

time_text must look like a time. These are accepted: "14:45", "2:45 PM", "14:45:30" and "6 AM". A date in the text is ignored: =TIMEVALUE("2025-03-15 12:00") returns 0.5, not a date-time. If you need the date as well, convert it with DATEVALUE and add the two results.

The result is always from 0 up to, but not including, 1.

Common patterns

  • Decimal hours from text: =TIMEVALUE(A2)*24. A shift start of "13:30" becomes 13.5.
  • Add a time to a date: =DATE(2025,3,15)+TIMEVALUE("12:00") returns 45731.5, which is noon on 15 March 2025.
  • Compare text times: =TIMEVALUE(A2)>TIMEVALUE("09:00") is true for anything later than nine o'clock. Comparing the text itself is unreliable.
  • Get parts of the time: =HOUR(TIMEVALUE(A2)), though HOUR already accepts text directly.

TIMEVALUE, TIME and VALUE

TIME builds a time from three numbers (hour, minute, second). TIMEVALUE reads one piece of text. If the hours and minutes are already in separate cells, use TIME. If you have one text such as "14:45", use TIMEVALUE.

After the conversion

TIMEVALUE returns a plain decimal. Apply a time format such as h:mm AM/PM to display it as a time, or multiply by 24 for hours, by 1440 for minutes or by 86400 for seconds. Rounding errors can show up in the last decimal places, so wrap a product in ROUND if you compare it with a whole number.

Arguments

time_text
Text that Excel can read as a time, such as "14:45", "2:45 PM" or "10:15:42". It can be a quoted string or a cell holding text. Text Excel can't read as a time returns #VALUE!.

Examples

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

Example 1

Convert a morning time to a fraction of a day

B2 =TIMEVALUE(A2)

Result: 0.25

6 am is a quarter of the way through the day, so the result is 0.25.

B2
A
B
C
1
Time (text)
Value
2
6:00 AM
0.25
3

B2 =TIMEVALUE(A2) returns 0.25

Example 2

Turn a text time into decimal hours

B2 =TIMEVALUE(A2)*24

Result: 13.50

TIMEVALUE returns 0.5625. Multiplying by 24 gives 13.5 hours.

B2
A
B
C
1
Clock-in (text)
Decimal hours
2
13:30
13.50
3

B2 =TIMEVALUE(A2)*24 returns 13.50

Example 3

Add a time to a date

C2 =A2+TIMEVALUE(B2)

Result: 15-Mar-2025 12:00

The date is the whole-number part and the time is the fraction, so adding them gives noon on 15 March 2025.

C2
A
B
C
1
Date
Time (text)
Timestamp
2
15-Mar-2025
12:00
15-Mar-2025 12:00
3

C2 =A2+TIMEVALUE(B2) returns 15-Mar-2025 12:00

Your turn.

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

Task 1 of 2

The clock-in times in column A are text. In B2, convert the time in A2 to a real time value. Fill it down to B4.

Answer in B2, then it fills down to B4.

B2
A
B
C
D
1
Clock-in (text)
As a time
Decimal hours
2
08:00
3
13:30
4
17:45
5

Common mistakes

  • TIMEVALUE needs text that looks like a time. A value that is already a real time, or a number like 0.5, should not need it.
  • A date in the text is ignored. =TIMEVALUE("2025-03-15 12:00") returns 0.5, so add DATEVALUE when you need both parts.
  • The result is a decimal such as 0.25. If the cell shows a plain number, apply a time format, or multiply by 24 for hours.
  • Text with stray or non-breaking spaces can return #VALUE!. Clean it with TRIM first.

Questions people ask

How do I convert text to time in Excel?

Use `=TIMEVALUE(A2)`, then format the result as a time. Fill the formula down for a column of text times.

Why does TIMEVALUE return #VALUE!?

The text isn't something Excel reads as a time, or it has hidden characters. Check for extra spaces, a missing colon or an hour above 23, and clean the text with TRIM.

How do I convert a time to decimal hours?

Multiply by 24: `=TIMEVALUE(A2)*24`. For a cell that already holds a real time, use `=A2*24`.

What is the difference between TIMEVALUE and TIME?

TIME builds a time from three numbers (hour, minute, second). TIMEVALUE reads one piece of text such as `"14:45"`.

Learn TIMEVALUE in a real sheet.

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