🧮 Modular Arithmetic Calculator

Calculate the remainder of an integer after division by a positive modulus.

No ratings yet — be the first

Enter details

Modular arithmetic
mod= ?

Log in or create a free account to save your inputs and results, so you don't have to enter them again next time.🔒 No spam, ever. We never sell or share your details, and you can delete your history or account at any time. Privacy policy

Fill in the details and click Calculate to see your results.

Formula at a glance

Modular Arithmetic formula: a mod m
How the modular arithmetic works: a mod m

Rate this calculator

Was it useful? A quick star rating helps others — and you can leave a comment too.
Rate it: ★ ★ ★ ★ ★

📘 About the Modular Arithmetic Calculator

Modular arithmetic works with remainders: a mod n is the remainder when a is divided by n. Clocks use mod 12 and weekdays mod 7.

🧮 Formula

Modulo operation
a mod m

Where

  • a = number
  • m = modulus
  • remainder = a - floor(a/m)m
For standard elementary use, enter positive integers.

✏️ Worked examples

123 mod 10

You enter
Number123
Modulus10
You get
123 mod 103
Quotient12
Check123 = 10 × 12 + 3
Remainder in C, Java, JavaScript (a % m)3

3.

100 mod 7

You enter
Number100
Modulus7
You get
100 mod 72
Quotient14
Check100 = 7 × 14 + 2
Remainder in C, Java, JavaScript (a % m)2

2.

🧭 How to use this calculator

What you enter

  • Number
  • Modulus

What you get

  • Remainder

💡 Common uses

  • Clock arithmetic.
  • Divisibility checks.
  • Number theory exercises.
  • Computer science and algorithms.

❓ Frequently asked questions

What is 123 mod 10?

3.

What is modular arithmetic used for?

Clocks, calendars, check digits (ISBN, Aadhaar), hashing and cryptography.