← Functions
seconddatefunctionsbeginner

Excel SECOND Function

SECOND extracts the seconds component from a time value, returning a number between 0 and 59.

SECOND takes a time value and returns the seconds portion as a whole number from 0 to 59. It does not add up total elapsed seconds; it just reads the seconds digit off the clock face for that specific moment. If you're trying to calculate a duration in seconds, you'll need SECOND combined with HOUR and MINUTE, not SECOND alone.

Syntax

=SECOND(serial_number)
ParameterRequiredDescription
serial_numberYesThe time you want to read the seconds from. Accepts a cell reference containing a time, a full date-time value, or a text string Excel can recognize as a time, like "7:45:30 PM".

Excel stores every date and time as a serial number behind the scenes. A time of 12:00 PM is stored as 0.5, since it's exactly half of one day.

Basic Example

A call center logs timestamps for when each support ticket was closed. You want to pull just the seconds value for a quick audit of logging precision.

=SECOND(B2)

// B2 = 3:45:22 PM, the ticket closing timestamp

SECOND reads the time stored in B2 and returns 22, the seconds component. It ignores the hour and minute entirely. Change B2 to 3:45:59 PM and the formula returns 59. Change it to 3:46:00 PM and it drops back to 0, because SECOND resets every time the minute rolls over.

How SECOND Works

It resets every 60 seconds, it doesn't accumulate

SECOND always returns a value between 0 and 59, no matter how large the underlying time value is. A duration of 10 minutes (600 seconds) doesn't return 600. It returns 0, because 10:00 has zero seconds on the clock face. This trips people up constantly when they expect SECOND to behave like a running counter. It doesn't. It's a clock-face read, not a total.

It accepts times, dates, and text

SECOND doesn't care whether serial_number comes from a full date-time value, a bare time, or a text string. =SECOND("14:22:08") returns 8 just as reliably as =SECOND(A2) where A2 holds an actual time value. Excel converts recognizable text automatically before extracting the seconds.

It works inside dynamic arrays

SECOND spills naturally across a range. Point it at a whole column of timestamps and it returns an array of seconds values without needing CSE entry or helper columns.

=SECOND(B2:B20)

Entered in a single cell on Excel 365, this spills 19 results down the column, one seconds value per row in B2:B20.

It rounds fractional seconds

SECOND returns whole numbers only. If a time value includes fractional seconds, like 14:22:08.65, SECOND rounds to the nearest whole second and returns 9. The fractional part is discarded entirely, not truncated.

To keep the fractional portion, multiply the decimal time by 86400 (seconds per day) instead of using SECOND directly:

=MOD(B2*86400, 60)

// B2 = a time value with fractional seconds
// 86400 = total seconds in a 24-hour day
// MOD isolates just the seconds portion, decimals intact

Common Use Cases

Extracting seconds from a timestamp log

You're auditing a server log where each row has a precise timestamp and you want just the seconds for a pattern check.

=SECOND(A2)   // returns the seconds digit from the timestamp in A2

Converting a time value into total elapsed seconds

Payroll systems sometimes need total seconds worked, not just hours and minutes separately.

=HOUR(B2)*3600 + MINUTE(B2)*60 + SECOND(B2)

// HOUR(B2)*3600  = hours converted to seconds
// MINUTE(B2)*60  = minutes converted to seconds
// SECOND(B2)     = the remaining seconds

For a time of 2:15:30, this returns 8130 total seconds.

Building a decimal time value for calculations

Commission trackers and time-billing sheets often need time expressed as a decimal rather than hh:mm:ss.

=HOUR(C2) + MINUTE(C2)/60 + SECOND(C2)/3600

// converts 1:30:45 into 1.5125 decimal hours

Checking whether an event fired on an exact interval

You're monitoring sensor data logged every 15 seconds and want to flag any row that doesn't land on the expected interval.

=IF(MOD(SECOND(D2), 15) = 0, "On schedule", "Off schedule")

// D2 = the logged timestamp
// MOD checks whether the seconds value divides evenly by 15

Handling Errors

SECOND throws #VALUE! when it can't interpret the input as a time.

Common causes of #VALUE!:

  • The cell contains plain text that isn't a recognizable time format, like "closed at 3ish"
  • The cell holds an empty string returned by another formula (=""), which isn't a valid time even though the cell looks blank
  • The cell holds a value pulled from another formula that returns an error itself, which SECOND then inherits

A genuinely blank cell doesn't cause this error. Excel treats it as 0, which reads as midnight, so SECOND on an empty cell returns 0 rather than failing. Negative numbers don't trigger it either. SECOND still extracts a value between 0 and 59 from a negative serial number instead of erroring, so don't rely on #VALUE! to catch either of these cases.

=IFERROR(SECOND(A2), "Invalid time")

If you're pulling SECOND from a mix of manually typed timestamps, check for stray spaces or inconsistent AM/PM formatting first. That's the most common reason a seemingly valid time throws #VALUE!.

Notes & Gotchas

Why does SECOND return 0 for a 10-minute duration instead of 600?

Because SECOND reads the clock face, not a running total. A time value of 10:00 has zero seconds showing, so SECOND returns 0 regardless of how many total seconds that duration represents. If you need a total seconds count, use the HOUR/MINUTE/SECOND combination shown in the use cases above, or multiply the time by 86400.

Why does SECOND round instead of showing the exact fractional value?

SECOND is built to return a whole number between 0 and 59, so any fractional seconds get rounded off during extraction. A time of 14:22:08.65 returns 9, not 8.65. If precision to the hundredth of a second matters, skip SECOND entirely and use =MOD(time*86400, 60), which preserves the decimal.

Does SECOND work with text time values?

Yes. =SECOND("9:05:47 AM") returns 47 without any extra conversion step. Excel recognizes standard time formats in text and converts them internally before extracting the seconds. If the text format is unusual or ambiguous, wrap it in TIMEVALUE first to confirm Excel parses it correctly.

What happens with negative time differences or durations over 24 hours?

SECOND itself won't error on a duration over 24 hours, but the surrounding math often will. If you subtract an earlier time from a later one and the result is negative (an overnight shift calculated backward, for example), Excel returns a negative serial number and HOUR, MINUTE, and SECOND all return unreliable results. Add 1 (representing a full day) to the difference before extracting components, or use MOD(end - start, 1) to force a positive result first.

Does SECOND update automatically when used with NOW()?

Yes, and this is worth watching. =SECOND(NOW()) recalculates every time the workbook recalculates, since NOW() is volatile. On a small sheet this is harmless. On a large workbook with hundreds of volatile formulas, it can slow down recalculation noticeably. Use NOW() sparingly if you're layering SECOND across many rows.

SECOND on its own cannot detect whether a time is stored as real Excel time or as plain text that merely looks like a time. If a cell is left-aligned in the worksheet, that's usually a sign it's text, and formulas referencing it may behave inconsistently until you convert it with TIMEVALUE.

Related Functions

FunctionUse this when...
HOURYou need the hour component of a time instead of the seconds.
MINUTEYou need the minutes component, typically alongside HOUR and SECOND for full time breakdowns.
NOWYou need the current date and time as a live, auto-updating value to feed into SECOND.