See How Things Work

Division with remainder

Unit
Division
Part
1. Division
Lesson
1.4

Most divisions of whole numbers do not come out exactly: 17 counters make three groups of 5 with 2 left over. This lesson defines the quotient and the remainder of a division, proves that every whole number divided by a nonzero whole number has exactly one of each, and shows how to find them, check them and use them in problems.

When a division does not come out exactly

The lesson “Division as the inverse of multiplication” showed that 14 ÷ 4 has no whole-number quotient: no whole number times 4 is 14. Yet a collection of 14 objects can still be put into groups of 4. The groups simply do not use every object.

Example (Seventeen counters in groups of five).

Put 17 counters into groups of 5. How many groups are there, and how many counters are left?

  1. Take away one group: 17 − 5 = 12 counters remain.
  2. Take away a second group: 12 − 5 = 7 remain.
  3. Take away a third group: 7 − 5 = 2 remain.
  4. 2 is less than 5, so a fourth group cannot be made. Stop.

Answer: 3 groups of 5, and 2 counters left over. Together: 3 × 5 + 2 = 15 + 2 = 17, all the counters.

left over
Figure. 17 counters in groups of 5: three groups (dashed outlines) and 2 counters left over, too few for a fourth group. So 17 = 3 × 5 + 2.

Sharing gives the same two numbers. Deal 17 counters to 5 plates, as in the lesson “Division as sharing and as grouping”: each round uses 5 counters, so after 3 rounds 2 counters are left, too few for another round. Each plate holds 3 counters, and 2 are left over. The rounds of dealing are the groups of 5, so the two pictures always give the same numbers.

Quotient and remainder

Definition (Quotient and remainder).

Let a be a whole number and b a whole number with b ≠ 0. Whole numbers q and r such that

a = q × b + r and r is less than b

are called the quotient and the remainder of the division of a by b.⁠[1][2] As before, a is the dividend and b the divisor.⁠[2]

For 17 divided by 5, the quotient is 3 and the remainder is 2: 17 = 3 × 5 + 2, and 2 is less than 5. A common shorthand is 17 ÷ 5 = 3 R 2, where R stands for remainder.⁠[3]

The condition “r is less than b” is what makes the remainder a true leftover. Without it, 17 = 2 × 5 + 7 would also qualify, with 7 counters “left over”, but 7 counters still contain another group of 5. The remainder is the part that is smaller than the divisor.⁠[4] In the same way, q × b is the largest multiple of b that is not more than a.

05101520555217
Figure. Jumps of 5 from 0 reach 5, 10 and 15. A fourth jump would land on 20, past 17. So 15 = 3 × 5 is the largest multiple of 5 that is not more than 17, and 17 lies 2 beyond it: the quotient is 3 and the remainder 2.
Caution.

The shorthand “17 ÷ 5 = 3 R 2” is not an equation between two numbers, and it cannot be used like one. It would give 17 ÷ 5 = 3 R 2 and 23 ÷ 7 = 3 R 2, and so seem to say that 17 ÷ 5 and 23 ÷ 7 are equal. They are different divisions: 17 objects in groups of 5 and 23 objects in groups of 7 have nothing in common except the numbers 3 and 2. (Looking ahead: the unit Fractions shows that, as numbers, 17 ÷ 5 is 3 and 2 fifths while 23 ÷ 7 is 3 and 2 sevenths, which are not equal.) The full statement is 17 = 3 × 5 + 2 with 2 less than 5; the shorthand only abbreviates it.

Exactly one quotient and one remainder

The definition says “whole numbers q and r such that …”. For it to make sense, such numbers must exist, and there must be only one pair. Both are true.

Theorem .

Let a be a whole number and b a whole number with b ≠ 0. There is exactly one pair of whole numbers q and r such that a = q × b + r and r is less than b.

Proof.

