NewA place value chart for any number, with decimals and the Indian system. Try it free Need help? support@printsheetlab.com

Browse all topics

Permutation and Combination Calculator With Steps (nPr and nCr)

Find nPr and nCr for any n and r, with or without repetition, and see the formula and every step. Includes a guide to choosing permutation or combination.

This permutation and combination calculator finds how many ways you can arrange or choose r items from n. Type n and r, say whether order matters and whether items can repeat, and it returns nPr or nCr instantly, with the formula and every step shown. It stays exact for very large numbers.

The permutation and combination calculator covers all four cases students meet in school: permutations and combinations, each with and without repetition. Below the permutation and combination calculator you will find the formulas, a guide to deciding which one you need, lottery and password examples, a reference table and Pascal’s triangle.

Quick answer: nPr = n! ÷ (n − r)! counts ordered arrangements and nCr = n! ÷ (r! × (n − r)!) counts unordered selections. For n = 10 and r = 3, 10P3 = 10 × 9 × 8 = 720 and 10C3 = 720 ÷ 6 = 120. If order matters, use a permutation; if only the group matters, use a combination.

Chart for the permutation and combination calculator: nPr, nCr, n^r and C(n+r-1, r)
The four cases: order matters or not, repetition allowed or not, with the formula and an example for each.

How to use this permutation and combination calculator

The permutation and combination calculator updates as you type, so there is no Calculate button. Follow these four steps:

  1. Type n, the total number of items you choose from, in the first box. Use the quick buttons for common values such as 26 letters or 52 cards.
  2. Type r, the number of items you pick or arrange.
  3. Choose Yes: permutation if the order matters, or No: combination if only the group matters.
  4. Choose No repetition if each item can be used once, or Repetition allowed if an item can come up again, as in a PIN code.
Input or output What it means Limits
n Total items to choose from Whole number, 0 to 5,000
r Items chosen or arranged Whole number, 0 to 5,000; without repetition r cannot exceed n
Order matters? Yes gives a permutation, no gives a combination Two buttons
Repetition Whether the same item may be used again Two buttons
Result The count, four related values and the working Exact integers

This nPr and nCr calculator also shows all four results side by side, so you can see how much repetition or ordering changes the answer. Tap Copy result to paste the answer, or Copy link to share the setup.

Permutation and combination formula: how it works

The permutation and combination formula starts with the factorial. The factorial of n, written n!, is the product of every whole number from n down to 1, so 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition 0! = 1.

Case Formula Example with n = 10, r = 3
Permutation (order matters, no repeats) nPr = n! ÷ (n − r)! 10! ÷ 7! = 720
Combination (order does not matter, no repeats) nCr = n! ÷ (r! × (n − r)!) 720 ÷ 6 = 120
Permutation with repetition n^r 10 × 10 × 10 = 1,000
Combination with repetition C(n + r − 1, r) C(12, 3) = 220

Worked example 1: a podium with 8 runners

Eight runners compete and the gold, silver and bronze medals go to different runners. Order matters, so use nPr with n = 8 and r = 3. The permutation and combination calculator shows these steps: 8P3 = 8! ÷ (8 − 3)! = 8! ÷ 5! = 8 × 7 × 6 = 336 different podiums.

Worked example 2: a team of 3 from 10 people

Choosing 3 of 10 students for a committee does not depend on order, so use nCr with n = 10 and r = 3. First count the ordered picks, 10P3 = 720. Each committee of 3 appears 3! = 6 times in that list, so 10C3 = 720 ÷ 6 = 120. Type 10 and 3 into the permutation and combination calculator with steps to see the same working.

A useful shortcut is symmetry: nCr = nC(n − r). Picking 3 people to join a team is the same as picking the 7 to leave out, so 10C3 = 10C7 = 120. The permutation and combination calculator mentions the shortcut whenever it helps.

Difference between permutation and combination

The difference between permutation and combination is whether order matters. A permutation counts ordered arrangements, so ABC and CBA are different. A combination counts groups, so ABC and CBA are the same group. Every combination of r items can be arranged in r! ways, which is why nPr = nCr × r!.

Ask yourself Permutation (nPr) Combination (nCr)
Does the order change the outcome? Yes No
Typical wording arrange, rank, order, schedule, lock code, race finish choose, select, pick a team, committee, hand of cards, lottery ticket
Which is bigger for the same n and r? Always bigger (or equal) Smaller by a factor of r!
Example, n = 5, r = 2 5P2 = 20 5C2 = 10

Which one do I use? A quick decision guide

  • Swap two chosen items. Is it a new result? If yes, it is a permutation. If no, it is a combination.
  • Words like first, second and third, president and treasurer, or arrangement point to permutations.
  • Words like a group, a hand, a committee or a sample point to combinations.
  • Can the same item be picked twice? A PIN or a license plate can repeat digits, so use repetition. A team of different people cannot, so use no repetition.

