On this page
"Find the sum of all four-digit numbers that can be formed using 1, 3, 5 and 7 once each." There are 24 such numbers, and listing them under exam pressure invites a slip. The column trick gets the answer in three lines. This post shows why it works and how to adjust it when a zero, repeated digits or repetition enter the question.
Where does this sit in the syllabus?
The JEE (Main) 2026 syllabus lists "the fundamental principle of counting, permutations and combinations; Meaning of P(n, r) and C(n, r). Simple applications." Digit-sum questions are one of those applications. NCERT's Class 11 Permutations and Combinations chapter (2026-27 reprint) counts how many numbers can be formed from given digits, for example how many 4-digit numbers can be made from the digits 1 to 9 without repetition, but it does not ask for their sum. That step is the extra you need for JEE. Check the syllabus for your own exam year.
Why does the column trick work?
Write all the numbers in a column and add them the way you learnt in primary school, place by place. The units column contains each digit some number of times. So do the tens, hundreds and thousands columns, and by symmetry each column has the same digit sum.
If every column adds up to S, the total is S × 1000 + S × 100 + S × 10 + S × 1 = S × 1111. For three-digit numbers it is S × 111.
So the whole problem becomes one question: how many times does each digit appear in one place?
Worked example 1: distinct digits, no zero
Digits 1, 3, 5, 7, each used once, four-digit numbers.
Fix 1 in the units place. The other three digits fill the remaining places in 3! = 6 ways. So each digit appears 6 times in the units place, and likewise in every other place.
Column sum: S = 6 × (1 + 3 + 5 + 7) = 6 × 16 = 96.
Total: 96 × 1111 = 106,656.
Check with the average. There are 4! = 24 numbers. 106,656 ÷ 24 = 4444. The average digit is 16 ÷ 4 = 4, so the average number should be 4444. It is.
The general rule: with n distinct non-zero digits used once each, the sum is (n − 1)! × (sum of digits) × (11…1 with n ones).
Worked example 2: choosing some of the digits
Three-digit numbers from 1, 2, 3, 4, 5 without repetition. There are P(5, 3) = 60 of them.
Fix a digit in the units place. The other two places are filled from the remaining four digits in P(4, 2) = 12 ways. Column sum: 12 × 15 = 180. Total: 180 × 111 = 19,980.
Check: 19,980 ÷ 60 = 333, and the average digit is 15 ÷ 5 = 3.
Worked example 3: when zero is one of the digits
Four-digit numbers from 0, 2, 4, 6, each used once. Zero cannot lead, so only 18 numbers are valid.
The clean method is to count everything and subtract the fakes.
Pretend all 24 arrangements are numbers: 3! × (0 + 2 + 4 + 6) × 1111 = 6 × 12 × 1111 = 79,992.
The fakes start with 0. They are really three-digit numbers formed from 2, 4, 6: 2! × 12 × 111 = 2664.
Answer: 79,992 − 2664 = 77,328.
An arrangement such as 0246 is really 246, a three-digit number, so it has no place in a sum of four-digit numbers. That is why the second step subtracts exactly those arrangements.
Worked example 4: repeated digits
All four-digit numbers formed from 1, 1, 2, 3. There are 4!/2! = 12 distinct numbers. Now digits do not appear equally often, so count them one by one.
1 in the units place: arrange 1, 2, 3 in the other places: 3! = 6 ways.
2 in the units place: arrange 1, 1, 3: 3!/2! = 3 ways.
3 in the units place: arrange 1, 1, 2: 3 ways.
Check: 6 + 3 + 3 = 12. Column sum: 6 × 1 + 3 × 2 + 3 × 3 = 21. Total: 21 × 1111 = 23,331.
The shortcut formula would have failed here, because it assumes every digit appears equally often.
Worked example 5: repetition allowed
All three-digit numbers using the digits 1, 2, 3, with repetition. There are 3³ = 27.
Fix a digit in one place; the other two places have 3 choices each, so 9 ways. Column sum: 9 × 6 = 54. Total: 54 × 111 = 5994. Check: 5994 ÷ 27 = 222, the average digit repeated.
Which mistakes cost the most marks?
Using n! instead of (n − 1)! for how often each digit appears in one place.
Forgetting to remove numbers that start with zero.
Applying the equal-frequency shortcut to repeated digits. Count each digit separately.
Multiplying by 1111 for three-digit numbers. The multiplier has as many ones as there are places.
Skipping the check. The average test takes ten seconds.
A practice routine
Do these as a mixed set, not one type at a time. In a study by Rohrer, Dedrick and Stershic (2015), 126 seventh-grade students practised the same maths problems either blocked by type or interleaved. Interleaved practice gave higher scores on a test 1 day later and a larger advantage at 30 days, with effect sizes of 0.42 and 0.79.
Session 1: Two problems of each type above, each finished with the average check.
Session 2: Mix in two related questions: the number of such numbers divisible by 5, and the sum of only the even numbers.
Session 3: Shrink one problem to three digits and list every number by hand to confirm the method.
If a step in the counting still feels like magic, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. For the counting basics behind this post, read our guide on how to stop double counting in permutations and combinations.
Try this now: find the sum of all four-digit numbers formed from 0, 1, 2, 3 without repetition, then check it with the average.



