On this page
If you ask a standard calculator or a programming language to divide −7 by 3, you might get a few different answers. Type it into Python, and the remainder is 2. Write a quick program in C or Java, and the remainder is −1.
But what does mathematics say? According to the Euclidean division algorithm, the remainder of −7 divided by 3 is exactly 2. This mathematical rule isn't just a quirky convention—it is what makes modular arithmetic consistent and helps you solve cyclic problems in competitive exams like the JEE.
Here is exactly why the remainder of a negative number has to be positive, and how to find it without getting tripped up by standard algebraic habits.
What is the mathematical rule for remainders?
When you divide a dividend (a) by a divisor (b), you look for a quotient (q) and a remainder (r) that satisfy the basic division equation a = bq + r.
In rigorous number theory, the Euclidean division algorithm requires that the remainder must always be greater than or equal to zero, and strictly less than the absolute value of the divisor (0 ≤ r < |b|).
If you are dividing −7 by 3, you might be tempted to say 3 × (−2) = −6, leaving a remainder of −1. But because r must be non-negative, this approach is mathematically incorrect and violates the algorithm's conditions.
Instead, you must move your quotient one step further away from zero. Three times −3 is −9. To get back to −7 from −9, you add 2. Therefore, the Euclidean quotient is −3, and the true mathematical remainder is 2.
Why do remainders have to be positive?
Keeping remainders positive is essential for describing repeating cycles, which mathematicians formalise as modular arithmetic.
Think of a standard clock face. If it is 2:00 now, what time was it exactly 5 hours ago? Mathematically, 2 − 5 = −3. But clocks do not show negative hours. You add 12 to find that the equivalent time is 9:00. In modular arithmetic, we say that −3 is congruent to 9 modulo 12.
The exact same logic applies to angles in trigonometry. An angle of −90° points to exactly the same direction as 270°. When you are finding arg z in each quadrant for complex numbers, or tracking rotating objects, adding a full cycle of 360° (or 2π) brings negative values back into a positive, predictable range.
This strict cyclical consistency is exactly what Qin Jiushao used to formalise the Chinese remainder theorem. His intricate calculations relied on remainders wrapping around neatly in one positive direction to ensure a unique and consistent solution.
How do you handle negative remainders in exam questions?
In competitive exams, you are often asked to find the remainder when a massive expression is divided by a small integer. A common trick is to use negative remainders as a temporary intermediate step to keep the numbers small and manageable.
For example, find the remainder when 14¹¹ is divided by 5.
Notice that 14 is 1 less than a multiple of 5 (since 15 = 3 × 5).
So, 14 ≡ −1 (mod 5).
This means 14¹¹ ≡ (−1)¹¹ (mod 5).
Since 11 is an odd power, (−1)¹¹ = −1.
Your intermediate remainder is −1. However, the final answer to the question must be positive. To convert the negative remainder into a valid Euclidean remainder, simply add the divisor (5) to it. The final remainder is 5 − 1 = 4.
If you are practicing modular arithmetic and keep making sign errors, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. This allows you to trace your steps and see exactly where the cycle wraps around.



