Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Dealing with Small Time Values.

# Dealing with Small Time Values

by Allen Wyatt
(last updated August 22, 2017)

Zuzana has a need to perform calculations with very small time increments, such as thousandths of a second. She wonders how small of times Excel can deal with and how she can format for the display of the small increments.

Because of the way in which Excel stores times internally, it can theoretically deal with a time increment much smaller than a thousandth of a second. I say theoretically because there are a lot of factors that can negatively impact that precision.

As an example, consider that times and dates are stored in Excel such that full days are stored to the left of the decimal point and fractions of days are stored to the right. If you wanted to store a value as small as a hundred billionth of a second, you could conceivably do it. To store such a number in this format you end up with 1 day divided by 24 hours divided by 60 minutes divided by 60 seconds divided by 100,000,000,000. This results in a number that looks like this:

```0.000000000000000115740740740741
```

Notice that there are a bunch of zeros followed by 15 significant digits. This is because Excel can only store a number that includes up to 15 significant digits. If you start doing anything else with this value, you ruin the value. For instance, you could add 3 to the value, signifying the addition of three days. Excel would then render this as the result:

```3.000000000000000000000000000000
```

Notice that the small time increment disappeared. This happened because in the result of the addition, everything after the 3 became "significant," and Excel can only keep track of up to 15 significant digits, which was all zeros in the original number.

A thousandth of a second is a much longer duration than a hundred billionth of a second; it is represented in Excel's internal formatting as this:

```0.0000000115740740740741
```

If you add three days to this value, you end up with this:

```3.00000001157407
```

This is still accurate enough to render thousandths of a second just fine.

Of course, it doesn't do much good to store thousandths of a second internally if you can't display them in Excel. This is where custom formatting comes into play. You can create a custom format (as described in other issues of ExcelTips) that will display thousandths of a second just fine. Here's the format to use:

```h:mm:s.000
```

If you try to use more zeros in the format (to display smaller increments of time), Excel will balk. The smallest increment you can display using custom formats is a thousandth of a second.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9200) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Dealing with Small Time Values.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Searching and Replacing Graphics

Got a bunch of graphics in a document that need replacing? (Perhaps you need to replace an old logo with a new one.) Word ...

Discover More

ExcelTips: The Macros (Special Offer)

ExcelTips: The Macros is the definitive reference on how to use macros in Excel. You can stay at the top of your ...

Discover More

Turning Off AutoFill for a Workbook

Don't want people using your workbook to be able to use AutoFill? You can add two quick macros that disable and enable ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

##### More ExcelTips (ribbon)

Converting UTC Times to Local Times

Dates and times are often standardized on UTC time, which is analogous to GMT times. How to convert such times to your ...

Discover More

Dealing with Large Numbers of Seconds

When adding values to a time to calculate a new time, you may naturally choose to use the TIME function. This can cause ...

Discover More

Calculating Elapsed Time with Excluded Periods

When using Excel to calculate elapsed time, there can be all sorts of criteria that affect the formulas you would ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. Youâ€™ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three minus 2?

2017-08-22 21:52:41

David Gray

I've recorded and displayed times precise to a millisecond in Excel worksheets many times; it's very useful for tabulating results of benchmark runs.

2017-08-22 05:19:21

gerdami

One oddity with Excel, which has always been there, is that it does not accept negative times. Example: one employee must work 8 hours a day but only worked 7:30, hence the difference would be -0:30.
It only works if you use the 1904 date system.

2017-08-22 03:22:02

gerdami

One oddity with Excel, which has always been there, is that it does not accept negative times. Example: one employee must work 8 hours a day but only worked 7:30, hence the difference would be -0:30.
It only works if you use the 1904 date system.

2014-02-10 08:30:49

Bryan

Interestingly, the "s.0000" trick works with custom formatting or the TEXT functionin Excel, but does NOT seem to work with the Format function in VBA.

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.