Counting digits
How many times do you write the digit 1 from 1 to 20? How many digits from 1 to 100? Count them in groups.
A sign painter is asked to paint the house numbers 1 to 100 on a street. How many times will he paint the digit 9? How many digits will he paint in all? Questions like these sound like you must write every number out. You do not. A digit is one of the ten symbols 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 that we use to write numbers. The number 47 is one number written with two digits, 4 and 7. If you count the digits in groups, by their place in the number, the answer comes quickly and you do not miss any.
Ones place and tens place
In a two-digit number like 47, the 7 is in the ones place and the 4 is in the tens place. To count how many times a digit is written, count it in each place separately, and then add the two counts.
- In the ones place, a digit comes back once in every ten numbers. From 1 to 30, the digit 2 is in the ones place in 2, 12 and 22.
- In the tens place, a digit stays for a whole group of ten numbers. From 1 to 30, the digit 2 is in the tens place in 20, 21, 22, 23, 24, 25, 26, 27, 28 and 29.
Remember
Times a digit is written = times in the ones place + times in the tens place
This is for numbers up to 99. If your range goes on to 100, check the number 100 on its own.
How many times do you write a digit?
- List the numbers that have the digit in the ones place, and count them.
- Find the group of ten that starts with the digit (for the digit 3, that is 30 to 39), and count how many of those numbers are in your range.
- Add the two counts. A number like 33 is in both lists, and that is right: you write the digit 3 twice in it.
Example 1
You write the numbers from 1 to 20. How many times do you write the digit 1?
- Ones place: 1 and 11. That is 2 times.
- Tens place: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19. That is 10 times.
- 2 + 10 = 12.
Answer: 12 times
Example 2
You write the numbers from 1 to 40. How many times do you write the digit 3?
- Ones place: 3, 13, 23, 33. That is 4 times.
- Tens place: 30 to 39. That is 10 times.
- 4 + 10 = 14.
Answer: 14 times
Example 3
You write the numbers from 1 to 100. How many times do you write the digit 9?
- Ones place: 9, 19, 29, 39, 49, 59, 69, 79, 89, 99. That is 10 times.
- Tens place: 90 to 99. That is 10 times.
- 100 has no 9.
- 10 + 10 = 20.
Answer: 20 times
The digit 0 is a special case, because no number starts with 0. From 1 to 99 it appears only in the ones place: 10, 20, 30 and so on up to 90, which is 9 times. The number 100 adds two more, so from 1 to 100 you write 0 eleven times.
How many digits in all?
A second kind of question asks how many digits you write altogether. Here, put the numbers into groups by how many digits they have. All the numbers in one group are the same length, so you multiply.
| Numbers | How many numbers | Digits each | Digits in the group |
|---|---|---|---|
| 1 to 9 | 9 | 1 | 9 |
| 10 to 99 | 90 | 2 | 180 |
| 100 to 999 | 900 | 3 | 2,700 |
To count how many numbers are in a group, use last − first + 1, because both ends are included. From 10 to 99 there are 99 − 10 + 1 = 90 numbers, not 89.
Example 4
You write all the numbers from 1 to 100. How many digits do you write in total?
- 1 to 9: 9 numbers with 1 digit each = 9 digits.
- 10 to 99: 90 numbers with 2 digits each: 90 × 2 = 180 digits.
- 100: 1 number with 3 digits = 3 digits.
- 9 + 180 + 3 = 192.
Answer: 192 digits
Example 5
You write all the numbers from 1 to 75. How many digits do you write in total?
- 1 to 9: 9 digits.
- 10 to 75: 75 − 10 + 1 = 66 numbers, with 2 digits each: 66 × 2 = 132 digits.
- 9 + 132 = 141.
Answer: 141 digits
Working backwards
A harder puzzle gives you the total and asks for the numbers. For example: the pages of a book are numbered from 1, and the printer used 252 digits. How many pages does the book have? Take away whole groups until the rest is all three-digit numbers.
Example 6
The pages of a book are numbered from 1. The page numbers use 252 digits in all. How many pages are there?
- Pages 1 to 9 use 9 digits, and pages 10 to 99 use 180. Together: 189 digits.
- Digits left: 252 − 189 = 63.
- Each page from 100 on uses 3 digits: 63 ÷ 3 = 21 more pages.
- Those are pages 100 to 120, so the last page is 120.
Answer: 120 pages
Try it yourself
1.You write the numbers from 1 to 60. How many times do you write the digit 5?
Show the answer
16
Ones place: 5, 15, 25, 35, 45, 55 (6 times). Tens place: 50 to 59 (10 times). 6 + 10 = 16.
2.You write the numbers from 1 to 100. How many times do you write the digit 7?
Show the answer
20
10 times in the ones place (7, 17, ..., 97) and 10 times in the tens place (70 to 79).
3.You write the numbers from 1 to 100. How many times do you write the digit 0?
Show the answer
11
Nine times from 10 to 90, and twice in 100: 9 + 2 = 11.
4.You write all the numbers from 1 to 30. How many digits do you write in total?
Show the answer
51
1 to 9 give 9 digits. 10 to 30 are 30 − 10 + 1 = 21 numbers with 2 digits each: 42. 9 + 42 = 51.
5.You write all the numbers from 1 to 200. How many digits do you write in total?
Show the answer
492
9 digits for 1 to 9, 180 for 10 to 99, and 100 to 200 are 101 numbers with 3 digits: 303. 9 + 180 + 303 = 492.
Ready to test yourself?
Play Logic: 20 seconds per question, and it gets harder as you go.