Utinzo

Permutation & Combination Calculator

Calculate nPr (permutations) and nCr (combinations) with step-by-step factorial expansion. Supports n and r up to 20.

Did this tool work for you?

How to use this calculator

nPr = n! / (n−r)!; nCr = n! / (r!(n−r)!)

Permutations count ordered arrangements; combinations count unordered selections. nCr = nPr / r! because each combination corresponds to r! permutations.

  1. 1

    Enter n — the total number of items available.

  2. 2

    Enter r — the number of items to choose.

  3. 3

    Both nPr (ordered arrangements) and nCr (unordered selections) are calculated with factorial steps shown.

  4. 4

    n must be at most 20 to avoid integer overflow.

Frequently asked questions

What is the difference between nPr and nCr?

nPr counts ordered arrangements and nCr counts unordered selections of r items from n different ones. P(10,3) = 720 because ABC and CBA are different orders; C(10,3) = 120 because they are one group. Each group of r items can be ordered in r! ways, so nPr = nCr × r!, which is what the last result row shows.

Why does the calculator stop at n = 20?

The calculation uses ordinary floating-point numbers, and factorials grow quickly. 20! = 2,432,902,008,176,640,000 is the largest the tool displays; above 20 it returns “n must be ≤ 20 (to avoid overflow)”. Real-world cases like a 52-card deck or a 6-from-49 lottery are therefore out of range here.

What happens when r equals 0 or equals n?

Both are valid. Choosing zero items has exactly one outcome, so P(5,0) = 1 and C(5,0) = 1, using 0! = 1. Choosing all n items gives C(n,n) = 1 and P(n,n) = n!, for example P(8,8) = 40,320 and C(8,8) = 1.

What inputs produce an error?

Negative numbers (“n and r must be non-negative”), r greater than n (“r cannot exceed n”), n above 20, and non-integers such as 5.5 (“n and r must be whole numbers”). Blank fields are read as 0.

Does it handle repeated items or repetition allowed?

No. It assumes every item is distinct and each is used at most once. Arrangements with repetition (n^r), multiset permutations with identical items and combinations with repetition need different formulas.

Why do the results have commas?

Numbers are formatted with the browser’s locale, so separators may show as periods or spaces instead of commas on devices set to other regions. The underlying values are the same.

Are nCr values symmetric?

Yes, C(n, r) = C(n, n − r). Choosing which 3 of 10 to include is the same as choosing which 7 to leave out: C(10,3) = C(10,7) = 120. The permutations differ though: P(10,3) = 720 but P(10,7) = 604,800.

Does it show the working?

Yes. It lists the factorials n!, r! and (n−r)!, the substituted formula for each of nPr and nCr, and the ratio nPr ÷ nCr. It does not simplify the fractions step by step or show a cancelled form.

About permutation & combination calculator

Permutation and combination calculator — nPr and nCr

Order matters, or it does not

Permutations are arrangements where order counts: nPr = n! ÷ (n − r)!. Combinations are selections where order is irrelevant: nCr = n! ÷ (r!(n − r)!). Awarding gold, silver and bronze to three of ten runners is a permutation; picking a three-person committee from ten people is a combination. The calculator returns both for the same n and r, with the factorials written out.

Worked examples

For each pair of n and r, P(n,r) counts ordered selections and C(n,r) counts unordered ones, so permutations are always r! times larger than the matching combination. These pairs were run through the calculator to give the exact figures.

nPr and nCr for several inputs
n, rnPrnCrRatio nPr ÷ nCr
10, 37201206
10, 45,04021024
15, 32,7304556
10, 7604,8001205,040
20, 10670,442,572,800184,7563,628,800
8, 840,320140,320

Podiums and committees

With 10 runners, the number of ways to fill first, second and third place is P(10,3) = 720. Ignoring order and simply choosing three finalists gives C(10,3) = 120, and 720 ÷ 120 = 6 is exactly 3!, the number of ways to order any chosen trio. In the same way, picking 4 from 10 gives 210 groups but 5,040 ordered lineups, a ratio of 4! = 24.

Symmetry and the edges of the range

Since C(n, r) = C(n, n − r), the 10, 7 row shows the same combination count as 10, 3 (120) while its permutation count is 604,800. At the top end, 20 items arranged in full give P(20,20) = 2,432,902,008,176,640,000, which is the biggest figure the tool accepts. The smallest edge is r = 0, where both counts are 1.

Where the tool stops

Whole numbers only, n at most 20, r no larger than n, and every item must be distinct. There is no repetition mode and no probability conversion; divide a favourable count by the total count yourself. Use big-number software for larger n, such as a standard deck of 52 cards or a 49-ball lottery draw. When n is small enough to enumerate, you can sanity-check a result by listing the outcomes by hand, for instance all arrangements of three letters. Always confirm whether your problem treats order as meaningful before reading either column, since picking the wrong one is the most common mistake in counting problems.

Permutation & Combination Calculator – Utinzo

Learn more from an authoritative source:

Wikipedia
Related tools

Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →