Modulo Calculator

Calculate the remainder when one number is divided by another. Also known as the modulo operation.

Calculate Modulo

How to Use

1. Enter Numbers
Input the dividend and divisor
2. Calculate
Get the remainder and quotient
3. Understand
See the step-by-step calculation

Quick Examples

17 mod 5
17 ÷ 5 = 3 remainder 2
23 mod 7
23 ÷ 7 = 3 remainder 2
-5 mod 3
-5 ÷ 3 = -2 remainder 1

About Modulo Operation

The modulo operation (mod) returns the remainder after division of one number by another. It's commonly used in programming, cryptography, and number theory.

Mathematical Definition

a mod b = r where a = bq + r and 0 ≤ r < |b|
Where q is the quotient and r is the remainder

Properties

Range

0 ≤ (a mod b) < |b|

Periodicity

(a + b) mod m = a mod m

Distributive

(a × b) mod m = ((a mod m) × (b mod m)) mod m

Negative Numbers

-a mod b = (b - (a mod b)) mod b

Applications

  • • Programming: Array indexing, circular buffers
  • • Cryptography: RSA, hash functions
  • • Number Theory: Congruence relations
  • • Time calculations: Clock arithmetic
  • • Checksums: Error detection