ExcelDateBeginner

TIME

Returns the decimal number for a particular time.

Read the syntaxReview worked examplesOpen the spreadsheet app
=TIME(hour, minute, second)

This static page keeps the function indexed for search, while the spreadsheet app handles interactive exploration and saved formulas.

What the function does

Overview

Returns the decimal number for a particular time.

The TIME function creates a valid Excel time value from individual hour, minute, and second components. Excel stores times as fractional parts of a day, where 0 represents 00:00:00 (midnight) and 0.99999 represents 23:59:59. This function is extremely useful for constructing time values dynamically or from separate numeric inputs. The `hour` argument must be a number from 0 to 23, `minute` from 0 to 59, and `second` from 0 to 59. If any argument falls outside its valid range, Excel adjusts it accordingly (e.g., 60 minutes becomes 1 hour and 0 minutes). The returned value can then be formatted as a time using number formatting.

Quick reference

Syntax

=TIME(hour, minute, second)

Inputs

Arguments

hourA number from 0 (12:00 A.M.) to 23 (11:00 P.M.) representing the hour.
Example: 14
minuteA number from 0 to 59 representing the minute.
Example: 30
secondA number from 0 to 59 representing the second.
Example: 0

Formula patterns

Examples

1

Create a time value for 2:30 PM

=TIME(14, 30, 0)
time creationdata entryformatting
2

Create a time value from cell inputs

=TIME(A2, B2, C2)
cell referencesdynamic time

Avoid these issues

Common Errors

1

#VALUE!

Cause: Occurs if any argument is non-numeric.

Fix: Ensure hour, minute, and second are provided as numbers.

2

Invalid Time

Cause: While Excel adjusts out-of-range numbers, providing negative or extremely large numbers can lead to unexpected results or errors in subsequent calculations.

Fix: Keep arguments within their logical ranges (0-23 for hour, 0-59 for minute/second) for clarity and predictable behavior.

Platform support

Compatibility

Excel 2007+Google Sheets

Available in Excel 2007 and later versions, including Excel 365.

Source: Microsoft Support

Common questions

Frequently Asked Questions

Returns the decimal number for a particular time.

hour: A number from 0 (12:00 A.M.) to 23 (11:00 P.M.) representing the hour. minute: A number from 0 to 59 representing the minute. second: A number from 0 to 59 representing the second.

#VALUE!: Ensure hour, minute, and second are provided as numbers. Invalid Time: Keep arguments within their logical ranges (0-23 for hour, 0-59 for minute/second) for clarity and predictable behavior.