Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets SECOND Function: Step-by-Step Guide

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The SECOND function in Google Sheets returns the second portion of a time value as a number from 0 to 59. It is useful whenever you need to extract seconds from timestamps, durations, or time-formatted cells, for example to build a custom time display or to compare how far apart two events occurred. The syntax is simple: =SECOND(time), where time is a cell reference, a time value, or a function that returns a time. The function works in the browser version of Google Sheets and in the Google Sheets mobile apps; menu labels can differ slightly by version, device, or region, but the function itself behaves the same.

What You'll Need

  • A Google account and access to Google Sheets (sheets.google.com or the Google Sheets app for Android or iPhone).
  • A spreadsheet with at least one cell containing a time value, a date-time value, or text that Sheets can interpret as a time.
  • Basic familiarity with entering formulas: typing an equals sign, the function name, and a cell reference in parentheses.

Step-by-Step

  1. Open your spreadsheet. Go to sheets.google.com and open the file, or open the Google Sheets app and tap the file. The steps below work the same on desktop and mobile; on mobile you enter formulas by tapping the cell and using the formula bar or the function keyboard.
  2. Make sure your time data is real time data. Click a cell that holds a time. Look at the formula bar: if it shows something like 10:42:17 or a date-time such as 3/14/2025 10:42:17, Sheets is treating it as a time value. If the formula bar shows only text that looks like a time but Sheets does not recognise it, the SECOND function may return an error or an unexpected result. To convert text to a time, you can use =TIMEVALUE(A1) where A1 holds the text, then apply the function to that result.
  3. Select an empty cell for the result. Pick a cell next to your data or in a separate column so the output is easy to read.
  4. Type the formula. Enter =SECOND(A1), replacing A1 with the cell that contains your time. Press Enter (or tap the checkmark on mobile). The cell now shows the seconds portion as a number from 0 to 59.
  5. Check a few results. If A1 contains 10:42:17, the formula returns 17. If A1 contains 10:42:00, it returns 0. If A1 contains a full date-time such as 3/14/2025 10:42:17, it still returns 17 because SECOND ignores the date portion.
  6. Use a literal time if you prefer. You can skip the cell reference and type the time directly: =SECOND("10:42:17") or =SECOND(TIME(10,42,17)). Both return 17. The TIME function is handy when the hour, minute, and second come from separate cells, for example =SECOND(TIME(A1,B1,C1)).
  7. Fill the formula down. Drag the fill handle (the small square at the bottom-right of the selected cell) down the column, or copy the cell and paste it into the cells below. Relative references adjust automatically, so each row reads its own time value.
  8. Format the result if needed. The SECOND function always returns a plain number, not a time. If you want it to look like part of a clock, you can combine it with other functions, for example =TEXT(A1,"HH:MM:SS") to show the full time as text, or build a custom string with & and the HOUR, MINUTE, and SECOND functions.
  9. Combine with other time functions. A common pattern is to pull out each part: =HOUR(A1), =MINUTE(A1), and =SECOND(A1). You can then reassemble them, compare them, or use them in calculations such as converting a duration to total seconds with =HOUR(A1)*3600+MINUTE(A1)*60+SECOND(A1).
  10. Save your work. Google Sheets saves automatically, but on mobile you can confirm the change is synced by checking that the file shows no pending-sync indicator.

Common Mistakes

  • Passing text instead of a time value. If the cell contains a string like "10:42:17" that Sheets has not converted to a time, SECOND may return an error. Use TIMEVALUE to convert it first, or re-enter the value in a time format Sheets recognises.
  • Expecting the function to return a two-digit string. SECOND returns a number, so 5 seconds appears as 5, not 05. If you need leading zeros, wrap the result in TEXT, for example =TEXT(SECOND(A1),"00").
  • Using a duration that exceeds 24 hours. Time values in Sheets are fractions of a day, so a duration like 27:15:30 may be stored as a date-time rather than a simple time. SECOND still works on the time portion, but check that the underlying value is what you expect by looking at the formula bar.
  • Forgetting that SECOND ignores the date. A full timestamp returns only the seconds field, not the total seconds since some starting point. If you need total elapsed seconds, calculate it from HOUR, MINUTE, and SECOND as shown above.
  • Referencing an empty cell. An empty cell is treated as 0, so SECOND returns 0 rather than an error. That can hide missing data; check your source cells if the result looks wrong.
  • Typing the function name in lowercase or with a typo. Sheets is not case-sensitive for function names, but a misspelling such as SECONDS or SEC will produce a #NAME? error. Use the autocomplete suggestion to avoid this.

Tips

  • Use the formula autocomplete: type =SEC and choose SECOND from the list to avoid typos.
  • To extract seconds from a live clock, combine SECOND with NOW: =SECOND(NOW()) updates whenever the sheet recalculates, which is useful for dashboards but not for permanent records.
  • If you are working with imported data, check the column format. A column formatted as Plain Text will not treat times as time values; change the format to Date time or Time before using SECOND.
  • For readability, keep the original time column and put the extracted seconds in a separate column rather than overwriting the source.
  • When building a custom time string, use TEXT to control padding: =TEXT(HOUR(A1),"00")&":"&TEXT(MINUTE(A1),"00")&":"&TEXT(SECOND(A1),"00").
  • Remember that SECOND works on both the desktop and mobile versions of Sheets, but the formula bar and fill handle behave slightly differently on touch screens; on mobile, use the fill handle by dragging the small circle at the corner of the selection.

Troubleshooting

If the formula returns an error, start with the simplest checks. First, confirm the cell you reference actually contains a time value by selecting it and reading the formula bar. If it shows text, convert it with TIMEVALUE or re-enter it. Second, check for typos in the function name and make sure the parentheses are balanced. Third, look for a #VALUE! error, which usually means the argument is text that cannot be interpreted as a time; a #NUM! error can appear if the time value is negative or outside the supported range. If the result is 0 when you expect a number, the source cell may be empty or may contain a time with zero seconds. If the formula works in one cell but not when filled down, check that the references are relative (no dollar signs) unless you intended absolute references. If the sheet is shared, confirm you have edit permission; viewers can see results but cannot change formulas. Finally, if the file was imported from Excel or another app, some time values may have come in as text; use the Format menu to set the column to Date time and then re-enter or convert the values.

Frequently Asked Questions

What does the SECOND function return for a time like 12:00:00?

It returns 0, because the seconds portion is zero. The function always returns a number from 0 to 59.

Can SECOND handle a cell that contains only a date and no time?

Yes. A date with no time is treated as midnight, so SECOND returns 0. If the cell contains a date-time, only the seconds field is returned.

Why does SECOND return an error when I reference a cell that looks like a time?

The cell is probably formatted as text. Select the cell, check the formula bar, and if it shows a leading apostrophe or plain text, convert it with TIMEVALUE or change the column format to Time and re-enter the value.

Does SECOND work with durations longer than 24 hours?

It works on the time portion of the value, but long durations may be stored as date-time values. Check the formula bar to see how Sheets is storing the value, and if you need total seconds, calculate them from HOUR, MINUTE, and SECOND.

Can I use SECOND on a time I type directly into the formula?

Yes. For example, =SECOND("10:42:17") returns 17. You can also use =SECOND(TIME(10,42,17)) for the same result.

Is SECOND available in the Google Sheets mobile app?

Yes, the function works the same in the Android and iPhone apps. You enter it the same way, using the formula bar or the function list.