In this article:

How to Convert Time to Decimal in Google Sheets (2024 Update)

May 8, 2024

In this article we will show you how to convert time to decimal in Google Sheets in just a few clicks. Simply follow the steps below:

Convert Time to Decimal Google Sheets

Time to decimal sample sheet 

Syntax

The formula uses a combination of the HOUR, MINUTE, and SECOND functions:

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

Where time is the cell containing the time to convert to decimal.

It will separate the hour, minute, and the second value from the time and then convert the minute and second to its corresponding decimal forms relative to the hour. 3600 is the number of seconds in 1 hour. The resulting decimal will be in hours.

Below are the steps to use this formula.

1. Identify the Cell where The Time Value is Located

For our example, we have a sheet containing a set of timestamps in Column A. We want to convert them to time in hours, with minutes and seconds converted to decimals.

convert time to decimal google sheets, input data in sheet

For Row 2, we have the time stored in cell A2 and we want to insert the formula to B2.

2. Use Formula =HOUR(time)+(MINUTE(time)/60) + (SECOND(time)/3600)

For Row 2, the time to convert is stored in cell A2. The formula becomes

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

You can insert this to B2.

google sheets convert time to decimal, insert formula

Alternatively, you can type the formula by itself, clicking the cell A2 in the process, but it can take more time.

3. Press Enter 

We now have the time converted to decimals!

convert time to decimal google sheets output

If it is the first time you insert this formula, Google Sheets will do something. Check the next step.

4. Autofill to Other Rows

If it is the first time you have inserted this formula, Google Sheets will suggest auto filling other rows with timestamps as well. Click the check mark. 

Formula to convert time to decimal in google sheets autofill suggestion

The formula has been applied to all other rows.

Formula to convert time to decimal in google sheets extended to other rows

You can also change the number of decimals by selecting the range, then clicking the Decrease decimal places icon along the main toolbar. 

For our example we will click the icon a few times to reduce the number of decimals to two:

google sheets how to convert time to decimal adjust number of decimal places

FAQs

How do you Convert Decimal to Time in Google Sheets?

If instead you are given the number of hours with decimals, you can convert the decimals to minutes and seconds. Follow the steps above, but this time using the formula below:

=time(int(input), int((mod(input,1))*60), int((mod((mod(input,1))*60,1))*60))

This formula is lengthy. It has three parts:

int(input) isolates the hour

int((mod(input,1))*60) converts the decimal and isolates the minutes

int((mod((mod(input,1))*60,1))*60)) converts the decimal of minutes and isolate the seconds

And then combined using the TIME function. You can see this in action below.

google sheets how to convert decimal to time

We hope this article has helped you and given you a better understanding of how to convert time to decimal in Google Sheets. You might also like our articles on how to convert text to number in Google Sheets and how to export Google Calendar to Google Sheets.

To optimize your workflow, we recommend reading our guide on how to trigger emails when new rows are added.

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->