Note: The other languages of the website are Google-translated. Back to English
English English

Excel MOD Function

The MOD function returns the remainder after a number is divided by a divisor.

mod function 1


=MOD(number, divisor)


  • number (required): The number for which you want to find the remainder.
  • divisor (required): The divisor by which you want to divide number.

Return Value

The MOD function returns a numeric value with the same sign as divisor.

Function Notes

  • MOD will return the #VALUE! error if either of the arguments is not numeric.
  • MOD will return the #DIV/0! error if divisor = 0.
  • MOD will return the #NUM error if a number is very big. In this case, you can use the alternative formula below with the INT function:
    MOD(number, divisor) = number - divisor * INT(number / divisor) √ Note: The equation shows how the remainder is calculated.
  • MOD will return a result in the same sign as the divisor.
  • To return only the integer portion of a division, use the QUOTIENT function.


Supposing you have a table with numbers and divisors as shown below, to get the remainder of the number 5 and divisor 2, please copy or enter the formula below in cell D4, and press Enter to get the result:


Note that in the formula above, we used the actual values. However, in the case that you have a table as shown below, cell references are better choices than the actual values. Since you can just drag the fill handle down to apply the formula to the below cells after entering the formula with cell references in the top cell. The formula with cell references is as followed:


mod function 2

Example to extract time from date & time

As the table shown below, you have a list of dates that contain times. To extract the times, you can also use the MOD function. Please copy or enter the formula below in cell D3, and press Enter to get the result:


√ Note: After entering the formula, drag the fill handle down to apply the formula to the below cells.

mod function 3

√ Note: To make the results show properly in time format as shown above, you should apply the Format Cells feature: Select the cells where you want to apply the feature, then press Ctrl + 1. Under the tab Number in the pop-up Format Cells dialog, choose Time, and pick the type you need in the right Type section:

mod function 4

Related functions

Excel QUOTIENT Function

The QUOTIENT function is used to return only the integer portion of a division.

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings

 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save
time for you.

  • Designed for
    work scenarios, helps you solve
     Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30
    -day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by
    when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL