Modulo Calculator

Welcome to modulo calculator, our website dedicated to the division with remainders. This mathematical operation is often abbreviated as x mod yx is called the dividend, mod denotes the modulus operator, and y is known as divisor. The result r of a modulo division is called remainder. Below you can find our modulo calculator, the math is explained further down.

Remainder Calculator

Our remainder calculator is straightforward: Insert your dividend in the first field, then enter your divisor (mod) in the second field. After that, the modulo calculator does the math automatically.

The Result is...

Observe that in accordance with the definition a few lines down, our modulo calculator accepts any real number as nominator, and all real numbers distinct from zero as denominator.

This means that you can calculate the modulus of positive and negative numbers, decimals, quotients, rational as well as irrational numbers. Both input fields accept numbers in \mathbb{R}.

If the result consists of a decimal number with a repeating sequence, then the repetend is denoted in (). Next, we shed a light on the Euclidean division.

Modulo Calculation

As stated in the remainder theorem, for any a, b ≠ 0 \in \mathbb{Z} there exists number q,r \in \mathbb{Z}, such that a = bq + r and 0 ≤ r < |b|. The term |b| stands for the absolute value of b.

However, the sole existence of q,r doesn’t signify uniqueness of q and r, therefore we modify the term: a = bq + r and 0 ≤ r < b. This way, both, r and q, exist and are unique as well.

In addition, we extend the scope to the set of real numbers (\mathbb{R}), and end up with this definition, which we use throughout our site: a = bq + r and 0 ≤ r < b; a, b ≠ 0, r \in \mathbb{R}; q \in \mathbb{Z}.

Next, we elaborate on the modulo operation.

Modulo Operation

The modulo operation means to determine the remainder r for a given number a and a particular modulo b. Common notations include, for example, x mod y and x % y.

The number x can be perceived as the nominator, and the modulo y as the denominator of a division. The result of the Euclidean division is called remainder.

Assumed, a = 50, b = 14.

The quotient of 50/14 equals 3.(571428), so we take the integer part of the term, 3, named q. Next we multiply q with the modulo and obtain 3 × 14 = 42.

After that, we subtract 42 from 50 and obtain 8 as remainder. Thus, 50 mod 14 = 8.
Proof: 50 = (3 × 14) + 8.

Supposed a = -50, b = 14.

The fraction -50/14 equals -3.(571428), so we round down -3.(571428) to the nearest integer and get q = -4. In this case, b × q equals -56.

The remainder is -50 -((-4) × 14) = -50 + (4 × 14) = 6. Proof: -50 = (-4 × 14) + 6.

Modulo Operation for Negative Numbers

However, some programming languages, and, for example, MS Excel, compute the modulo of negative numbers differently, because the theorem allows for ambiguity when stating |b|, whereas our definition uses b.

We stick with our interpretation.

For a = -50, b = -14 → r = 6, q = 4, because -50 = (-14 × 4) + 6. Thus, -50 mod -14 = 6.

If a = 50, b = -14 → r = 8, q= -3, because 50 = (-14 × -3) + 8. Therefore, 50 mod – 14 = 8.

Note that x mod y = y mod -y and that -x mod y = -x mod -y. However, x mod y ≠ -x mod -y.

In any case, easier than number crunching is our modulo calculator. In the following section you can learn more about the quotient and remainder of the mod function.

Quotient and Remainder

The term quotient and remainder is used synonym with modulo division and, for instance, division with remainder. However, quotient may a also mean the q part of our definition.

Usually, it’s clear from the context what is meant.

Frequent calculations include, for example:

Before we summarize the modulo calculation in the next part, we would like to give you some examples of how the modulus of a number is used in daily life.

Reading the hour or an analog clock, where does the hour hand at 21:00h point at? Answer, it points at 21 mod 12 = 9 p.m.

When checking if a natural number n is even or odd, we can use n mod 2. If the remainder is 0, then n is even; else the number is odd.

Ahead is the summing-up of the division rest.


You have reached the final part of our page about the modulus operator.

Reading our article up to this line you should have a good understanding of the remainder math, yet if something needs clarification, or to leave feedback, fill in the form at the bottom of this page.

Modulo Calculator

Remember that the terms modulo (mod) and remainder stand for different things, and that the mod function may give different results depending on the software, because of the theorem’s ambiguity.

If our modulo calculator and our information have been useful to you, don’t forget to bookmark us before you leave, and please press the sharing buttons to spread the word about us.

Websites similar to this one can be located in the recommend sites section in the sidebar, and for more information on the math involved in our modulo calculator see the referenced sites below.

Thanks for visiting

Further information:

One comment on “Modulo Calculator

  1. Tiffany says:

    I really like this modulocalculator, thanks a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *