Modulo Calculator
Find the remainder of a division.
Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.
Modulo Calculator
How to use this tool
- Enter your details in the fields above.
- Press Generate to see the result.
- Use Load sample to try the worked example, or Clear to start again.
Worked example
For 17 mod 5, the remainder is 2, because 17 = 3 x 5 + 2. For -17 mod 5 the result is 3, because this tool always returns a non-negative remainder.
What this tool does not do / Limits
This tool returns the mathematical (non-negative) remainder, which can differ from the remainder sign some programming languages give for negative dividends. Division by zero is not allowed.
Frequently asked questions
What is modulo?
The remainder left after division: 17 mod 5 is 2 because 5 goes into 17 three times with 2 left over.
Why is -17 mod 5 equal to 3 here?
This tool uses the mathematical remainder, which is always non-negative, so -17 = -4 x 5 + 3.
Related tools
CSV Cleaning Studio
Remove duplicates, fix missing values, standardise dates and export a clean CSV. Your file never leaves your device.
LiveChart Builder
Build charts from CSV data with aggregation, sorting and accessible colour palettes. Export as PNG or SVG.
LiveLength Converter
Convert lengths between metric and imperial units and see the full table of equivalents.
Live