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

  • 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...

  • Simulate a Cup Draw using Excel

    Microsoft Excel can do some amazing things. I like to attempt little projects testing what Excel can do. I was asked the other day to simulate a cup draw using Excel and this is the result. This article will give you...

  • Brock Lesnar Nutrition and Workouts

    Brock Lesnar is a phenomenon of a man and an athlete. Brock Lesnar weighs a lean 265 lbs and yet possesses extreme speed, agility and athleticism. How a man carrying so much muscle mass can maintain such high levels of...

1 comment

Taleb80 profile image

Taleb80 4 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