# Calculating number of values 7 digit number can form

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.

-
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

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).