MOD

    Math & Trig

    Returns the remainder after division. Useful for checking divisibility or cyclic patterns.

    Translations
    EnglishMOD
    FrenchMOD
    SpanishRESIDUO
    GermanREST
    ItalianRESTO
    PortugueseMOD
    DutchREST
    PolishMOD
    RussianОСТАТ
    TurkishMOD
    CzechMOD
    HungarianMARADÉK
    SwedishREST
    DanishREST
    FinnishJAKOJ
    Syntax
    MOD(number, divisor)

    Arguments

    • numberThe number to divide
    • divisorThe number to divide by
    Examples
    =MOD(10,3)
    1

    10 divided by 3 leaves remainder 1

    =MOD(A1,2)=0
    TRUE if even

    Tests if A1 is even

    =MOD(ROW(),2)
    0 or 1

    Alternates for formatting every other row

    Tips & Best Practices
    • MOD(n,2)=0 tests for even numbers
    • Useful for cyclic patterns (every Nth row)
    • Result has same sign as divisor
    Common Mistakes
    • Forgetting MOD returns a result with the same sign as the divisor, not the dividend - MOD(-7,3) returns 2, not -1, which trips up people expecting a simple remainder
    • Using MOD with a divisor of 0, which returns a #DIV/0! error just like regular division
    • Confusing MOD with a manual remainder trick using floating-point numbers, where tiny precision errors can make it return an unexpected non-zero result for values that should divide evenly
    Related Functions
    INTOften paired with MOD to fully decompose a division into whole part and remainder.
    QUOTIENTReturns just the whole-number part of a division, the complement to what MOD returns.
    ISEVENUses the same idea as MOD internally - checks if a number is even, a common use case for MOD(n,2).
    Frequently Asked Questions

    Why does MOD return a positive number for a negative input?

    MOD's result always takes the sign of the divisor, not the dividend. MOD(-7,3) returns 2 because it follows 3's positive sign, not -1 as a simple remainder calculation might suggest.

    How do I check if a number is even or odd with MOD?

    MOD(number,2) returns 0 for even numbers and 1 for odd numbers - a common pattern, though ISEVEN and ISODD do this more directly.

    What happens if I divide by zero with MOD?

    It returns a #DIV/0! error, the same as any other division by zero in Excel.

    Need to translate a formula using MOD?

    Use our translator to convert your complete formula