Back to functions
Math & Trig2026-03-188 related articles

MOD Function in Excel

Return the remainder after a number is divided by a divisor.

Syntax

MOD(number, divisor)

Arguments

number

Required

The number you want to divide.

divisor

Required

The number used to divide the first value.

What it returns

Returns the remainder from the division.

What MOD does

MOD returns the remainder after division. It is useful for repeating patterns, interval checks, odd-even logic, and time extraction tricks.

Practical examples

Return the remainder after division

=MOD(17,5)

This returns 2 because 17 divided by 5 leaves a remainder of 2.

Extract the time portion of a date-time value

=MOD(A2,1)

Because Excel stores date-time values as serial numbers, MOD(A2,1) leaves only the fractional time portion.

Common mistakes and notes

Zero divisors are invalid

If the divisor is zero, Excel returns an error.

MOD is often more useful than it first appears

Many worksheet patterns that repeat on a cycle can be simplified with MOD once you think in terms of remainders.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use MOD.

FormulasIntermediateTime and Date
2022-01-21

How to Calculate Hours Between Two Dates and Times in Excel

Learn how to calculate hours between two dates and times in Excel using simple formulas for elapsed time, decimal hours, overnight shifts, and workdays....

#time
5 min read
Read Article
FormulasTime and Date
2013-02-15

Excel Fractional Part: Extracting Integers and Fractions in Excel

Sometimes you need to extract the integer or decimal part of a number. Sometimes the fractional part. Check this guide on Excel fractional part....

3 min read
Read Article
FormulasTime and Date
2012-11-01

Extract Time from datetime with the MOD Function in Excel

Use the MOD function in Excel to extract a Time value from a Date-Time number. Change the cell formatting to get the time format of your choosing....

#time
2 min read
Read Article
FormulasIntermediate
2010-08-26

Convert Seconds to a Time Format in Excel

Convert a large number of seconds to a hours:minute:seconds format using the TIME, INT and MOD functions....

3 min read
Read Article
FormulasIntermediate
2010-08-21

Putting the TIME, INT and MOD Functions to Work in Excel

Convert a Time in seconds to a minutes:seconds format by using the INT and MOD functions inside the TIME function....

2 min read
Read Article
FormulasIntermediate
2010-08-19

The TIME Function in Excel

Using the TIME Function to display minutes and seconds in a readable time format....

1 min read
Read Article
FormulasIntermediate
2010-08-17

The MOD Function in Excel

Understanding how the MOD Function works to extract the number of seconds left over after dividing a number of seconds by 60....

2 min read
Read Article
FormulasIntermediate
2010-08-12

iTunes Playlist Export Task – Convert Seconds to a Time Format

Converting seconds to a minutes:seconds time format requires several formulas....

1 min read
Read Article

Official documentation