Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I could not find a term in English, otherwise I would read it somewhere on the internet.

I take a number that can contain min/max 7 digits.

For example a number can be 0000001 or 9999999

I am wondering how can I calculate how many number can I get.

share|cite|improve this question
Well, we can label each number other than zero by itself, so 0000001 is 1, 0000002 is 2, etc. etc. This gives 9,999,999 numbers, and we must add one for zero, which gives 9,999,999+1 = 10,000,000. So there are 10 million numbers. – copper.hat Feb 24 '13 at 0:11
up vote 2 down vote accepted

There are $10$ different digits, and you can use any of them in each of the $7$ positions. Thus, there are $10$ ways to fill the first slot. Each of those $1$-digit numbers can be extended to a $2$-digit number in $10$ different ways, one for each possible second digit, so there are $10\cdot10=10^2$ ways to fill the first two slots. Continuing to reason in this way, we see that there are $10^7$ ways to form a $7$-digit number (allowing leading zeroes).

This is a basic application of the multiplication (or Chinese menu) principle.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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