# Modulo Calculator

URL: https://speedycalculator.com/calculators/math/modulo/
Last updated: 2026-10-25

> The modulo calculator finds the remainder when one number is divided by another, and the whole-number quotient. It uses the mathematical convention that the result has the same sign as the divisor.

## Inputs

- Dividend (a)
- Divisor (n)

## Results

- a mod n
- Quotient (floor)
- Exact division

## Formula

```
a mod n = a − n × floor(a ÷ n)
```

## Explanation

Modulo arithmetic is used in clocks, calendars, hashing, cryptography and check digits.

### How to use the Modulo Calculator

- **Dividend (a)**
- **Divisor (n)**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Divide a by n, take the floor of the quotient and subtract n times it from a.

### Inputs explained

FieldWhat to enterDividend (a)A numberDivisor (n)A number

### What each result means

- **a mod n** = mod([Dividend (a)], [Divisor (n)])
- **Quotient (floor)** = floor([Dividend (a)] ÷ [Divisor (n)])
- **Exact division** = [Dividend (a)] ÷ [Divisor (n)]

### Example values

How the main result changes when **Dividend** changes and everything else stays at the example values above:

Dividend (a)a mod n62.56.593.752.751256156.252.25187.55.52505

## Worked example

Inputs — Dividend (a): 125; Divisor (n): 7.

Results — **a mod n = 6**; Quotient (floor) = 17; Exact division = 17.857143.

## Key terms

- **Remainder**: What is left after dividing as many whole times as possible.

## FAQ

**Why does −7 mod 3 give 2?**
In mathematics the remainder takes the sign of the divisor; some programming languages return −1.

**Can the divisor be zero?**
No, division by zero is undefined.

**What formula does the Modulo Calculator use?**
a mod n = a − n × floor(a ÷ n).

