Modular Arithmetic
Add, multiply or exponentiate integers under a positive modulus.
Your numbers
Residue
Use consistent units. The result follows the assumptions you enter.
Scenario comparison
Up to three snapshots in this tab. Loading one replaces the current inputs.
Formula
0 ≤ result < modulus; modular exponentiation uses repeated squaring.
Add, multiply or exponentiate integers under a positive modulus.
Worked example
- First integer
- 17
- Second integer or exponent
- 5
- Modulus
- 7
- Operation
- Multiplication
- Residue
- 1
Scope and limitations
Use consistent units. The result follows the assumptions you enter.
Inputs are checked for missing values and allowed ranges. A result outside the finite numeric range is not displayed. Rounding affects display, while the calculation uses the model’s numeric precision.
Check your units and assumptions before relying on a result. Changing a label does not convert a currency or physical unit.
Formula version: 571c8b35c06f · Example checked: