The number of integers from 1000 through 9999 that have distinct digits is 4,536. This is a classic counting problem because it combines a simple multiplication rule with one important restriction: a four-digit integer cannot begin with zero. Once that restriction is handled correctly, the count follows naturally Surprisingly effective..
Honestly, this part trips people up more than it should.
Understanding the Range and the Condition
The integers from 1000 through 9999 are exactly the four-digit positive integers. On top of that, there are 9,000 of them in total, from 1000 to 9999 inclusive. The condition “distinct digits” means that no digit may repeat within the same number.
- 1023 has distinct digits: 1, 0, 2, and 3 are all different.
- 1123 does not have distinct digits because the digit 1 appears twice.
- 1000 does not have distinct digits because 0 appears three times.
- 9876 has distinct digits.
So the task is to count how many four-digit numbers can be formed using four different digits, with the extra rule that the first digit cannot be 0 Simple, but easy to overlook. Practical, not theoretical..
The Main Counting Method
We can build a valid four-digit number one digit at a time. This is often called the multiplication principle: if one choice can be made in (a) ways, another in (b) ways, and so on, then the total number of combined choices is the product.
Step 1: Choose the thousands digit
The first digit, or thousands digit, cannot be 0 because the number must be a four-digit integer. It can be any digit from 1 through 9. That gives:
[ 9 \text{ choices} ]
Step 2: Choose the hundreds digit
The second digit may be 0, but it cannot equal the first digit. Since there are 10 possible digits in total and one has already been used, there are:
[ 10 - 1 = 9 \text{ choices} ]
Step 3: Choose the tens digit
The third digit cannot equal either of the first two digits. Two digits have been used, so there are:
[ 10 - 2 = 8 \text{ choices} ]
Step 4: Choose the units digit
The fourth digit cannot equal any of the first three digits. Three digits have been used, so there are:
[ 10 - 3 = 7 \text{ choices} ]
Multiplying these choices gives:
[ 9 \times 9 \times 8 \times 7 = 4{,}536 ]
Because of this, there are 4,536 four-digit integers with distinct digits in the range from 1000 through 9999.
Why the First Digit Is Special
A common mistake is to count all four-digit strings with distinct digits as if leading zeros were allowed. If we ignored the “four-digit integer” requirement and allowed strings such as 0123, we would have:
[ 10 \times 9 \times 8 \times 7 = 5{,}040 ]
But strings beginning with 0 are not four-digit integers. That's why they are really three-digit numbers or less. To correct the count, we must subtract the invalid cases that begin with 0 Simple, but easy to overlook..
If the first digit is fixed as 0, then the remaining three digits must be chosen from the other nine digits without repetition. The number of such strings is:
[ 9 \times 8 \times 7 = 504 ]
So the valid count is:
[ 5{,}040 - 504 = 4{,}536 ]
This confirms the earlier result. The subtraction method is useful because it shows exactly where the leading-zero issue enters the problem.
An Alternative View Using Permutations
Another way to think about the problem is to choose four different digits from the ten available digits and then arrange them. The number of ordered arrangements of four distinct digits chosen from ten is:
[ {}_{10}P_4 = 10 \times 9 \times 8 \times 7 = 5{,}040 ]
That said, this includes arrangements where the first digit is 0. For those arrangements, the first position is fixed as 0, and the remaining three positions are filled with three distinct digits chosen from the remaining nine digits:
[ {}_{9}P_3 = 9 \times 8 \times 7 = 504 ]
Subtracting gives:
[ 5{,}040 - 504 = 4{,}536 ]
This is the same answer, just viewed through a permutation lens. Both methods are valid, and both highlight the same key idea: the thousands digit has fewer choices because zero is not allowed there.
Checking the Result with Probability
It can be helpful to compare the answer with the total number of four-digit integers. There are 9,000 integers from 1000 through 9999. The fraction with distinct digits is:
[ \frac{4{,}536}{9{,}000} = 0.504 ]
So about 50.4% of all four-digit integers have distinct digits. This makes intuitive sense: the first digit
has nine equally likely options (1–9), and each subsequent digit has a slightly reduced pool because it cannot repeat a predecessor. The probability that the second digit differs from the first is 9/10; given that, the probability the third differs from both is 8/10; and given those, the probability the fourth differs from all three is 7/10. Multiplying these conditional probabilities yields:
[ \frac{9}{10} \times \frac{8}{10} \times \frac{7}{10} = \frac{504}{1000} = 0.504 ]
Multiplying this probability by the 9,000 total four-digit integers returns our count of 4,536. This probabilistic check not only verifies the arithmetic but also provides a quick mental estimate for similar problems Simple as that..
Summary
We have explored three complementary approaches to the same question:
-
Direct Construction (Multiplication Principle): Build the number left-to-right, respecting the leading-zero restriction immediately.
(9 \times 9 \times 8 \times 7 = 4{,}536) -
Total Minus Invalid (Complementary Counting): Count all permutations of four distinct digits from ten, then subtract those starting with zero.
({}{10}P_4 - {}{9}P_3 = 5{,}040 - 504 = 4{,}536) -
Probabilistic Reasoning: Compute the fraction of valid numbers among all 9,000 four-digit integers.
(9{,}000 \times \frac{9}{10} \times \frac{8}{10} \times \frac{7}{10} = 4{,}536)
All three paths converge on 4,536. The consistency across methods is a strong signal that the answer is correct and that the underlying combinatorial structure has been fully captured. Whether you prefer to construct, subtract, or estimate, the key takeaway remains the same: **handle the most restrictive condition first—in this case, the thousands digit—and the rest follows naturally And that's really what it comes down to. Worth knowing..