Updated
Using Modulo calculator
Euclidean modulo returns r with 0 ≤ r < modulus, so dividend = floor quotient × modulus + r.
The modulus must be positive. Some programming languages use a remainder with the dividend’s sign; that value is shown separately to make the convention clear.
A worked example
With integer dividend = -17, positive integer modulus = 5, the euclidean remainder is 3.
Before you use the result
The modulus must be positive. Some programming languages use a remainder with the dividend’s sign; that value is shown separately to make the convention clear.
Example results for integer dividend
These examples use Positive integer modulus: 5. They are reference calculations, not recommended settings.
| Integer dividend | Euclidean remainder |
|---|---|
| -17 | 3 |
| -34 | 1 |
Cite this page
ToolOctopus. “Modulo calculator.” Updated 2026-09-26. https://tooloctopus.com/modulo-calculator.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. Licence and source code.
