# Re: Rounding seconds to closest 15 seconds formula

Solved
1842 2
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

I need a formula to round seconds to the closest 15 second mark in the hh:mm:ss time format… i.e. say 1:01:10 needs to be rounded to 1:01:15 , say 0:34:20 rounded to 0:34:30, say 1:02:55 to 1:03:00
Hope someone can help as in excel I can use the MROUND formula but this is not in Airtable.

1 Solution

Accepted Solutions
8 - Airtable Astronomer

Hi Brisbane,
Say your original field is called “Duration”. Try creating a formula field with this:

`ROUNDUP(Duration/15,0)*15`

Then format the formula field to be h:mm:ss like the original. Keep in mind that this is not rounding to the closest 15 seconds, it is rounding up, which looks like what you’re going for. If you wanted to round to the nearest 15 seconds, you’d use this:

`ROUND(Duration/15,0)*15`

3 Replies 3
8 - Airtable Astronomer

Hi Brisbane,
Say your original field is called “Duration”. Try creating a formula field with this:

`ROUNDUP(Duration/15,0)*15`

Then format the formula field to be h:mm:ss like the original. Keep in mind that this is not rounding to the closest 15 seconds, it is rounding up, which looks like what you’re going for. If you wanted to round to the nearest 15 seconds, you’d use this:

`ROUND(Duration/15,0)*15`

5 - Automation Enthusiast

Thank you so much for the formula. Very much appreciated.

Cheers
Geoff

8 - Airtable Astronomer

You’re welcome! And if the formula works for you, don’t forget to mark it as the answer :slightly_smiling_face: