- Practice
- About 14 min
- 5 practice questions
Least and greatest numbers: adding, subtracting and counting multiples
Find the least number to add or subtract for divisibility, the greatest or smallest n-digit number with a property, and count multiples in a range.
If something looks wrong, please tell us.
A favourite exam question type asks for the least number to add to, or subtract from, a given number to make it divisible by something, or for the greatest or smallest number of a given size with that property. All of them use one move: divide, look at the remainder, and adjust. This lesson drills the move, then extends it to counting multiples in a range.
Add or subtract: use the remainder
- Divide the number N by d and note the remainder r.
- To make N divisible by subtracting, subtract r (the least number to subtract is r).
- To make N divisible by adding, add d − r (the least number to add is d − r). If r is 0, nothing is needed.
Worked example 1: one divisor
What is the least number to subtract from 5000 so that it is divisible by 37? 37 × 135 = 4995, so 5000 = 37 × 135 + 5 and the remainder is 5. Subtract 5 to get 4995. To make it divisible by ADDING instead, add 37 − 5 = 32 to get 5032 = 37 × 136. Check: 37 × 136 = 4995 + 37 = 5032.
Several divisors: take the LCM
If the answer must be divisible by several numbers, replace d by their LCM. For 12, 15 and 20, the LCM is 60 (12 = 2² × 3, 15 = 3 × 5, 20 = 2² × 5, so LCM = 2² × 3 × 5 = 60). The least number to add to 1000 so that it is divisible by 12, 15 and 20: 1000 = 60 × 16 + 40, so the remainder is 40 and we add 60 − 40 = 20. The result is 1020 = 60 × 17.
Least number to subtract = remainder r. Least number to add = divisor − r. For several divisors, divide by their LCM.
Greatest and smallest numbers of a given size
The greatest 4-digit number is 9999 and the smallest is 1000. To find the greatest 4-digit number divisible by 36, divide 9999 by 36: 36 × 277 = 9972 and the remainder is 27, so the answer is 9999 − 27 = 9972. For the smallest 4-digit number divisible by 36, divide 1000 by 36: the remainder is 28 (36 × 27 = 972), so add 36 − 28 = 8 to get 1008. Check: 1008 ÷ 36 = 28.
The same idea works for 3-digit numbers with 999 and 100, and for greatest or smallest numbers that leave a given remainder: find the number divisible first, then add the remainder.
Worked example 2: counting multiples in a range
How many multiples of 7 are there from 100 to 500? The number of multiples of 7 up to 500 is 500 ÷ 7 = 71 (whole part). The number up to 99 is 99 ÷ 7 = 14 (whole part). The difference is 71 − 14 = 57. Check: the first multiple is 105 and the last is 497, and (497 − 105) ÷ 7 + 1 = 56 + 1 = 57.
Worked example 3: multiples of either number
How many numbers from 1 to 100 are multiples of 5 or of 8? Multiples of 5: 100 ÷ 5 = 20. Multiples of 8: 100 ÷ 8 = 12 (whole part). Numbers that are multiples of both are multiples of the LCM 40: 100 ÷ 40 = 2 (whole part), namely 40 and 80. These were counted twice, so subtract them: 20 + 12 − 2 = 30.
| Question type | Method |
|---|---|
| Least number to add so that N is divisible by d | d − (remainder of N ÷ d) |
| Greatest n-digit number divisible by d | Largest n-digit number minus its remainder |
| Smallest n-digit number divisible by d | Add d − remainder to the smallest n-digit number |
| Count of multiples of d up to N | Whole part of N ÷ d |
| Count of numbers divisible by a or b | Count(a) + Count(b) − Count(LCM) |
Key takeaways
- The remainder tells you how far you are below the previous multiple.
- For several divisors, use the LCM.
- The count of multiples of d up to N is the whole part of N ÷ d.
- When counting 'a or b', subtract the numbers counted twice.
Check your understanding
-
1. What is the least number to be subtracted from 5000 so that the result is divisible by 37?
- 5
- 32
- 12
- 7
Show answer
Answer: A. 37 × 135 = 4995 and 5000 − 4995 = 5, so subtract 5.
-
2. What is the greatest four-digit number divisible by 36?
- 9936
- 9972
- 9990
- 9900
Show answer
Answer: B. 9999 ÷ 36 leaves remainder 27 (36 × 277 = 9972), so the greatest such number is 9999 − 27 = 9972.
-
3. What is the least number to be added to 1000 so that the sum is divisible by 12, 15 and 20?
- 40
- 60
- 10
- 20
Show answer
Answer: D. The LCM is 60 and 1000 = 60 × 16 + 40. Add 60 − 40 = 20 to get 1020.
-
4. How many multiples of 7 lie between 100 and 500?
- 56
- 58
- 57
- 71
Show answer
Answer: C. There are 71 multiples of 7 up to 500 and 14 up to 99, so 71 − 14 = 57.
-
5. How many of the numbers from 1 to 100 are multiples of 5 or of 8?
- 30
- 32
- 34
- 28
Show answer
Answer: A. Multiples of 5: 20. Multiples of 8: 12. Multiples of 40: 2. Total = 20 + 12 − 2 = 30.
Sign in to keep track of the lessons you finish.