0
0
ExcelHow-ToBeginner ยท 3 min read

How to Use MOD Function in Excel: Syntax and Examples

In Excel, use the MOD function to find the remainder after dividing one number by another. The formula is =MOD(number, divisor), where number is the value to divide and divisor is the number you divide by.
๐Ÿ“

Syntax

The MOD function has two parts:

  • number: The number you want to divide.
  • divisor: The number you divide by.

The function returns the remainder after division.

excel
=MOD(number, divisor)
๐Ÿ’ป

Example

This example shows how to find the remainder when 17 is divided by 5.

excel
=MOD(17, 5)
Output
2
โš ๏ธ

Common Pitfalls

Common mistakes include:

  • Using zero as the divisor, which causes an error.
  • Confusing MOD with division or remainder operators in other programs.
  • For negative numbers, MOD returns a positive remainder, which may differ from some programming languages.
excel
=MOD(10, 0)  // Causes #DIV/0! error
=MOD(-10, 3) // Returns 2, not -1
Output
#DIV/0! 2
๐Ÿ“Š

Quick Reference

TermDescription
numberThe value to divide
divisorThe number to divide by
ResultRemainder after division
ErrorDivisor cannot be zero
โœ…

Key Takeaways

Use =MOD(number, divisor) to get the remainder after division in Excel.
The divisor cannot be zero or Excel will show an error.
MOD always returns a positive remainder, even for negative numbers.
MOD is useful for tasks like checking if a number is even or odd.
Remember MOD differs from division; it only returns the remainder.