Google Sheets MOD: Remainders in Schoolwork
Use =MOD(17,5) to find the remainder when 17 is divided by 5. The result is 2. It answers how many items remain after complete groups, not how many complete groups can be made.
Work in a blank practice sheet or an approved spare area. Do not overwrite a teacher's data or formulas. These are supplied-number exercises, not a check of a real inventory or assignment.
Put the dividend first and the divisor second
The syntax is =MOD(dividend, divisor). The dividend is the number being divided; the divisor is the number you divide by. Google documents both direct numbers and cell references.
- Enter 17 in A2 and 5 in B2.
- In C2, enter
=MOD(A2,B2). - Check that C2 shows 2.
- Read A2 and B2 again before explaining what the result means.
Reversing the inputs asks a different question. =MOD(5,17) returns 5, because 5 contains no complete positive group of 17. A formula that runs without an error can still answer the wrong question.
Check the remainder against complete groups
For 17 counters grouped in fives, three full groups use 15 counters. The remaining 2 satisfy 17 = 5 × 3 + 2. With positive whole-number inputs, the remainder is at least zero and smaller than the divisor.
Ordinary division gives 17/5 = 3.4. The whole-group count is 3, and the remainder is 2. These are different answers with different meanings. For the whole-group calculation, see the QUOTIENT practice guide.
Check exact division too: =MOD(20,5) returns 0. All 20 counters fit into four complete groups. Zero is a valid remainder, not evidence that the formula is broken.
Keep a zero result separate from a zero divisor
=MOD(5,0) produces #DIV/0!. You cannot divide into groups of size zero. Check the divisor cell if that error appears rather than replacing the error with an invented answer.
For this exercise, use explicit numeric inputs. If a referenced cell is blank, contains text or holds a formula you have not checked, inspect it first. Do not hide every error with a blanket fallback: that can conceal an input mistake.
Negative inputs use the divisor-sign rule
Sheets gives =MOD(-7,3) as 2, and =MOD(7,-3) as -2. A nonzero result takes the divisor's sign. Do not extend the counters-in-groups story to negative quantities without checking this rule.
The checks are -7 = 3 × (-3) + 2 and 7 = (-3) × (-3) - 2. A truncating programming remainder can follow a different sign convention. Copying a percent-operator expression from code is not enough to verify a Sheets answer.
For positive whole numbers, ordinary grouping is the simpler model. Keep negative examples separate and label the convention the exercise requires.
Treat decimal remainders as a precision question
Google says MOD also accepts non-integer numbers, but floating-point arithmetic can produce an approximate result. Do not promise an exact displayed zero for every decimal division that looks exact on paper.
Inspect the formula, stored inputs and requested precision before rounding. If rounding is appropriate, choose its number of decimal places from the exercise. Changing how many decimals a cell displays is not a substitute for understanding the calculated value.
Finish by naming the quantity: complete groups, ordinary quotient or remainder. Then check the input order, nonzero divisor and any precision requirement. A plausible-looking number is only the start of that check.
Common questions
What does MOD(17,5) return in Google Sheets?
It returns 2. Three complete groups of 5 use 15 of the 17 items, leaving 2. The result is the remainder, not the three complete groups or the decimal quotient 3.4.
Does a MOD result of zero mean the formula failed?
No. For example, MOD(20,5) returns 0 because 20 divides exactly into groups of 5. A zero result is different from a zero divisor, which causes a division-by-zero error.
Can I use the programming percent operator instead?
Do not assume it is equivalent for negative inputs. Sheets MOD follows the divisor-sign rule. For example, MOD(-7,3) returns 2, while a truncating remainder operation can return -1.
Can decimal inputs produce a small unexpected remainder?
Yes. Google warns that MOD with non-integer numbers can produce approximate results because of floating-point arithmetic. Inspect the actual result and choose rounding only when the task specifies suitable precision.
Sources and scope
Sources checked . This is a computer formula guide. The examples are mathematical checks against documented or independently reported behavior, not a claim of a hands-on Sheets session.
- Google: MOD documents the argument order, remainder meaning, references and decimal-precision warning.
- Can I Spreadsheet: MOD compatibility results reports Google Sheets checks for positive and negative inputs and a zero divisor. Its tests are the publisher's, not ours.
- SheetError: MOD with negative inputs explains the divisor-sign rule and why a truncating remainder differs. It is independent of Google.