JESUS CHRIST IS THE ONLY TRUE GOD
Math calculator

Modulo Calculator

Calculate a nonnegative mathematical modulo for two integers.

Your calculationPrivate in your browser
Report a result

Start with a worked example

Open the worked example for Modulo. The example starts with Dividend = -17, Divisor = 5.

Modulo Calculator formula

Modulo is the remainder normalized to the divisor’s sign interval using ((a mod b)+b) mod b.

Inputs and units

Inputs and example values for Modulo Calculator
InputFormat / rangeExample
DividendNumber-17
Divisormin 15

Worked example

The values listed in Inputs and units give 3 for Modulo.

Modulo
3

Results and assumptions

The worked example uses the units shown in its input table. Use those same units to reproduce it.

Fix an input or unexpected result

Dividend is required. Enter dividend using the format and bounds in the input table. Zero and an empty field are different: use zero only if it is allowed and represents your data.

See how to check a result or report an issue.