← All comparisons

MOD vs QUOTIENT: remainder and integer division

Divide 17 by 5 and you get two useful integers: how many times it fits (QUOTIENT → 3) and what's left over (MOD → 2). Together they decompose any division — and MOD's sign convention on negatives trips up everyone arriving from a programming language.

The differences at a glance

MODQUOTIENT
17 and 52 (remainder)3 (how many fit)
-17 and 53 — result takes the DIVISOR's sign (unlike C/JS/Java's -2)-3 (truncates toward zero)
Identityn = divisor × QUOTIENT + ... not always! Use n - MOD(n,d) = floor-multiple insteadPairs with MOD only when signs agree
Classic idiomsEvery-nth-row (MOD(ROW(),n)), cycling indexes, time-of-day from datetime (MOD(A2,1)), overnight shiftsFull boxes/packs from a count, pagination
CompatibilityUniversalUniversal (both verified in every version of all three apps we test)

Which should you use?

Compatibility (from executed tests)

Both behave identically in every version of Excel, Google Sheets, and LibreOffice we test, including the negative-number conventions. The spreadsheet MOD-takes-the-divisor's-sign rule matches Python — not C, JavaScript, or Java — so ported formulas involving negative inputs deserve a test case.

Example formulas

Remainder=MOD(17,5)
Whole units=QUOTIENT(17,5)
Time-of-day from a datetime=MOD(A2,1)

Full per-version details on each function page: MOD · QUOTIENT.