OhMyCalc

Modular Arithmetic Calculator

Calculate a mod n (remainder after division). Handles positive integers using the modulo operation.

How to Use the Modular Arithmetic Calculator

  1. Enter the number a.
  2. Enter the modulus n (positive integer).
  3. Click Calculate to see a mod n, the quotient, and the full expression.

Referência Rápida

DePara
17 mod 52
100 mod 72
256 mod 160
365 mod 71
1000 mod 31

Casos de Uso

Fórmula

a mod n = a − n × floor(a / n). The result is always in the range [0, n−1].

Perguntas Frequentes

What is modular arithmetic?
Arithmetic where numbers wrap around after reaching a certain value (the modulus), like a clock wrapping at 12.
What happens with negative numbers?
This calculator handles positive integers. The result is always non-negative.
Where is mod used?
In cryptography (RSA), hash functions, checksums, cyclic scheduling, and clock arithmetic.