What does the MOD function do?

By definition, it returns the remainder after one number is divided by another.

We can classify whole numbers into certain groups. For example, Odd and Even, or numbers that are divisible by two, by three, four, and so on.

This is what the MOD function does. It checks if a number is divisible by another number and if not, how far away is it from being divisible.

The key here, is that MOD looks backwards – i.e. to the next smaller number that was divisible and then count. MOD works the same with negative numbers. 

Feel free to Download the Workbook HERE.

Leila Gharani

I’ve spent over 20 years helping businesses use data to improve their results. I've worked as an economist and a consultant. I spent 12 years in corporate roles across finance, operations, and IT—managing SAP and Oracle projects.

As a 7-time Microsoft MVP, I have deep knowledge of tools like Excel and Power BI.

I love making complex tech topics easy to understand. There’s nothing better than helping someone realize they can do it themselves. I’m always learning new things too and finding better ways to help others succeed.