Google Sheets TIMEVALUE Function: How to Use It

How-to basics · Updated November 23, 2026

The Google Sheets TIMEVALUE function converts a time written as text (like “3:30 PM”) into a decimal fraction of a 24-hour day (like 0.6458333), which Sheets can then use in calculations. The syntax is TIMEVALUE(time_string), where time_string is a text string in a recognized time format.

What TIMEVALUE Actually Returns

In Google Sheets, dates and times are stored as numbers. The integer part represents the number of days since December 30, 1899, and the decimal part represents the fraction of a day. TIMEVALUE extracts just the decimal part from a time given as text. For example:

  • TIMEVALUE("12:00:00") returns 0.5 (noon is half a day).
  • TIMEVALUE("6:00 AM") returns 0.25 (6 AM is a quarter of a day).
  • TIMEVALUE("18:00") returns 0.75 (6 PM is three quarters of a day).

If you format the result cell as a time (Format > Number > Time), you’ll see the original time again, but the underlying value is a fraction. This is useful when you need to compare times, calculate durations, or feed time values into other formulas.

How to Use TIMEVALUE in a Formula

The function takes exactly one argument: a text string that represents a time. You can enter the text directly in quotes, or reference a cell that contains time as text. Here are typical examples:

  • =TIMEVALUE("9:30 AM") → returns 0.3958333333.
  • =TIMEVALUE(A1) where A1 contains “21:45” → returns 0.90625.
  • To get the time portion of a full date-time text: =TIMEVALUE("2025-03-15 14:00") → returns 0.5833333333.

If the text is not a valid time, TIMEVALUE returns a #VALUE! error. For instance, TIMEVALUE("14:00 PM") will error because “14:00” is already 24-hour format; adding “PM” is invalid.

Common Use Cases and Examples

You’ll often use TIMEVALUE when you have imported data where times are stored as text, and you need to perform arithmetic. For example, to calculate the difference between two text times:

  1. Put “8:30 AM” in A1 and “5:15 PM” in B1.
  2. Use =TIMEVALUE(B1)-TIMEVALUE(A1).
  3. Format the result as a duration (Format > Number > Duration) to see 8:45:00 (8 hours 45 minutes).

Another example: to check if a time is before noon, you could use =IF(TIMEVALUE("11:59 AM")<0.5, "AM", "PM"). But note that TIMEVALUE only works with text; if your cell already contains a real time value (not text), you don’t need TIMEVALUE—just use the cell reference directly.

Differences Between TIMEVALUE and TIME

Many users confuse TIMEVALUE with the TIME function. They serve different purposes:

  • TIMEVALUE converts a text string into a decimal fraction. It takes one argument (the text).
  • TIME creates a time value from separate hour, minute, and second numbers. For example, TIME(14,30,0) returns the time 2:30 PM as a decimal (0.6041667).

Use TIME when you have numeric components; use TIMEVALUE when you have text. If you have a cell that already contains a time (formatted as time), using TIMEVALUE on it will return an error because the cell is not text—it’s a number. In that case, just use the cell reference directly.

Formatting and Locale Considerations

Google Sheets respects the spreadsheet’s locale settings when interpreting time text. For example, in the US, “3:00 PM” is standard, but in many European locales, “15:00” is standard. If you use a text format that doesn’t match your locale, TIMEVALUE may return an error. To avoid issues, use 24-hour format (e.g., “15:00”) which is widely accepted, or ensure the text matches the locale’s time format.

Also, TIMEVALUE ignores the date part if you provide a date-time string. It only extracts the time fraction. If you provide only a date (like “2025-03-15”), it returns 0 (midnight).

Common Errors and Troubleshooting

Here are the most frequent problems users encounter:

  • #VALUE! error: The text is not a valid time. Check for extra spaces, wrong AM/PM, or a format not recognized by your locale.
  • Result shows as a time, not a decimal: The cell is formatted as Time. Change the format to Number to see the fraction.
  • Using TIMEVALUE on a real time cell: If the cell already contains a time value (not text), TIMEVALUE will error. Use the cell reference directly in calculations.
  • Negative results: If you subtract a later time from an earlier one, you’ll get a negative decimal. Use the ABS function or adjust the formula to handle overnight shifts.

For example, if A1 contains “11:00 PM” and B1 contains “2:00 AM” (next day), TIMEVALUE(B1)-TIMEVALUE(A1) returns a negative number. To calculate the overnight duration, use =IF(B1<A1, B1+1-A1, B1-A1) after converting with TIMEVALUE.

Related Functions and Alternatives

Google Sheets offers several functions that work with times:

  • VALUE: Converts a text string that represents a date/time into a number. For example, VALUE("3:00 PM") returns the same as TIMEVALUE. In fact, TIMEVALUE is essentially a specialized version of VALUE for time-only strings.
  • TO_PURE_NUMBER: Converts a date/time value to a pure number, but works on actual date-time values, not text.
  • HOUR, MINUTE, SECOND: Extract parts from a time value (not from text directly). You can combine them: =HOUR(TIMEVALUE("9:30 AM")) returns 9.
  • NOW and TODAY: Return current date/time; you can use =NOW()-TIMEVALUE("0:00") to get the current time as a fraction, but simpler is =MOD(NOW(),1).

If you need to parse times from imported data, consider using the SPLIT function to separate time components, or use REGEXEXTRACT to pull out the time string before applying TIMEVALUE.

Frequently Asked Questions

Why does TIMEVALUE return a number like 0.5 instead of 12:00?

Because Sheets stores times as fractions of a day. 0.5 represents half a day, which is 12:00 noon. To display it as a time, format the cell as Time (Format > Number > Time).

Can I use TIMEVALUE with a cell that already contains a time?

No, not directly. If the cell contains a time value (not text), TIMEVALUE will return an error because it expects text. Instead, just reference the cell directly in calculations, since it’s already a numeric time value.

How do I convert a time in text like “2:30 PM” to 24-hour format?

Use =TEXT(TIMEVALUE("2:30 PM"), "HH:MM") to get “14:30”. The TEXT function formats the decimal value as a 24-hour time string.

What’s the difference between TIMEVALUE and VALUE in Google Sheets?

VALUE converts a text string that looks like a date or time into a number (including the date part). TIMEVALUE specifically converts a time-only string into the fractional part of the day. For time-only strings, they return the same result.

Can TIMEVALUE handle times with seconds?

Yes, it accepts strings like “10:15:30 AM” and returns the corresponding fraction (e.g., 0.4274306). The seconds are included in the decimal fraction.

Why does my TIMEVALUE formula return #VALUE! when I reference a cell?

Most likely the cell contains a number (a real time value) rather than text. Check the cell format: if it’s formatted as a time, it’s a number. Use the cell directly in formulas, or convert it to text first with =TEXT(A1, "HH:MM") and then apply TIMEVALUE.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.