Glossary Math & Statistics

Modulo

Modulo gives the remainder after division: `a mod n` is what is left when a is divided by n.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

17 mod 5 = 2. It is used for clocks (15 mod 12 = 3), wrapping array positions and checking whether a number is even (n mod 2 = 0). For negative numbers, languages disagree: −7 mod 3 is 2 in Python but −1 in JavaScript and C.

Try these tools

See also

  • Glossary Greatest common factor (GCF)
    The greatest common factor of two numbers is the largest whole number that divides both without a remainder.
  • Glossary Checksum
    A checksum is a small value calculated from a block of data and used to detect accidental errors when the data is stored or sent.
AdSense Placeholder
Slot: footer_leaderboard