This modulo calculator, provided by Hesapstan, finds a mod m for integer inputs and shows the remainder, quotient and proof identity in one clear result.
What does this modulo calculator do?
This calculator finds the remainder when one integer is divided by a positive integer modulus. It also shows the quotient and the identity that proves the result.
- It displays a mod m = r.
- It shows the quotient q.
- It verifies the result with a = q × m + r.
- It notes whether the dividend is exactly divisible by the modulus.
- It uses Euclidean modulo for negative dividends.
What does mod mean?
Mod means the remainder after division. The expression 17 mod 5 asks: what remains after dividing 17 by 5?
Since 17 = 3 × 5 + 2, the quotient is 3 and the remainder is 2. Therefore, 17 mod 5 = 2.
Dividend, modulus, quotient and remainder
In a modulo calculation, a is the dividend, m is the modulus, r is the remainder and q is the quotient. These labels make the result easier to read and verify.
- a: dividend
- m: modulus, or positive divisor
- r: remainder
- q: quotient
This calculator requires m to be a positive integer. Zero and negative modulus values are not supported.
Formula and proof identity
In Euclidean modulo, the remainder r always satisfies 0 <= r < m. The quotient is q = (a - r) / m.
The proof identity is a = q × m + r. It shows how the quotient and remainder rebuild the original dividend.
Example: 17 mod 5 = 2, q = 3 and 17 = 3 × 5 + 2.
Negative dividends and Euclidean modulo
This calculator accepts a negative dividend and uses the Euclidean convention, so the remainder stays non-negative.
For example, -7 mod 3 = 2 because -7 = -3 × 3 + 2, and the remainder is in the range from 0 to less than 3.
Some programming languages define the % operator differently for negative values. Hesapstan uses the mathematical Euclidean modulo convention here.
Modulo and divisibility
If the remainder is 0, the dividend is exactly divisible by the modulus. If the remainder is not 0, the dividend is not exactly divisible and the remainder shows what is left.
- 15 mod 5 = 0, so 15 is divisible by 5.
- 17 mod 5 = 2, so 17 is not divisible by 5.
A divisibility test calculator is better when you want rule-based divisibility checks. This calculator focuses on the exact remainder calculation.
Examples
The clearest way to read a modulo result is to look at the remainder and the proof identity together.
- 17 mod 5 = 2; proof: 17 = 3 × 5 + 2.
- 15 mod 5 = 0; proof: 15 = 3 × 5 + 0.
- 0 mod 7 = 0; proof: 0 = 0 × 7 + 0.
- -7 mod 3 = 2; proof: -7 = -3 × 3 + 2.
- 17 mod 0 is invalid because the modulus cannot be zero.
How to use the calculator
- Enter the dividend a.
- Enter the positive integer modulus m.
- Read the remainder, quotient and proof identity in the result.
- For a negative dividend, use the sign control on mobile if your keyboard does not show a minus key.
This tool is designed for integer modulo. Decimal values are not accepted, and m must be greater than zero.
Modulo, divisibility tests and modular arithmetic
Modulo calculation gives the remainder directly. Divisibility tests check whether a number divides exactly. Modular arithmetic is a broader topic that may include modular exponentiation, inverses and congruences.
This calculator does not perform modular inverse, modular exponentiation or congruence solving. It is intentionally focused on the remainder, quotient and proof identity.
Limitations
This calculator is for Euclidean modulo with integer inputs and a positive integer modulus. It does not support decimal modulo, zero modulus, negative modulus or advanced modular arithmetic operations.
Empty fields, mixed text, decimal numbers, m = 0 and negative modulus values are invalid for this calculator.
Frequently Asked Questions
What does mod mean?
Mod means the remainder after division. For example, 17 mod 5 = 2.
Is modulo the same as remainder?
In this calculator, the modulo result is the remainder. The calculator also shows the quotient and the proof identity.
Can the dividend be negative?
Yes. The dividend can be negative. Hesapstan uses Euclidean modulo, so the remainder stays between 0 and m.
Can the modulus be zero?
No. m = 0 is invalid because division by zero is undefined.
Is this the same as a full modular arithmetic calculator?
No. This calculator focuses on remainder, quotient and divisibility. Modular inverses, modular exponentiation and congruences belong to broader modular arithmetic tools.