Like it is just as primitive as makes intuitive sense in a way similar to division. I feel like teaching 4th graders the modulo function would complement learning division extremely well, as it helps make the idea of remainders and such concrete.

But first time I learned about modulo was comp sci in 11th grade. Calculators have five big buttons– +, -, x, ÷, = –but no modulo. PEMDAS (even excusing its flaws) includes no mention of it, and I've never, in any math class, plotted the graph of X%3. I feel like learning it a younger age makes using it more second-nature and gives a greater familiarity with the way numbers work. It's a good conceptual tool. In fact, why don't we teach the floor function too? It makes sense especially when considering things like time and its weird base 24-60-60-10 system

So why is it so obscure? Is it just not that applicable (I mean, I can think of lots of examples where it is…) Is it just one of those things that hasn't occurred to anyone?

Really, my question is not even about the practicality or the benefits. It just seems like a very basic and straightforward function that has simply been ignored.

Note: Some responses have noted that my use of the word modulo is questionable. Sorry about that. If it's unclear, by "modulo", I mean "remainder", which I had previously thought was a synonym of the aforementioned word.

  • $\begingroup$ SMSG's New Math did include modular arithmetic at least by junior high (e.g., last paragraph here). Still, the question as to why it is not often taught in today's classrooms is interesting... $\endgroup$ Commented May 18, 2016 at 0:23
  • 4
    $\begingroup$ I find this difficult to believe. When I was initially taught division we talked about a remainder. I later realized that the remainder and the modulo are the same thing. I think modulo is taught, just not explicitly called modulo. $\endgroup$
    – Jared
    Commented May 18, 2016 at 1:30
  • 4
    $\begingroup$ Mod 12 and mod 24 (and to a lesser extend mod 60, 28, 29, 30, 31) are taught extensively, but are considered life skills rather than maths. $\endgroup$
    – Jessica B
    Commented May 18, 2016 at 5:19
  • 4
    $\begingroup$ I am confused. As far as I understand, modulo is not an operation at all, but a relation. If you mean the remainder in the Euclidean division by a fixed number, well it is (as mentioned) taught along with Euclidean division (and did appear in some of my calculators if I remember well). It could be taught in more details, perhaps. $\endgroup$ Commented May 18, 2016 at 9:32
  • 4
    $\begingroup$ For both grammatical and mathematical reasons, wouldn't it be better to refer to the/an operation as "reduction modulo m" rather than "modulo"? This would help distinguish this well-defined unary operation from the equivalence relation that is "equality modulo m". I'm not crazy about the programming-language to use % m for reduction mod m, but ... it's fine. $\endgroup$ Commented May 19, 2016 at 19:57

3 Answers 3


Modulo is not a well-behaved operation when thought of as being solely defined in terms of integers, in the context of how it interacts with the other basic operations. Taking as the definition that $mod(m,n)$ is the unique number $r$ with $0 \leq r < n$ and $m - r$ is divisible by $n$, then you run into unpleasantries such as $$mod(m_1 + m_2, n) \neq mod(m_1,n) + mod(m_2,n).$$

It is much better conceptually to fix a modulo $n$ and define an arithmetic structure (typically called the ring of integers modulo $n$) with a map from integers to this ring which essentially associates an integer $m$ with its remainder $\overline{m}$ upon dividing by $n$, but the remainder should be thought of as an element of this new arithmetic structure. Then, inside this new arithmetic structure, you have nice arithmetic properties such as $$\overline{m_1 + m_2} = \overline{m_1} + \overline{m_2}.$$

Of course, you can certainly introduce modular arithmetic without getting into this issue in technical detail. But still, it is important to realize that some adjustment has to be made because of it. For example, 5 hours after 10:00 is not 15:00 (the primary exception in the U.S. being if you're in the military!), but rather 3:00. Thus, hours on a clock do not add in the "obvious" way, but instead one has to account for passing 12:00 when adding.

  • $\begingroup$ Then why not learn this? $\endgroup$
    – David Lalo
    Commented May 27, 2016 at 12:59

Here's a few things you might consider that distinguish the modulo operation (as referred to in computing, that is, remainder after division) from the elementary operations (add, subtract, multiply, divide):

  • The graph of modulo is not continuous.
  • Modulo does not have a derivative everywhere (not analytic).
  • The function x ◦ 3 is one-to-one for the elementary operators, but not for modulo.
  • Because of the preceding, modulo does not have an inverse (it is not paired with another operator the same way elementary operations are).
  • You can't double-check it the way you can the elementary operations.
  • Modulo is infrequently seen in formulas for common applications (physics, business, biology, statistics, geometry, etc.)
  • It is not an operator seen in polynomials, upon which much of the theory for algebra and number systems is built.

The same can be said for the floor function.

  • 2
    $\begingroup$ The OP is interested in the "modulo" function (aka remainder), while your answer pertains to the "modulus" (aka absolute value), which,while not an "elementary function" in a certain technical sense, is still commonly taught. $\endgroup$ Commented May 18, 2016 at 13:06
  • 1
    $\begingroup$ @StevenGubkin I think Daniel was using "modulus" to mean what the other people called "modulo" (both of which are incorrect in my opinion). Note, for example, his assertions that the graph of (what he calls) modulus is not continuous and that modulus is infrequently seen in formulas for common applications. $\endgroup$ Commented May 18, 2016 at 17:11
  • $\begingroup$ Yeah, that was boneheaded of me: changed all the "modulus" to "modulo" as intended. Thanks for pointing that out. $\endgroup$ Commented May 18, 2016 at 19:40
  • $\begingroup$ @AndreasBlass I agree that both terms are incorrect, and something like "remainder" is probably more appropriate. Do you have a suggestion for the correct word for this? $\endgroup$ Commented May 20, 2016 at 13:33
  • 1
    $\begingroup$ Thanks! I did not know of this extension to real numbers. Now it is more clear to me. $\endgroup$
    – Christian
    Commented May 31, 2016 at 19:15

The other (correct) answers explain why the modulus operation doesn't fit with the other ordinary operations. Nonetheless there are very good reasons for introducing it at many places in the K-8 curriculum, with an appropriate degree of rigor at each place.

I've had a lot of fun with "clock arithmetic" on various sizes of clock. The first hurdle (and kids like it) is starting at 0 and numbering through 11 rather than starting at 12. The two hour clock has just a 0 and a 1. You can write out the addition and multiplication tables, see lots of patterns and learn a lot. Kids soon see that serious computation mod $n$ is a lot faster if you reduce all along the way, particularly for powers. They think it's cool to calculate, say $2^{10} \pmod 7$ without ever having to double a number greater than $6$. They can take advantage of the fact that you have a ring homomorphism, without having to deal explicitly with the abstraction.

Explaining why 1/2 on a seven hour clock is 4 is a very good way to move from fractions as cutting up pies to fractions as solutions to equations: 1/2 is the thing you multiply by to get to 1.

Making change for \$1 in a country that has bills with denominations \$m and \$n motivates a discussion of greatest common factor (often neglected in favor of least common multiple, since the latter is what's needed to add fractions).

I think the exercises at https://www.youcubed.org/task/counting-cogs/ can be a good place to begin a discussion.

With a small group of good fifth graders, Fermat's little theorem is within reach. Last year I was able to do RSA cryptography with that group. Using Wolfram Alpha they could break the code and solve this problem:

Eratosthenes' RSA public key is $$ n = 10967535067, \ \ e = 1051. $$

Archimedes encrypts his message with this key and sends Eratosthenes $$ C = 1963501580 .$$

What did he say?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.