dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day! You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

This page is using the new English version of dCode, please make comments !

Tool to compute any modulo operation. Modulo is the name of the calculus of the remainder in the Euclidian division

Answers to Questions

How to calculate a Modulo?

The program make the euclidian Division and return the remainder value. This apply to big numbers, as with decimal numbers. however, N must be an integer.

123 modulo 10 = 3 because 123 = 12*10 + 3

You can consider also negative modulos (rare)

123 modulo 10 = -7 beacause 123 = 13*10 - 7

How to write a modulo?

A modulo calculation can be written differently:

In Mathematics you can write it using the \( \equiv \) congruence symbol and the keyword mod :

$$ 123 \ equiv 3 \mod 10 $$

For computer and keyboard writings (on internet) you can write the %percentage symbol:

$$ 123 \% 10 = 3 $$

How to calculate a^b mod n?

This calculus is named exponentiation-calculus" target="_blank">modular exponentiation, use the dCode page dedicated to exponentiation-calculus" target="_blank">modular exponentiation.

Ask a new question

Source code

dCode retains ownership of the source code of the script Modulo N Calculator. Except explicit open source licence (free / freeware), any algorithm, applet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any snippet or function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in PHP (or Java, C#, Python, Javascript, etc.) which dCode owns rights can be transferred after sales quote. So if you need to download the Modulo N Calculator script for offline use, for you, your company or association, see you on contact page !

dCode uses cookies to customize the site content, analyze user behavior and adapt dCode to your use. Some data is stored and collected for advertising purposes and may be shared with our partners. OK