GCF and LCM Calculator
GCF and LCM of several numbers, with factorisations.
The remainder of a division, both conventions.
The number being divided.
The number you divide by.
| Measure | Value |
|---|
Modulo Calculator gives the remainder left when one number is divided by another, along with the quotient. It is the operation behind clock arithmetic, checksums, hash buckets, cycling through a list and every 'every nth item' rule: 17 mod 5 is 2 because five goes into seventeen three times with two left over.
Negative numbers are where the operation stops being obvious, and the calculator shows both answers rather than picking one. Mathematics and Python floor the quotient, which keeps the remainder's sign the same as the divisor: -17 mod 5 is 3. C, Java, JavaScript and most spreadsheet engines truncate towards zero, which keeps the remainder's sign the same as the dividend: -17 % 5 is -2. Neither is wrong, but mixing them up produces bugs that only appear on negative input.
The modular inverse is listed when one exists. It is the number that multiplies a back to 1 modulo n, and it exists only when a and n share no common factor. That condition is the whole basis of RSA and of most modular arithmetic in cryptography, which is why it is worth seeing beside the remainder.
The page shows its working, not just its answer. Where there is a formula it is printed with your own numbers substituted in, so you can check the result rather than take it on trust -- which is the difference between a calculator you can use for something that matters and one you cannot.
Everything runs inside your browser. What you type is never uploaded, never logged and never stored, and the calculator keeps working if your connection drops after the page has loaded.
Looking for something this does not cover? FreeToolsHub.org is another hub of free online tools that need no account, and it is worth a look if modulo calculator is only part of what you are working on.
The modulo calculator is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:
The remainder after division. 17 mod 5 is 2, because 17 is three fives with two left over.
They differ only for negative numbers. Flooring keeps the sign of the divisor, truncating keeps the sign of the dividend. Python floors; C, Java and JavaScript truncate.
Take it mod 2. A remainder of 0 means even, 1 means odd.
The number that multiplies a back to 1 modulo n. It exists only when a and n are coprime, and it underpins RSA and similar schemes.
If the modulo calculator is not quite what you need, these other free tools solve closely related problems, and there are 25 more in math calculators.
GCF and LCM of several numbers, with factorisations.
Prime factors with exponents, the tree and every divisor.
Calculate with fractions and mixed numbers, simplified and explained.
Check whether a number is prime and find its factors.
Cross-multiply to find the missing term of a proportion.
Checked and rebuilt on 2026-10-14. The method this calculator uses is described in the section above, and corrections go through the contact page.