Modular Arithmetic Calculator

Calculate Euclidean remainders, modular powers or multiplicative inverses using bounded exact integer arithmetic.

Inputs stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Calculate modular result controls

Showing an example. Edit to see your own.

A whole number, negative allowed, up to 1,000 digits.

A whole number of 0 or more, up to 1,000,000.

A whole number greater than 1.

Processed in your browser. Your inputs stay on this device.

How to use Modular Arithmetic Calculator

  1. Choose remainder, power or inverse.
  2. Enter the integer values and a modulus greater than one.
  3. Calculate and review the nonnegative modular result.

Example: Modular Arithmetic Calculator

Find a Euclidean remainder.

You add
Operation: remainder. Integer: 17. Modulus: 5.
You get
The result is 2 because 17 = 3 × 5 + 2.

Supported inputs and limits

Bounded integer inputs and nonnegative modular exponents only. The modulus must exceed one. An inverse exists only when the integer and modulus are coprime. This calculator is not a cryptographic key-generation or constant-time implementation.

Where your input is processed

This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

An inverse undoes multiplication modulo the chosen modulus

An inverse b satisfies a × b congruent to 1 modulo m. It is a property of the integer together with its modulus, so changing the modulus can change the result or remove the inverse.

Questions about Modular Arithmetic Calculator

What happens to a negative integer?

The Euclidean remainder stays between zero and modulus minus one. For example, -1 modulo 5 is 4.

Why can an inverse be unavailable?

An integer has a multiplicative inverse modulo m only when its greatest common divisor with m is one.

Does exponent zero give one?

Yes, reduced modulo the accepted modulus. The tool uses the standard modular exponentiation convention.

Project manager: Tony Hines · Content updated 2 October 2026 · Report a problem