Existence. Look at the multiples 0 × b, 1 × b, 2 × b, …, a × b. The first is 0, which is not more than a. Each is b more than the one before, since b ≥ 1. So the numbers k from 0 to a with k × b not more than a form an unbroken run 0, 1, …, q, and (q + 1) × b is more than a. (If q is a itself, this holds because (a + 1) × b is at least a + 1.)

Let r = a − q × b. This is a whole number, because q × b is not more than a (lesson “Subtraction within the whole numbers: when it is defined”). Then a = q × b + r. Moreover (q + 1) × b = q × b + b is more than a = q × b + r, so b is more than r: r is less than b.

Uniqueness. Suppose a = q × b + r = s × b + t, where r and t are both less than b, and suppose q and s were different, say q is less than s. Then s is at least q + 1, so s × b is at least (q + 1) × b = q × b + b. Hence a = s × b + t is at least q × b + b, which is more than q × b + r = a, since b is more than r. So a would be more than itself, which is impossible. Hence q = s, and then r = a − q × b = a − s × b = t.

This theorem is traditionally called the division algorithm: when a whole number is divided by a nonzero one, there is a quotient and a remainder.⁠[5][6] The next lesson, The division algorithm: dividend, divisor, quotient and remainder, studies it in detail.

Proposition .

Let b ≠ 0. The remainder of a divided by b is 0 exactly when a ÷ b has a whole-number quotient in the sense of the lesson Division as the inverse of multiplication. In that case the two quotients are the same number.

Proof.

If the remainder is 0, then a = q × b + 0 = q × b, so a ÷ b = q. Conversely, if a ÷ b = q, then a = q × b = q × b + 0, and 0 is less than b; by the uniqueness part of the Theorem, q and 0 are the quotient and the remainder.

So exact division is the special case of remainder 0.⁠[7] The other special cases follow from the definition as well:

  • a less than b. Not even one group fits: q = 0 and r = a, since a = 0 × b + a and a is less than b.
  • b = 1. Every remainder must be less than 1, so r = 0 and q = a.
  • a = 0. q = 0 and r = 0.
  • b = 0. Excluded. The remainder would have to be a whole number less than 0, and there is none. This matches the lesson “Why division by zero is undefined”.
Looking ahead.

The unit Integers extends the theorem to negative dividends. The remainder is still required to lie from 0 up to, but not including, the divisor, so it cannot be negative.⁠[8]

Finding the quotient and remainder

The proof gives two ways to find q and r.

  • Repeated subtraction. Subtract b from a again and again while what remains is at least b. The number of subtractions is q, and what remains at the end is r.
  • The largest multiple. Use multiplication facts to find the largest multiple q × b that is not more than a. Then r = a − q × b.

Either way, the result is checked in two parts: q × b + r must equal a, and r must be less than b.

Example (A simple case).

Divide 50 by 7.

  1. Multiples of 7 near 50: 7 × 7 = 49 and 8 × 7 = 56.
  2. 49 is not more than 50, and 56 is more than 50. So q = 7.
  3. r = 50 − 49 = 1.
  4. Check: 7 × 7 + 1 = 49 + 1 = 50, and 1 is less than 7.

Answer: 50 ÷ 7 = 7 R 1, that is, 50 = 7 × 7 + 1.

Example (A larger dividend).

Divide 100 by 8.

  1. Start from an easy multiple: 10 × 8 = 80, which is not more than 100.
  2. Continue in steps of 8: 11 × 8 = 88, 12 × 8 = 96, 13 × 8 = 104.
  3. 96 is not more than 100, and 104 is more. So q = 12.
  4. r = 100 − 96 = 4.
  5. Check: 12 × 8 + 4 = 96 + 4 = 100, and 4 is less than 8.

Answer: 100 ÷ 8 = 12 R 4.

Example (Edge cases).

Divide 4 by 9, and 36 by 9.

  1. 4 is less than 9, so no group of 9 fits: q = 0 and r = 4. Check: 0 × 9 + 4 = 4, and 4 is less than 9.
  2. 36 = 4 × 9 exactly, so q = 4 and r = 0. Check: 4 × 9 + 0 = 36, and 0 is less than 9.

