Why is $-145 \mod 63 = 44$? When I enter $-145 \mod 63$ into google and some other calculators, I get  $44$. But when I try to calculate it by hand I get that $-145/63$ is $-2$ with a remainder of $-19$. This makes sense to me, because $63\cdot (-2) = -126$, and $-126 - 19 = -145$. 
So why do the calculators give that the answer is $44$?

We say $a \equiv b$ (mod n) if $a-b$ is a multiple of $n$. So notice that:
$$-145-44 = -189 = -3(63)$$