Permutations with repetition and combinations with repetition

When an item can be chosen again, the formulas change. Permutations with repetition have n choices for each of the r positions, so the count is n^r. A 4-digit PIN has 10 choices per position: 10^4 = 10,000 PINs. A lowercase password with 8 letters has 26^8 = 208,827,064,576 possibilities.

Combinations with repetition count groups where an item can appear more than once and the order does not matter. The formula is C(n + r − 1, r), often called stars and bars. If a shop has 5 flavors and you buy 3 scoops, repeats allowed, there are C(5 + 3 − 1, 3) = C(7, 3) = 35 different combinations of scoops.

Setting n r Count Formula used
4-digit PIN (0 to 9) 10 4 10,000 n^r
Lowercase password, 8 letters 26 8 208,827,064,576 n^r
Upper, lower, digits, 8 characters 62 8 218,340,105,584,896 n^r
3 scoops from 5 flavors, repeats allowed 5 3 35 C(n + r − 1, r)
5 coins from 4 coin types 4 5 56 C(n + r − 1, r)

Permutation and combination calculator for lottery odds and cards

Combinations explain why lotteries and card games feel so unlikely. A pick-6-from-49 lottery has 49C6 = 13,983,816 possible tickets, so one ticket wins the jackpot with a chance of 1 in 13,983,816. A lottery that draws 5 numbers from 69 and one bonus ball from 26 has 69C5 × 26 = 292,201,338 outcomes.

A poker hand is a combination because the order you receive the cards does not matter. There are 52C5 = 2,598,960 five-card hands, and 52C13 = 635,013,559,600 bridge hands. Type 52 and 5 into the permutation and combination calculator to check.

Real-life question n r Type Answer
Pick 6 numbers from 49 49 6 nCr 13,983,816
Five-card poker hands from 52 cards 52 5 nCr 2,598,960
Order 5 books on a shelf from 5 5 5 nPr 120
Gold, silver, bronze from 8 runners 8 3 nPr 336
Committee of 4 from 12 people 12 4 nCr 495
President, secretary, treasurer from 12 12 3 nPr 1,320
Ways to shuffle a 52-card deck 52 52 nPr 8.065818 × 10⁶⁷
Choose 2 toppings from 9 9 2 nCr 36

nPr and nCr reference table for n up to 8

This lookup table, a mini permutation and combination calculator you can read at a glance, gives nCr for every n and r from 0 to 8. Use it to check your own work or read an answer without a calculator. The nPr value is nCr × r!, so 6C3 = 20 gives 6P3 = 20 × 6 = 120.

n r 0 1 2 3 4 5 6 7 8
0 1 – – – – – – – –
1 1 1 – – – – – – –
2 1 2 1 – – – – – –
3 1 3 3 1 – – – – –
4 1 4 6 4 1 – – – –
5 1 5 10 10 5 1 – – –
6 1 6 15 20 15 6 1 – –
7 1 7 21 35 35 21 7 1 –
8 1 8 28 56 70 56 28 8 1

Pascal’s triangle and the combination formula

Pascal’s triangle lists every nCr value. Row n holds nC0, nC1, up to nCn, and each number is the sum of the two above it. That is the identity nCr = (n−1)C(r−1) + (n−1)Cr. The table above is the same triangle drawn as a grid.

Row Pascal’s triangle (row n = nCr for r = 0 to n)
Row 0 1
Row 1 1   1
Row 2 1   2   1
Row 3 1   3   3   1
Row 4 1   4   6   4   1
Row 5 1   5   10   10   5   1
Pascal triangle chart for the permutation and combination calculator showing nCr values
The first rows of the Pascal triangle, with 5C2 = 10 highlighted.

Three facts follow. Each row is symmetric, because nCr = nC(n − r). The sum of row n is 2^n, which counts every possible subset of n items: row 5 adds to 1 + 5 + 10 + 10 + 5 + 1 = 32 = 2^5. And the second number in each row is n, because there are n ways to pick one item.

Factorials and very large numbers

Factorials grow faster than almost anything else in school math. 20! already has 19 digits and 52! has 68. The permutation and combination calculator uses exact big-integer arithmetic, so it does not round results the way a calculator or spreadsheet that works in floating point does.

Chart comparing nPr and nCr growth in the permutation and combination calculator
How quickly nPr and nCr grow as r increases for n = 30.
n n! Digits
0 1 1
1 1 1
5 120 3
10 3,628,800 7
15 1,307,674,368,000 13
20 2,432,902,008,176,640,000 19
25 1.551121 × 1025 26
30 2.652529 × 1032 33
52 8.065818 × 1067 68
70 1.197857 × 10100 101
100 9.332622 × 10157 158