Answer: 4 ÷ 9 = 0 R 4, and 36 ÷ 9 = 4 R 0, which is the exact division 36 ÷ 9 = 4.

Example (A mistake: the remainder is too big).

Someone divides 29 by 4 and writes 6 R 5. Check it and correct it.

  1. First part of the check: 6 × 4 + 5 = 24 + 5 = 29. This part passes.
  2. Second part: is 5 less than 4? No. The leftover 5 still contains a group of 4.
  3. Move that group into the quotient: 29 = 7 × 4 + 1.
  4. Check again: 7 × 4 + 1 = 28 + 1 = 29, and 1 is less than 4.

Answer: 29 ÷ 4 = 7 R 1. A remainder that is not less than the divisor means the quotient is too small.

Game

Groups and leftovers

Round
1
Score
0
Streak
0

Divide 47 by 6: make groups of 6 until fewer than 6 counters are left. Then give the quotient and the remainder.

Groups of 6 made: 0. Counters not in a group: 47 (grey).

What the remainder means in a problem

In a problem, the quotient and remainder answer a question about real objects, and the question decides how they are used. The same division can give three different answers.

Example (One division, three questions).

50 people travel in minibuses that seat 12 each. 50 = 4 × 12 + 2, so 50 ÷ 12 = 4 R 2.

  1. How many minibuses are needed to take everyone? 4 minibuses carry 48 people and leave 2 behind, so a fifth is needed. The answer is 5: the quotient plus one, because the remainder is not 0.
  2. How many minibuses can be filled completely? Only full groups count. The answer is 4: the quotient, and the remainder is ignored.
  3. If 4 full minibuses leave, how many people are still waiting? The answer is 2: the remainder itself.

Answers: 5, 4 and 2. All three come from the same quotient and remainder, read in the light of the question.

Exercises

Exercise .

Divide 27 by 4 and check your answer.

▸ Show solution

Multiples of 4: 6 × 4 = 24 is not more than 27 and 7 × 4 = 28 is more. So q = 6 and r = 27 − 24 = 3. Check: 6 × 4 + 3 = 27, and 3 is less than 4. So 27 ÷ 4 = 6 R 3.

Exercise .

Find the quotient and remainder of 6 divided by 10, and of 40 divided by 8.

▸ Show solution

6 ÷ 10: 6 is less than 10, so q = 0 and r = 6 (6 = 0 × 10 + 6). 40 ÷ 8: 40 = 5 × 8, so q = 5 and r = 0; the division is exact, 40 ÷ 8 = 5.

Exercise .

Is 38 ÷ 6 = 5 R 8 correct? If not, correct it.

▸ Show solution

No. 5 × 6 + 8 = 38 is true, but the remainder 8 is not less than the divisor 6. Moving one group of 6 into the quotient gives 38 = 6 × 6 + 2, and 2 is less than 6. So 38 ÷ 6 = 6 R 2.

Exercise .

75 students go on a trip in buses that seat 20 each. How many buses are needed, and how many seats are empty in the last bus?

▸ Show solution

75 = 3 × 20 + 15, so 75 ÷ 20 = 3 R 15. Three buses take 60 students and leave 15, so 4 buses are needed. The fourth bus carries 15 students and has 20 − 15 = 5 empty seats.

Exercise .

Which remainders are possible when a whole number is divided by 4? Show that each of them actually occurs.

▸ Show solution

A remainder of division by 4 is a whole number less than 4, so it is 0, 1, 2 or 3. All four occur: 8 = 2 × 4 + 0, 9 = 2 × 4 + 1, 10 = 2 × 4 + 2 and 11 = 2 × 4 + 3. In general, division by b has exactly the b possible remainders 0, 1, …, b − 1.

Exercise .

Suppose a divided by b (b ≠ 0) has quotient q and remainder r. Prove that a + b divided by b has quotient q + 1 and the same remainder r.

▸ Show solution

From a = q × b + r we get a + b = q × b + b + r = (q + 1) × b + r, using the distributive property. The remainder r is still less than b.

So q + 1 and r satisfy the definition for a + b divided by b, and by the uniqueness part of the Theorem they are its quotient and remainder. Example: 17 = 3 × 5 + 2 and 22 = 4 × 5 + 2.

Summary

  1. When a division does not come out exactly, the objects form as many full groups as possible, and the rest are left over.
  2. For a whole number a and b ≠ 0, the quotient q and remainder r satisfy a = q × b + r with r less than b; the shorthand is a ÷ b = q R r.
  3. Such q and r always exist and are unique (the division algorithm); q × b is the largest multiple of b not more than a.
  4. The remainder is 0 exactly when the division comes out exactly. If a is less than b, the quotient is 0 and the remainder is a.
  5. A quotient and remainder are checked in two parts: q × b + r = a, and r less than b. In a problem, the question decides whether to round up, drop the remainder, or use it.

Sources

  1. 1.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 2, “Divisibility Theory in the Integers”, section 2.2, “The Division Algorithm” (Theorem 2.1), p. 17 (the whole topic: pp. 17–19).
    “The integers q and r are called, respectively, the quotient and remainder in the division of a by b.”
    Used for: the definition: q and r with a = q × b + r and r less than b are the quotient and the remainder of a divided by b.
  2. 2.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.1, “Divisibility and Modular Arithmetic” (4.1.3, “The Division Algorithm”), Definition 2, p. 253 (the whole topic: pp. 253–254).
    “In the equality given in the division algorithm, d is called the divisor, a is called the dividend, q is called the quotient, and r is called the remainder.”
    Used for: the names quotient and remainder, with a the dividend and b the divisor.
  3. 3.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 1, “Whole Numbers”, section 1.5, “Divide Whole Numbers” (“Divide Whole Numbers”), p. 77 (the whole topic: pp. 76–78).
    “(The R stands for remainder.)”
    Used for: the shorthand 17 ÷ 5 = 3 R 2, where R stands for remainder.
  4. 4.
    David M. Burton, Elementary Number Theory (7th ed., McGraw-Hill, 2011).
    Chapter 2, “Divisibility Theory in the Integers”, section 2.2, “The Division Algorithm”, p. 17 (the whole topic: pp. 17–19).
    “roughly, it asserts that an integer a can be “divided” by a positive integer b in such a way that the remainder is smaller than is b.”
    Used for: the remainder is smaller than the divisor.
  5. 5.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.1, “Divisibility and Modular Arithmetic” (4.1.3, “The Division Algorithm”), p. 253 (the whole topic: pp. 253–254).
    “When an integer is divided by a positive integer, there is a quotient and a remainder, as the division algorithm shows.”
    Used for: the theorem that there are a quotient and a remainder is called the division algorithm.
  6. 6.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.1, “Divisibility and Modular Arithmetic” (4.1.3, “The Division Algorithm”), Theorem 2, p. 253 (the whole topic: pp. 253–254).
    “Let a be an integer and d a positive integer. Then there are unique integers q and r, with 0 ≤ r < d, such that a = dq + r.”
    Used for: the Theorem: the quotient and remainder exist and are unique (the division algorithm), stated in the source for all integers a.
  7. 7.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.1, “Divisibility and Modular Arithmetic” (4.1.3, “The Division Algorithm”), p. 254 (the whole topic: pp. 253–254).
    “Note that the integer a is divisible by the integer d if and only if the remainder is zero when a is divided by d.”
    Used for: a division comes out exactly exactly when the remainder is 0.
  8. 8.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 4, “Number Theory and Cryptography”, section 4.1, “Divisibility and Modular Arithmetic” (4.1.3, “The Division Algorithm”), Example 4, p. 254 (the whole topic: pp. 253–254).
    “Note that the remainder cannot be negative.”
    Used for: for negative dividends (unit Integers) the remainder still cannot be negative.