Avoiding Errors when Subtracting Times in Microsoft Excel

In this article, we will learn how to avoid errors when subtracting times in Microsoft Excel.

While calculating the difference between two time values, the former time must be subtracted from the latter one to avoid any error.

However, when the latter time refers to the following day (with respect to the earlier time), an error will occur.

We want to create a formula that avoids these errors when calculating the difference between any two time values.
We will use MOD function to get the output.

MOD: Returns the remainder after a number is divided by a divisor.

Syntax =MOD(number,divisor)

number: It is a numeric value whose remainder you want to find.

divisor: It is the number which is used to divide the number argument.

Example of Mod Function:


Let us take an example:

  • We have time in column A & B
  • We want to find their difference


  • We will enter the formula in cell C2=MOD(B2-A2,1)


  • Copying the formula down in below range of cells, we will get the desired result


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Google PlusVisit Us On Youtube