Calculating remainders and using the modulo operation is essential in mathematics, programming, and many practical applications. Understanding how remainders work helps you solve division problems, check divisibility, and work with cyclic patterns like time and calendars.

What Is a Remainder?

When you divide one number by another and the result isn't a whole number, the remainder is what's left over. The remainder is always smaller than the divisor.

Dividend รท Divisor = Quotient with Remainder R

Example: 17 รท 5 = 3 remainder 2
Because: 5 ร— 3 + 2 = 17

Division with Remainders

The relationship between dividend, divisor, quotient, and remainder:

Dividend = (Divisor ร— Quotient) + Remainder
a = (b ร— q) + r

Where:
a = dividend
b = divisor
q = quotient
r = remainder (0 โ‰ค r < b)

Worked Examples

Example 1: 23 รท 6

23 รท 6 = 3 remainder 5
Check: 6 ร— 3 + 5 = 18 + 5 = 23 โœ“

Example 2: 45 รท 7

45 รท 7 = 6 remainder 3
Check: 7 ร— 6 + 3 = 42 + 3 = 45 โœ“

Example 3: 100 รท 8

100 รท 8 = 12 remainder 4
Check: 8 ร— 12 + 4 = 96 + 4 = 100 โœ“

The Modulo Operation

The modulo operation (mod) returns only the remainder, not the quotient. It's written as a mod b or a % b in programming.

17 mod 5 = 2 (because 17 = 5 ร— 3 + 2)
23 mod 6 = 5 (because 23 = 6 ร— 3 + 5)
100 mod 8 = 4 (because 100 = 8 ร— 12 + 4)

Modulo Examples Table

DivisionQuotientRemainder (mod)
10 รท 331
15 รท 433
20 รท 632
25 รท 734
30 รท 560
35 รท 843
50 รท 955

Finding Remainders by Hand

Method 1: Long Division

    3 R 5
   -------
6 | 23
    18
   -------
     5  โ† remainder

Method 2: Subtraction

23 - 6 = 17
17 - 6 = 11
11 - 6 = 5
5 < 6, so remainder is 5

Checking Divisibility

When the remainder is zero, the dividend is divisible by the divisor:

20 mod 5 = 0, so 20 is divisible by 5
21 mod 5 = 1, so 21 is not divisible by 5

Practical Applications

Example 1: Distribution Problem

You have 47 cookies to distribute equally among 6 children.
47 รท 6 = 7 remainder 5
Each child gets 7 cookies, with 5 cookies left over.

Example 2: Time Calculation

How many hours and minutes in 125 minutes?
125 รท 60 = 2 hours remainder 5 minutes
125 minutes = 2 hours 5 minutes

Example 3: Calendar/Cycles

What day of the week is 37 days from Monday?
37 mod 7 = 2 (since 37 = 7 ร— 5 + 2)
2 days after Monday = Wednesday

Real-World Uses of Modulo

ApplicationUseExample
TimeHours/minutes125 min mod 60 = 5 min
DaysDay of week37 mod 7 = 2
CalendarMonth cycles15 mod 12 = 3
MemoryAddressesHash tables use mod for indexing
BankingCheck digitsLast digit calculated using mod
CryptographyEncryptionRSA uses modular arithmetic

Properties of Modulo

These properties help with calculations:

(a + b) mod c = ((a mod c) + (b mod c)) mod c
(a - b) mod c = ((a mod c) - (b mod c)) mod c
(a ร— b) mod c = ((a mod c) ร— (b mod c)) mod c

Negative Numbers and Remainders

When dealing with negative numbers, the remainder and divisor have the same sign:

-17 mod 5 = 3 (because -17 = 5 ร— (-4) + 3)
17 mod -5 = -3 (because 17 = -5 ร— (-3) + 2, adjusted)

Different programming languages handle negative modulo differently, so be careful.

Modular Arithmetic in Cryptography

Modular arithmetic is the foundation of modern encryption. Large numbers are reduced using modulo operations, making calculations manageable while maintaining security through mathematical complexity.

Use our Modulo Calculator to instantly calculate remainders and perform modulo operations.