How to Use the MOD Function in Excel

The MOD function is a maths and trigonometry function in Excel. It returns the remainder after a number is divided by a divisor.

At first glance, the MOD function does not really look to have much use. Many people are not that impressed at first and wonder how it could be incorporated into their day to day work. If you are an avid user of Excel though, you are sure to come across a situation requiring the use of the MOD function.

Let’s have a look at how to use the MOD function in Excel.

The MOD Function in Excel

In the example below there is a requirement for a number of muffins. The muffins need to be boxed before they are distributed. There are three different sized boxes that can be used. The MOD function will help us find the best size box to use for each order to limit the number of left over muffins.

Use the MOD function in Excel to find the remainder
Use the MOD function in Excel to find the remainder

The syntax for the MOD function is;

=MOD(number, divisor)

Number: The number that you want to find the remainder for

Divisor: The number you want to divide the number by

In cell E2 the formula =MOD($D2, A2) was entered. This finds the remainder for the muffins using box A. The $ sign is used before D2 to hold column D so that the formula can be copied to the other 26 cells and still work ok.

Great Excel Learning Resources

Become awesome in Excel by attending the online Excel School

Online training in building better workbooks using awesome formulas, visually stunning charts, analysing data and making effective dashboards.

Online Video Training in Excel

Online video courses provided by authors who are experts in their field. Training courses include advanced formulas and functions, making dynamic charts, creating business budgets and Excel VBA.

More by this Author

  • Create an Excel FA Cup Draw

    This article will look at how to create an FA cup draw in Excel. The Excel FA cup draw file is available for download and the functions and techniques that are used are explained. The finished spreadsheet provides...

  • Sort Pictures in an Excel List

    If you are using pictures in your Excel spreadsheet you may be having some difficulty with sorting the pictures along with the other data in the list. The good news is that you can sort pictures in an Excel list just...

  • Impaction in Bearded Dragons

    Impaction is when a bearded dragon’s digestive tract has become blocked. It is a very real hazard that is brought about when the beardie has either swallowed something that is too large, or something that it...

1 comment

Taleb80 profile image

Taleb80 5 years ago

Thank you for sharing this helpful function.

I voted "Useful"

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.

    Click to Rate This Article