Permutation & Combination Calculator
Exact counts with the formula and steps — and the actual arrangements for small cases.
Count
This is the last answer worked out. Fix the input above to update it.
All the digits
Steps
The arrangements
Pascal’s triangle
Each number is the sum of the two above it; row n lists nC0, nC1, … nCn.
About the Permutation & Combination Calculator
Count the ways to arrange or choose things, with the formula, the numbers put into it and the cancellation that leads to the answer: permutations nPr and combinations nCr, both also with repetition, circular arrangements (round tables, or necklaces where turning over gives the same one), arrangements of a word with repeated letters such as MISSISSIPPI — with the vowels together, apart or never side by side, and the word’s place in dictionary order — derangements (no item in its own place) and stars and bars (identical items into boxes, with a minimum or maximum per box).
Every answer is an exact whole number, however large: 52C26 has 15 digits and 1000! has 2,568, all of them shown and downloadable. For small cases the calculator also lists the actual arrangements, and Pascal’s triangle highlights nCr and the two numbers above it that add up to it.
How to use it
- Choose what to count: nPr, nCr, with repetition, multisets, circular, a word, derangements or stars and bars. The line under the choice says when each applies.
- Enter n and r (or the word, the number of boxes and limits). Item names are optional and only used for the list.
- Read the count, the steps and — for small cases — the list of every arrangement.
- Copy the number, or download all the digits or the list as a text file.
Examples
1st, 2nd and 3rd prize among 10 people — 10P3
10! ÷ 7! = 10 × 9 × 8 = 720
Choose 3 of 10 — 10C3
(10 × 9 × 8) ÷ (3 × 2 × 1) = 720 ÷ 6 = 120
MISSISSIPPI: M×1, I×4, S×4, P×2
11! ÷ (1! × 4! × 4! × 2!) = 39,916,800 ÷ 1,152 = 34,650
INDEPENDENCE with all the vowels (I, E, E, E, E) together
7 consonants + 1 block: 8! ÷ (3! × 2!) = 3,360; vowels inside: 5! ÷ 4! = 5 → 16,800 (1,663,200 arrangements in all; 1,646,400 with the vowels not all together)
5 people around a round table
(5 − 1)! = 24 — or 12 for beads on a necklace, which can be turned over
10 identical sweets among 3 children
C(10 + 2, 2) = C(12, 2) = 66 — or C(9, 2) = 36 if every child gets at least one
Common uses
- Homework and competitive-exam practice on permutations and combinations, with the working to compare.
- Counting passwords, PIN codes, number plates or lottery tickets.
- Planning seating, teams, tournaments and schedules.
- Probability: the number of equally likely outcomes behind a chance, such as the 2,598,960 five-card poker hands.
Permutation or combination?
Ask whether swapping two of the chosen items gives something different. If it does — first and second prize, a PIN, seats in a row — order matters and you count permutations. If it does not — a team, a hand of cards, toppings on a pizza — you count combinations, which is the number of permutations divided by the r! orders in which the same r items can be listed: nCr = nPr ÷ r!.
Then ask whether an item can be used more than once. Digits in a PIN can repeat (10⁴ = 10,000 PINs of four digits); people in a team cannot.
The formulas
- Permutations: nPr = n! ÷ (n − r)! — with repetition: nʳ.
- Combinations: nCr = n! ÷ (r! (n − r)!) — with repetition: C(n + r − 1, r).
- Circular: (n − 1)!, or (n − 1)! ÷ 2 when turning the circle over gives the same arrangement; r of n around a circle: nPr ÷ r.
- A word of n letters with repeats n₁, n₂, …: n! ÷ (n₁! × n₂! × …).
- Derangements: !n = n! × (1 − 1/1! + 1/2! − … + (−1)ⁿ/n!), the nearest whole number to n!/e.
- Stars and bars: n identical items into k boxes in C(n + k − 1, k − 1) ways, or C(n − 1, k − 1) with none empty.
nPr, nʳ, nCr and n! ÷ (n₁! × n₂! × …) for repeated letters are the formulas of the NCERT Mathematics textbook for Class 11 (chapter “Permutations and Combinations”); circular arrangements, combinations with repetition, derangements and stars and bars are standard results of combinatorics beyond that chapter. 0! = 1, so nC0 = nCn = 1.
Words, vowels and dictionary order
For “all the vowels together”, glue the vowels into one block, arrange the block with the consonants, and multiply by the arrangements of the vowels inside the block — dividing out repeated letters at both stages. “Not all together” is all the arrangements minus those. For “no two vowels side by side”, arrange the consonants first and choose a gap between them for each vowel. The calculator lists the arrangements of short words, so you can check every one of these counts by hand.
The place of a word in dictionary order counts the arrangements that come before it: MOTHER comes 309th of the 720 arrangements of its letters.
Limitations
- Exact digits are worked out for answers of up to 50,000 digits; larger ones are given as a power of ten.
- Lists of arrangements are made for up to 100,000 of them, and 1,000 are shown on the page; the downloaded file has them all.
- Vowels are A, E, I, O and U (Y counts as a consonant). Words can have up to 5,000 letters; the vowel conditions work for up to 3,000, the place in dictionary order for up to 400, and the arrangements are listed for words of up to 100 letters.
- Stars and bars puts identical items into distinct (labelled) boxes. Identical items into identical boxes is a different problem (integer partitions) and is not covered.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What is the difference between a permutation and a combination?
In a permutation the order matters, in a combination it does not. From 10 people there are 10P3 = 720 ways to give out first, second and third prize, but only 10C3 = 120 ways to pick three winners of the same prize — each group of three can be ordered in 3! = 6 ways, and 720 ÷ 6 = 120.
What is the formula for nCr?
nCr = n! ÷ (r! × (n − r)!). Cancel the larger factorial first: 10C3 = 10! ÷ (3! × 7!) = (10 × 9 × 8) ÷ (3 × 2 × 1) = 120. nCr is also the number in row n, position r of Pascal’s triangle, counting from 0.
How many ways can the letters of MISSISSIPPI be arranged?
34,650. There are 11 letters with I four times, S four times and P twice, so 11! ÷ (4! × 4! × 2!) = 39,916,800 ÷ 1,152 = 34,650. Choose Word to see this for any word, with the arrangements listed for short ones.
Why are circular arrangements (n − 1)! and not n!?
Because turning everyone around the table by one seat gives the same arrangement. Fix one person’s seat and arrange the other n − 1 in a line: (n − 1)!. For a necklace or garland, which can also be turned over, clockwise and anticlockwise orders are the same as well, so divide by 2 again.
Why is 0! equal to 1?
There is exactly one way to arrange nothing, and 0! = 1 is what keeps the formulas working: nC0 = n! ÷ (0! × n!) = 1 way to choose nothing, and nPn = n! ÷ 0! = n! ways to arrange all n items.
What is a derangement?
An order in which no item ends up in its own place — such as letters put in envelopes so that none reaches the right address. With 4 letters there are !4 = 9 such orders out of 4! = 24. As n grows, the share of derangements approaches 1/e ≈ 36.8%.