Skip to content

Total of all digits from one to a million

Question

Add up every digit of every integer from 11 to 1,000,0001{,}000{,}000 inclusive. (For instance, 4646 contributes 4+6=104+6=10.) What is the total?

Short answer

27,000,00127{,}000{,}001. Pad 00 to 999999999999 to six digits: each position runs through 00–99 equally often, so each digit appears 100,000100{,}000 times per position, giving 6×45×100,000=27,000,0006\times45\times100{,}000=27{,}000{,}000. Adding 11 for the number 1,000,0001{,}000{,}000 gives the total.

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question