my question is

If $-27$ is divided by $5$, what would be the remainder?


closed as off-topic by José Carlos Santos, Adrian Keister, Shaun, Lord_Farin, Paul Frost Jan 21 at 18:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – José Carlos Santos, Adrian Keister, Shaun, Lord_Farin, Paul Frost
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 7
    $\begingroup$ Depends on convention. What is yours? There are at least a handful of conventions on how the quotient is rounded (which then determines the "remainder"). $\endgroup$ – Bill Dubuque Dec 31 '13 at 17:47

​​​​There are two conventions, depending on whether you allow the remainder to be negative.

Either you don't

$$-27 = -6 \times 5 + 3$$

or you do

$$-27 = -5 \times 5 + (-2)$$

Note that whatever convention you choose, the two possibilities for the remainder will always differ by $5$.

  • $\begingroup$ remainder can not be greater than Dividend $\endgroup$ – mukesh Dec 31 '13 at 17:51
  • $\begingroup$ It can not be +3, As reminder is remaining part after quotient when a dividing divident by divisor. In short none of us will have confusion on quotient, if you take in decimal point format its number coming before decimal point. Here in this case -27/5 = -5.4. So quotient is -5. So reminder is -2. $\endgroup$ – Neo Oct 10 '15 at 3:46
  • 1
    $\begingroup$ @neolivz4ever As I and many others said, there are multiple conventions on how the quotient is rounded. You are free to use your own convention, but that won't stop other people using a different one! $\endgroup$ – Chris Taylor Oct 10 '15 at 7:17
  • $\begingroup$ @ChrisTaylor: Well theorotically you can have infinite combinations of y = m.x + c combination. $\endgroup$ – Neo Oct 12 '15 at 11:18
  • 3
    $\begingroup$ @neolivz4ever But only two where the absolute value of the remainder is less than the divisor - sure, you can write 13 = 1 x 5 + 8 but no one thinks that is a justification for saying that 8 is the remainder after dividing 13 by 5. Look, you have one convention, and almost everyone in the world has a different convention. You can either admit that there are multiple valid conventions, or you can continue to pointlessly insist that you are right and the rest of the world is wrong. There is no interesting discussion to be had in either case. $\endgroup$ – Chris Taylor Oct 12 '15 at 12:29

Per the Euclidean Algorithm:

$$-27 = \underbrace{-6}_q\cdot \underbrace{5}_d + \underbrace{3}_r$$

where $q$ is the quotient when $-27$ (dividend) is divided by the divisor $d=5$, and $r$ is the remainder. It is standard to represent the remainder $r$ such that $0 \leq r \lt \;d.$

  • $\begingroup$ in this case r is 3. but it is greater than Dividend. after division remainder shoul be less than Dividend i think. $\endgroup$ – mukesh Dec 31 '13 at 17:54
  • 1
    $\begingroup$ Here, $5$ is the divisor and $r\lt 5$. $\;\;-27$ is the dividend: the number that the divisor $5$ is dividing. Check for yourself: google "dividend" and "divisor". $\endgroup$ – Namaste Dec 31 '13 at 17:55
  • $\begingroup$ @amWhy: Could use another UV =1 $\endgroup$ – Amzoti Jan 1 '14 at 17:59
  • $\begingroup$ @amWhy, Why is it standard to constrain the remainder to a postive number? It seems to make more intuitive sense if the remainder is -2 right? $\endgroup$ – Pacerier Sep 10 '14 at 9:50

There are various conventions for how to define the quotient and remainder for the division algorithm when extended from naturals to integers. The remainder is uniquely determined once one defines the quotient, and usually conventions say which to round the quotient, e.g. towards $\,0\,$ or, towards the nearest integer, or towards $\,\pm\infty.$ Some programming languages provide all of the possibilities, e.g. see the floor, ceiling, round, truncate functions in Common Lisp.

A web search will turn up further discussion in many places, e.g. on Wikipedia and D. Leijen, Division and Modulus for Computer Scientists.


Let $m$ be a negative integer $< 0$ and let $b$ be a positive integer $> 0$.

Proposition: There exist unique integers $q$ and $r$ satisfying the following conditions:

$q \le 0$

$0 \le -r \lt b\;$ (so $r$ is a nonpositive integer)

$m = qb + r$

The proof is left as an exercise for the interested reader.

There is nothing heretical about this. To some it might even be the more natural way to perform Euclidean Division on negative numbers. Why?

You are making great progress working with integers and are using them to measure lengths. You work with many rulers using 'tick' marks, but have to select the ruler with the required ‘Ticks per Unit Length Precision Granularity’.

You know if your unit length has 5 ticks and something is 27 ticks long, that you measure it on the ruler at (5*5 + 2) ticks, or

27 ticks / (5 ticks/Units) = $(5 + \frac{2}{5})$ Units asdf

You naturally do the same thing when measuring to the left (negative lengths).

The next day you get a bit more abstract and define the rational numbers. It turns out that your method is actually the way to represent a rational number as a mixed number. Just for fun, check out

How to Convert a Negative Mixed Number Into an Improper Fraction : Fractions 101

Now convert $-5\frac{2}{5}$ into an improper fraction.


Reminder is 3 because $-27=-6 \cdot 5 + 3$.


suppose you have a loan of 27 i.e -27.what will the loan amount which you have to pay after dividing the loan as much as possible. after dividing the loan among 5 people each with -5 you will be still left with -2.so -2 must be the remainder.

  • $\begingroup$ The remainder is generally defined to be $\geqslant 0$. So $-27$ divided by $5$ results in entire quocient $-6$ and remainder $3$. $\endgroup$ – Ramiro Mar 13 '16 at 17:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.