Find the Remainder When Dividing in Excel

Formula Syntax and Usage of MOD

The number 900 and all its factors, illustration

The MOD function, short for modulo or modulus can be used to divide numbers in Excel. However, unlike regular division, the MOD function only gives you the remainder as an answer. Uses for this function in Excel include combining it with conditional formatting to produce alternate row and column shading, which makes it easier to read large blocks of data.

MOD Function Syntax and Arguments

A function's syntax refers to the layout of the function and includes the function's name, brackets, and arguments.

The syntax for the MOD function is:

= MOD(Number,Divisor)

where Number is the number being divided and Divisor is the number by which you want to divide the Number argument.

The Number argument can be a number entered directly into the function or a cell reference to the location of the data in a worksheet.

The MOD function returns the #DIV/0! error value for the following conditions:

  • If a zero is entered for the Divisor argument
  • If a cell reference to a blank cell is entered for the Divisor argument

Using Excel's MOD Function

  1. Enter the following data into the cells indicated. In cell D1, enter the number 5. In cell D2, enter the number 2.
  2. Click on cell E, the location where the results will be displayed.
  3. Click on the Formulas tab of the ribbon.
  4. Choose Math & Trig from the ribbon to open the function drop-down list.
  5. Click on MOD in the list to bring up the function's dialog box.
  6. In the dialog box, click on the Number line.
  1. Click on cell D1 on the worksheet.
  2. In the dialog box, click on the Divisor line.
  3. Click on cell D2 on the spreadsheet.
  4. Click OK or Done in the dialog box.
  5. The answer 1 should appear in cell E1 since 5 divided by 2 leaves a remainder of 1.
  6. When you click on cell E1 the complete function = MOD( D1, D2 ) appears in the formula bar above the worksheet.

    Since the MOD function only returns the remainder, the integer portion of the division operation (2) is not displayed. To show the integer as part of the answer, you can use the QUOTIENT function.

    mla apa chicago
    Your Citation
    French, Ted. "Find the Remainder When Dividing in Excel." ThoughtCo, Jan. 10, 2018, French, Ted. (2018, January 10). Find the Remainder When Dividing in Excel. Retrieved from French, Ted. "Find the Remainder When Dividing in Excel." ThoughtCo. (accessed January 23, 2018).