100+ free calculators - no signup, no ads | 💰 Financial ❤️ Health & Fitness 📐 Math 🔧 Other
🇺🇸 USD | About Contact

Permutation and Combination Calculator

nPr and nCr · With repetition · Letter arrangements · Lottery odds

nPr = n! ÷ (n − r)!

🔢 Enter n and r to count permutations and combinations with full steps.

What Are Permutations and Combinations?

Permutations and combinations count the ways to choose r items from a set of n. In a permutation the order matters, so A then B is different from B then A. In a combination the order does not matter, so {A, B} is one selection no matter how it was picked.

Take the four letters A, B, C, D and choose two. There are 12 ordered pairs (AB, BA, AC, CA, and so on) but only 6 unordered pairs. Each pair of two can be ordered in 2! = 2 ways, which is why 12 ÷ 2 = 6. This relation holds in general: nCr = nPr ÷ r!.

The calculator returns exact whole numbers for n and r up to 1,000, so values with hundreds of digits are still correct, not rounded.

How to Use the Permutation and Combination Calculator

  1. nPr / nCr: enter the total items n and the number chosen r, then choose whether order matters and whether items can repeat. The hero shows your case, the chips show the other three, and the table compares all four.
  2. Arrange letters: type a word such as MISSISSIPPI or a string such as AAABBC. The calculator counts the distinct orderings, removing duplicates caused by repeated characters.
  3. Lottery odds: enter the size of the number pool, how many numbers are drawn, the number of matches you care about, and a bonus pool size if the game has one. You get the jackpot odds and the chance of each number of matches.

Understanding the Result

The result is a count of distinct outcomes, so it is always a whole number. Its reciprocal is the chance of one particular outcome when every outcome is equally likely: with 120 possible committees, a specific committee picked at random has a 1 in 120 chance.

Comparing the four cases shows how much each rule matters. For n = 10 and r = 3, allowing repeats raises the ordered count from 720 to 1,000, and ignoring order cuts 720 to 120. Typical uses include seating plans and race finishes (permutations), teams and card hands (combinations), passwords and PINs (ordered with repeats), and orders from a menu (unordered with repeats). Values beyond 15 digits are shown in scientific notation.

Permutation and Combination Formulas

nPr = n! ÷ (n − r)! 10P3 = 10! ÷ 7! = 10 × 9 × 8 = 720
nCr = n! ÷ (r! × (n − r)!) 10C3 = 720 ÷ 3! = 720 ÷ 6 = 120
With repetition, ordered: nʳ 4 digit PIN: 10⁴ = 10,000
With repetition, unordered: C(n + r − 1, r) 3 scoops of 5 flavors: C(7, 3) = 35
Circular: n people around a table = (n − 1)! 6 people: 5! = 120

Which Formula Should You Use?

SituationFormulaExample
Order matters, no repeatsnPrGold, silver, bronze from 8 runners: 336
Order ignored, no repeatsnCrCommittee of 4 from 12: 495
Order matters, repeatsnʳ4 digit PIN: 10,000
Order ignored, repeatsC(n + r − 1, r)8 doughnuts, 5 kinds: 495
All n in a rown!Shuffle 5 books: 120
Repeated lettersn! ÷ Π(nᵢ!)MISSISSIPPI: 34,650
Any subset2ⁿToppings from 4: 16

How to Calculate Permutations and Combinations Manually

  1. Decide if order matters. Ranks, positions, passwords, and seating are ordered. Teams, hands of cards, and pizza toppings are not.
  2. Decide if items can repeat. A PIN can reuse digits; a race cannot give two medals to one runner.
  3. Permutation: multiply r descending factors starting at n. For 10P3 that is 10 × 9 × 8 = 720.
  4. Combination: divide the permutation by r!. For 10C3 that is 720 ÷ (3 × 2 × 1) = 120.

Cancelling first keeps the numbers small. 52C5, the number of five card poker hands, is (52 × 51 × 50 × 49 × 48) ÷ 120 = 311,875,200 ÷ 120 = 2,598,960. Using the symmetry nCr = nC(n − r) also helps: 100C98 equals 100C2 = 100 × 99 ÷ 2 = 4,950.

ℹ️
Why is 0! = 1? There is exactly one way to arrange nothing, and the value keeps the formulas consistent: nPn = n! ÷ 0! = n! and nC0 = 1.

