| Dividend (a) | Divisor (b) | Quotient | Remainder | Time |
|---|
Calculate a mod b instantly — with a full step-by-step breakdown, quotient, remainder, and calculation history. Supports integers, decimals, and negative numbers.
| Dividend (a) | Divisor (b) | Quotient | Remainder | Time |
|---|
Built for students, developers, mathematicians, and anyone who needs quick, reliable modulo results.
Get the remainder of any division in milliseconds. No page reload, no waiting — results appear the moment you click Calculate.
See the full equation: a = (b × q) + r. Understand how the quotient and remainder are derived, not just the answer.
Handles positive numbers, negative numbers, and decimals using the mathematical definition — remainder is always non-negative.
Your last 10 calculations are saved automatically in the session. Compare results and track your work without taking notes.
Works perfectly on any device — desktop, tablet, or mobile phone. The layout adapts so you always have a clean, usable interface.
All calculations run in your browser. We never store your inputs on a server. No cookies, no tracking, no account required.
The modulo operation finds the remainder after dividing one number by another.
Written as a mod b = r, the operation tells you what is left over after dividing the dividend (a) by the divisor (b). The result is always a non-negative integer smaller than the divisor.
For example: 17 mod 5 = 2, because 17 ÷ 5 = 3 with a remainder of 2. Written formally: 17 = (5 × 3) + 2.
Try entering these in the calculator above to see the step-by-step breakdown.
| Expression | Dividend (a) | Divisor (b) | Quotient (q) | Remainder (r) |
|---|---|---|---|---|
| 17 mod 5 | 17 | 5 | 3 | 2 |
| 10 mod 3 | 10 | 3 | 3 | 1 |
| 15 mod 4 | 15 | 4 | 3 | 3 |
| 25 mod 7 | 25 | 7 | 3 | 4 |
| 100 mod 10 | 100 | 10 | 10 | 0 |
| -7 mod 3 | -7 | 3 | -3 | 2 |
| 1 mod 2 | 1 | 2 | 0 | 1 |
| 14 mod 12 | 14 | 12 | 1 | 2 |
The mod operation appears everywhere — from your phone clock to bank account security.
12-hour time uses mod 12. 14:00 hours becomes 14 mod 12 = 2, displayed as 2:00 PM. This wrapping behavior is the essence of modular arithmetic.
ISBN-13 book numbers use mod 10 checksums to detect scanning errors. Banks use similar mod checks on IBAN account numbers.
RSA encryption and Diffie-Hellman key exchange are built on modular exponentiation. Mod operations on enormous numbers protect your private data online.
The % operator is used in every programming language to determine even/odd, cycle arrays, build hash tables, and control loops.
Determining the day of the week for any date uses modulo. Leap year rules apply mod 4, mod 100, and mod 400 checks.
Texture wrapping, sprite animation cycles, and tile map rendering all use mod to loop through arrays of coordinates and color values efficiently.
Everything you need to know about modulo and this calculator.