How it works
Type the dividend and the divisor, then pick the floored or truncated convention. The page gives the remainder, the quotient, the remainder the other convention would give, and the check line.
Formula
Remainder r = a - n x q.
Check: a = n x q + r.
Sources
Example
Dividend a: -17; Divisor n: 5. Remainder: 3
Frequently asked questions
Why do I get two different answers?
For negative numbers, maths floors the quotient and many programming languages truncate it. The page shows both so you can match the tool you are using.
What is the check line for?
It puts the numbers back together as a = n x q + r. If that line is true, the quotient and remainder belong to each other.