Modulo Calculator

Calculate a mod n – the remainder after division – including negative numbers, plus the quotient.

How to use the Modulo Calculator

  1. Enter dividend (a).
  2. Enter divisor (n).
  3. Your results update instantly: a mod n, quotient (floor division), remainder (truncated, like % in c/js), check.

What is modulo?

a mod n is the remainder when a is divided by n. 47 mod 5 = 2 because 47 = 5 × 9 + 2.

Negative numbers

Mathematically −7 mod 3 = 2 (since −7 = 3 × −3 + 2). Many programming languages return −1 with the % operator because they truncate towards zero. This calculator shows both.

Uses

  • Clock arithmetic: 15:00 + 10 hours = 25 mod 24 = 01:00.
  • Checking even/odd numbers (n mod 2).
  • Cryptography, hashing and check digits.

Frequently asked questions

What is 10 mod 3?

1.

What is the mod of a smaller number by a larger one?

The number itself: 3 mod 10 = 3.

Last updated 16 November 2026. Results are estimates for general information and are not financial, tax, legal or medical advice.

Related guides