When the answer has more than 24 digits, the permutation and combination calculator shows it in scientific notation and lists the first digits, and when it has up to 120 digits it also prints every digit. For writing very large and very small numbers, see the scientific notation calculator.

How to calculate permutations and combinations by hand

To calculate permutations and combinations without a calculator, never expand the full factorials. Cancel first. For 10P3, write only the first 3 factors of 10!, which is 10 × 9 × 8 = 720. For 10C3, divide that by 3! = 6 to get 120. For 49C6, compute (49 × 48 × 47 × 46 × 45 × 44) ÷ (6 × 5 × 4 × 3 × 2 × 1) = 13,983,816.

  1. Decide whether order matters. That tells you permutation or combination.
  2. Write the product of r descending factors starting at n. That is nPr.
  3. For a combination, divide by r! to remove the repeated orderings.
  4. If r is bigger than half of n, use nC(n − r) to shorten the work.
  5. Check with a small case: 4C2 should be 6 because the pairs of A, B, C, D are AB, AC, AD, BC, BD, CD.

Common mistakes with the permutation and combination formula

  • Using a permutation for a group. A committee of 3 from 10 is 120, not 720.
  • Allowing r greater than n without repetition. You cannot pick 5 different items from 3. The permutation and combination calculator returns 0 ways.
  • Mixing up repetition. Passwords and PINs repeat symbols (n^r); a race finish does not (nPr).
  • Counting identical items as different. Arrangements of the letters in a word with repeats need n! divided by the factorial of each repeat count, which this permutation and combination calculator does not do automatically.

Questions people ask about the permutation and combination calculator

Is there a permutation and combination calculator for letters?

Yes: use n = 26 for the alphabet. Arranging 3 different letters from 26 is 26P3 = 15,600, choosing 3 letters as a set is 26C3 = 2,600, and a 3-letter code that may repeat letters is 26^3 = 17,576. For words with repeated letters, divide n! by the factorial of each repeat count.

How do I calculate nPr and nCr in Excel or Google Sheets?

Use PERMUT(n, r) for permutations and COMBIN(n, r) for combinations. For repetition, use PERMUTATIONA(n, r) and COMBINA(n, r). Spreadsheet functions lose accuracy for very large results, so check big values with this exact permutation and combination calculator.

How do I use nPr and nCr on a TI-84 or scientific calculator?

Type n first, open the MATH menu, choose PRB, pick nPr or nCr, then type r. For example, 10 nCr 3 returns 120. Most scientific calculators have dedicated nPr and nCr keys with the same order: n, the function, then r.

What is the permutation and combination calculator online for large n?

This one runs in your browser with exact integers, so n up to 5,000 works instantly and nothing is sent to a server. Use this permutation and combination calculator for homework, exam practice and probability checks, and open the steps when you need to show your work.

Frequently asked questions

10 quick answers

What is the formula for permutations and combinations?

Permutations are nPr = n! ÷ (n − r)! and combinations are nCr = n! ÷ (r! × (n − r)!). With repetition allowed, permutations are n^r and combinations are C(n + r − 1, r).

What is the difference between a permutation and a combination?

In a permutation the order matters, so ABC and CBA count separately. In a combination only the group matters, so they count once. For the same n and r, nPr is r! times larger than nCr.

How do I know whether to use nPr or nCr?

Ask whether swapping two chosen items gives a different outcome. If yes, use nPr. If no, use nCr. Rankings, codes and schedules are permutations; teams, hands and samples are combinations.

What is 10P3 and 10C3?

10P3 is 720, from 10 × 9 × 8. 10C3 is 120, because 720 ÷ 3! = 720 ÷ 6 = 120.

What is 0 factorial?

0! equals 1 by definition. It makes the formulas work: nC0 = n! ÷ (0! × n!) = 1, because there is exactly one way to choose nothing.

Can r be bigger than n?

Without repetition no: you cannot choose more different items than you have, so the answer is 0. With repetition r may be any size, for example a 6-digit PIN uses n = 10 and r = 6.

What are the odds of winning a 6-from-49 lottery?

A single ticket matches all six numbers with probability 1 in 49C6, which is 1 in 13,983,816.

How many 5-card poker hands are there?

There are 52C5 = 2,598,960 different five-card hands from a standard 52-card deck.

How many ways can I arrange n different items?

n! ways, which is nPn. Five books give 5! = 120 arrangements and 10 books give 3,628,800.

How big a number can this calculator handle?

n and r can each be up to 5,000. Results are exact integers; past 24 digits they are shown in scientific notation with the leading digits and digit count.

Sources and further reading

Last updated: October 2026.