HOUR Function

Returns the hour from a time.

Category

Date & Time

Available in

All versions, Microsoft 365

Returns

A number from 0 to 23

Taught hands-on in Level 3: Intermediate Lookups & Data Summaries · Dates & Times module

Overview

HOUR returns the hour of a time on the 24-hour clock: 0 (midnight) to 23 (11 PM).

It's handy for grouping timestamps by hour — busiest call times, peak sales hours.

Syntax

=HOUR(serial_number) Explain

Arguments

ArgumentRequired?What it does
serial_numberYesA time, a date with a time, or time text such as "6:45 PM".

Examples

Example 1 — Hour of each call

Northstar's support log records the time of each call.

B2fx=HOUR(A2)
AB
1Call timeHour
29:30 AM9
36:45 PM18
412:15 AM0
53/15/2026 2:20 PM14
=HOUR(A2) Explain

Example 2 — Count calls in the 2 PM hour

Compare the hour of every timestamp.

=SUMPRODUCT(--(HOUR(A2:A500)=14)) Explain

Common mistakes

  • Durations over 24 hours. HOUR only returns 0–23. For total hours in a duration, use =A2*24.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.