Math & Trig

MOD Function in Excel

Returns the remainder after a number is divided by a divisor.

Syntax

  • =MOD(number, divisor)

Arguments

  • number (required): The number to divide
  • divisor (required): The number to divide by

Examples

  • =MOD(10, 3) - Remainder of 10÷3 - Result: 1
  • =MOD(ROW(), 2) - Alternating 0 and 1 for rows - Result: 0 or 1
  • =IF(MOD(A1, 2)=0, "Even", "Odd") - Check if number is even or odd - Result: Even or Odd

MOD in reporting workflows

  • Use absolute references when copying formulas across rows.
  • For conditional totals see [SUMIF](/functions/sumif/) and [SUMIFS](/functions/sumifs/).
  • Filtered lists may need [SUBTOTAL](/functions/subtotal/) instead of SUM on visible cells only.

Common errors

  • #DIV/0! when divisor is 0
  • Result has same sign as divisor

Use cases

  • Even/odd checking
  • Alternating row formatting
  • Cyclic patterns
  • Time calculations

Frequently asked questions

  • What is MOD function used for? MOD returns the remainder after division. =MOD(10,3) returns 1 because 10÷3=3 remainder 1. Common uses: checking even/odd, creating alternating patterns, extracting time components, and cyclic calculations.
  • How do I check if a number is even or odd? Use =MOD(A1, 2). Returns 0 for even numbers, 1 for odd. In conditional: =IF(MOD(A1,2)=0, "Even", "Odd"). For formatting alternate rows: use MOD(ROW(),2) in conditional formatting.
  • How do I use MOD for time calculations? Convert decimal hours to hours:minutes: Hours=INT(A1), Minutes=MOD(A1,1)*60. For cyclic schedules: =MOD(WeekNumber-1, 4)+1 cycles through 1-4 repeatedly.
  • What happens with negative numbers in MOD? MOD result has the same sign as the divisor. =MOD(-10,3)=2, =MOD(10,-3)=-2. This differs from some programming languages. For consistent positive results, use =MOD(MOD(n,d)+d,d).
  • What is the difference between MOD and QUOTIENT? MOD returns the remainder, QUOTIENT returns the integer part of division. 10÷3: QUOTIENT=3, MOD=1. Together they satisfy: number = QUOTIENT*divisor + MOD.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.