Modular Arithmetic Calculator

Calculate exact bounded modular operations and inverses.

Scope: This is integer arithmetic only; work and digit caps apply and the result is not a cryptographic implementation.

Workbench

Inputs stay on this page.

Uses exact integers of at most 100 digits. Exponents are capped at 1,000,000; inverse fails when the value and modulus are not coprime.

How to use Modular Arithmetic Calculator

  1. Fill in the fields:

    • Operation: Modular addition, Modular subtraction, Modular multiplication, Modular exponentiation, Modular inverse (right ignored).
    • Left integer.
    • Right integer or exponent.
    • Positive modulus.
  2. Press “Calculate exact residue”.

  3. Copy the result, or download it as modular-arithmetic.json.

About this tool

Calculate exact bounded modular operations and inverses.

Uses exact integers of at most 100 digits. Exponents are capped at 1,000,000; inverse fails when the value and modulus are not coprime.