‹ Back ✦ AI Chat
mod

Modular Arithmetic Calculator

a mod m, power mod and modular inverse – with big numbers.

7
a mod m
3
aᵇ mod m
5
(a + b) mod m
12
(a · b) mod m
2
a⁻¹ mod m
1
gcd(a, m)

Runs entirely in your browser. Nothing is sent anywhere.

How it works

  1. 1Enter your values.
  2. 2See the result update instantly as you type.
  3. 3Change any value to compare scenarios.

About this tool

Modular Arithmetic Calculator: a mod m, power mod and modular inverse – with big numbers. Type your numbers and the result is calculated instantly — no button to press, nothing to install. All math runs locally in your browser, so the values you enter are never sent anywhere.

Example

Input
a7
b (exponent / second operand)128
m (modulus)13
Result
a mod m7
aᵇ mod m3
(a + b) mod m5
(a · b) mod m12
a⁻¹ mod m2
gcd(a, m)1
How do I use the Modular Arithmetic Calculator?

Enter your values. See the result update instantly as you type. Change any value to compare scenarios.

Is the Modular Arithmetic Calculator free?

Yes. It is completely free with no sign-up, no usage limits and no watermark.

Is my data sent to a server?

No. Everything is calculated locally in your browser. Nothing you enter is uploaded, logged or stored.

Does it work on my phone?

Yes. It works in any modern browser on Android, iPhone, iPad, Windows, Mac and Linux — no app needed.