How to Get Remainder in Excel (3 Simple Methods)

Get FREE Advanced Excel Exercises with Solutions!

Microsoft Excel is a handy software. We use Excel functions and features for our educational, business, and other daily life purposes. Furthermore, Excel provides some cool functions to extract the remainder in our workbooks. This article will show you 3 simple methods to get the remainder in Excel.

Obtaining remainders in Excel can be really cumbersome if we do not know the right functions to implement. In this article, I will show you 3 easy methods to get the remainder in Excel. For instance, we take a dataset that contains numbers of division.

how to get remainder in excel

1. Getting Remainder Using Excel MOD Function

This method demonstrates how to carry out the modulo operation in Excel using the MOD function. Additionally, we will see how finding the remainder is so easy with the MOD function. In Excel, the MOD function stands for modulo or modulus that divides numbers. The MOD function returns the remainder as a response, unlike ordinary division. The syntax of the MOD function is:

=MOD(number, divisor)

Here, the divisor is the number by which you want to divide the number argument. The number is the number that the function divides with. We use the number argument with a cell reference to the location of the data in a worksheet or a number put directly into the function. Let’s use the applications of the MOD function step by step.


  • Firstly, in cell D5, insert the following formula,
  • In these arguments, B5 represents the Dividend and C5 indicates Divisor.
  • Now, press Enter or Tab to get the remainder of the division in D5.

Get Remainder Using Excel MOD Function

  • Afterward, AutoFill the rest of the cells by dragging the formula cell down to D9.
  • As a result, we get the rest of the remainder in column D.

Read More: [Fixed!] Excel MOD Function Not Working (3 Issues with Solutions)

2. Going to the Formula Tab to Attain Remainder

In this method, we will use Excel’s predefined MOD function. Excel provides some powerful by-default functions. In this case, we will access the Formulas tab to apply the MOD function. The MOD function is under the category of Math & Trig functions. Follow these steps to learn how to implement this.


  • First, go to the Formulas tab and then click Math & Trig dropdown icon.
  • See the below picture to understand better.

Go to Formula Tab to Attain Remainder

  • Eventually, a context menu will open up.
  • Next, scroll down to select the MOD option.

  • Consequently, the Functions Arguments dropbox will pop up.
  • Now, click in the Number box, and select B5 as the number.
  • Similarly, tap the Divider box, and click on cell C5.
  • Lastly, press OK.

  • Thus, we get the remainder in D5.
  • Continue this process to the other cells one by one to finally get all the desired remainders.

Read More: How to Get Remainder in Decimal in Excel (3 Suitable Ways)

3. Extracting Remainder Through Excel VBA

In Excel VBA, the Mod operator returns the remaining portion of a division. With this in mind, in the last method, we will extract the remainder using Excel VBA. Firstly, we will create a UserForm to design a division calculator that returns a remainder as an output. We can customize our UserForm as we wish and insert a command button to execute the division. Further, we will use a simple VBA code to assist us in the division process. Follow the steps carefully to do so.


  • First, go to the Developer tab and tap Visual Basic. Also, you can press F11 to open the Visual Basic window directly.
  • Hence, the Visual Basic Window opens up.

Get Remainder Through Excel VBA

  • Later, click Insert and then UserForm to create UserForm1.

  • Here, customize your UserForm as you wish.
  • Now, right-click on the command button that you customized earlier.
  • Next, select View Code to display a module box.

  • Afterward, in the module box, type the following VBA code.
Private Sub CommandButton1_Click()
Dividend = UserForm1.TextBox1.Value
Divisor = UserForm1.TextBox2.Value
If Dividend & Divisor <> "" Then
Remainder = Dividend Mod Divisor
MsgBox "The Desired Remainder is " & Remainder, , "Get Remainder"
End If
End Sub

  • As soon you finish writing the code, go to the green Run button.
  • See the picture below for a better understanding.

  • After running the code, we will see the input menu on the display.
  • Further, put the dividend and divisor numbers in the input boxes.
  • Lastly, press Calculate command option.

  • Thus, we will the remainder as an output.

  • Calculate each row one by one to get all the values.

Read More: Excel VBA: How to Divide Without Remainder (2 Easy Ways)

Download Practice Workbook

You can download this workbook to practice yourself.


In conclusion, we have discussed some simple methods to get the remainder in Excel. Not to mention, our ExcelDemy website shows various simple problem-solving methods like this. Please leave any further queries or recommendations in the comment box below.

Related Articles

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Yousuf Khan
Yousuf Khan

Yousuf Khan has been working with the ExcelDemy project for over one year. He has written 47+ articles for the ExcelDemy site. He also solved a lot of user problems with ExcelDemy Forum. He has interests in Excel & VBA, Desktop and mobile applications, and projects & templates. He completed his graduation and post-graduation in Information Technology from Jahangirnagar University. Currently, he works as a VBA & Excel Content Developer in ExcelDemy projects, writing unique and informative content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF