Advertisement

Modulo Calculator

Find the remainder when one number is divided by another.

Result

2

Remainder2
Quotient3
Expression17 mod 5 = 2

Advertisement

Formula

Result = dividend mod divisor (remainder of division)

Modulo Calculator

The modulo operation returns the remainder after division of one number by another. For example, 17 mod 5 = 2, because 17 ÷ 5 = 3 remainder 2.

Common Use Cases

The modulo operation is used in programming (to check if a number is even or odd, to cycle through array indices), in time calculations (finding the remainder of hours or days), in cryptography, and in number theory. It's also the basis for hash functions and checksum algorithms.

Tips for Accurate Results

  • The result of a modulo operation is always between 0 and the divisor minus 1. For example, any number mod 7 gives a result from 0 to 6.
  • A number mod 2 equals 0 if it's even, 1 if it's odd.
  • The divisor must not be zero — division by zero is undefined.
base44
Edit with Base44