Combinations With Repetition

When you can pick the same item more than once and only the final selection counts, use the stars and bars method. Write a star for each item chosen and a bar between item types. Choosing r items from n types needs r stars and n − 1 bars, so the count is the number of ways to place the bars among n + r − 1 positions: C(n + r − 1, r).

Ordering 8 doughnuts from 5 varieties gives C(12, 8) = 495 possible orders. If order matters as well, as with a code where each position can be any of n symbols, the count is nʳ.

Permutations With Repeated Letters

A word with repeated letters has fewer distinct arrangements than n!, because swapping identical letters changes nothing. Divide n! by the factorial of each letter count.

MISSISSIPPI has 11 letters with I × 4, S × 4, P × 2, and M × 1: 11! ÷ (4! × 4! × 2! × 1!) = 39,916,800 ÷ 1,152 = 34,650. BANANA gives 6! ÷ (3! × 2! × 1!) = 720 ÷ 12 = 60.

Lottery and Card Odds With Combinations

Lottery tickets are combinations because the order of the drawn numbers does not matter. A game drawing 6 of 49 numbers has C(49, 6) = 13,983,816 possible tickets. If a separate bonus ball is drawn from its own pool, multiply by that pool size: drawing 5 of 69 plus 1 of 26 gives 11,238,513 × 26 = 292,201,338 combinations.

To match exactly j numbers, choose j of the k winning numbers and the rest from the N − k losing ones. For 3 matches in a 6 of 49 game, the ways are C(6, 3) × C(43, 3) = 20 × 12,341 = 246,820, so the probability is 246,820 ÷ 13,983,816 = 0.01765, about 1 in 56.7. The same method gives the chance of being dealt a specific type of card hand.

Factorial and Combination Reference Table

nn!nC2nC32ⁿ subsets
01001
36318
4246416
5120101032
6720152064
75,0402135128
840,3202856256
9362,8803684512
103,628,800451201,024
12479,001,600662204,096

Common Mistakes

  • Using a permutation for a group. Picking 3 friends for a trip is 10C3 = 120, not 720. Ask whether swapping two chosen items gives a new outcome.
  • Calling a lock a combination lock. A lock code depends on order and allows repeats, so a 3 dial lock with digits 0 to 9 has 10³ = 1,000 codes.
  • Forgetting repeated letters. BOOK has 4! ÷ 2! = 12 arrangements, not 24.
  • Choosing r larger than n without repetition. You cannot pick 5 different items from 4, so the count is 0.
  • Computing huge factorials on a basic calculator. 70! already exceeds 10¹⁰⁰. Cancel terms first or use exact arithmetic, as this calculator does.
⚠️
Counting formulas assume every item is distinct and every outcome is equally likely. Odds from this page describe a fair draw; they do not predict results for any individual ticket.

Frequently Asked Questions

What is the difference between a permutation and a combination?
Order matters in a permutation and does not in a combination. Three officers from 10 people is 10P3 = 720; a committee of three is 10C3 = 120.
How do you calculate nPr and nCr?
nPr = n! ÷ (n − r)! and nCr = nPr ÷ r!. For n = 8 and r = 3, nPr = 8 × 7 × 6 = 336 and nCr = 336 ÷ 6 = 56.
How do you calculate combinations with repetition?
Use C(n + r − 1, r). Three scoops from five flavors with repeats allowed gives C(7, 3) = 35.
How many ways can you arrange the letters of a word with repeated letters?
Divide n! by the factorial of each letter count. MISSISSIPPI gives 11! ÷ (4! × 4! × 2!) = 34,650.
How do you calculate lottery odds using combinations?
Count the tickets with C(N, k). A 6 of 49 game has 13,983,816, so one ticket wins the jackpot with probability 1 in 13,983,816.

Sources & References

  • NIST. Digital Library of Mathematical Functions, §26.3 Binomial Coefficients dlmf.nist.gov
  • NIST. Digital Library of Mathematical Functions, §26.4 Multinomial Coefficients dlmf.nist.gov
  • OpenStax. College Algebra 2e, 9.5 Counting Principles openstax.org
  • Joy Morris, University of Lethbridge. Combinatorics, 5.1 Unlimited Repetition opentext.uleth.ca

Results are for educational use. Odds assume a fair, random draw. Methodology reviewed: 2026.