Permutations Calculator

Permutations Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

P(n,r)=n!(n−r)!P(n,r) = \frac{\text{n}!}{\left(\text{n} - \text{r}\right)!}
Usage stats

Advertisement

Results

Number of permutations (nPr)
311,875,200
Total number of items (n) 52
Number of items to arrange (r) 5

Report an error on this page

What This Permutations Calculator Does

This calculator works out the number of permutations — written as nPr or \(P(n, r)\) — for a given set of items. A permutation counts how many ordered arrangements you can make when you select r items from a total of n items. Order matters here, so picking A then B is counted separately from B then A. You only need to supply two whole numbers and the result appears instantly.

The Two Inputs

  • Total number of items (n): the size of the full set you are choosing from.
  • Number of items to arrange (r): how many of those items you select and place in order.

Both values must be non-negative whole numbers, and n must be greater than or equal to r. The calculator accepts large values — anything up to 100,000 — and uses arbitrary-precision arithmetic (BigInteger) so even huge results are computed exactly without rounding.

The Formula

The calculator applies the standard permutation formula:

$$P(n, r) = \frac{\text{n}!}{\left(\text{n} - \text{r}\right)!}$$

Here "!" means factorial — the product of every whole number from 1 up to that value. The tool computes \(n!\) and \((n - r)!\) separately, then divides one by the other to give the exact number of ordered arrangements.

Advertisement
Diagram showing n items with r ordered slots being filled in sequence
Permutations fill r ordered positions chosen from n distinct items.

Worked Example

Suppose you want to know how many ways 3 runners can finish first, second and third in a race of 5 athletes. Enter n = 5 and r = 3:

  • \(5! = 120\)
  • \((5 - 3)! = 2! = 2\)
  • $$P(5, 3) = \frac{120}{2} = \mathbf{60}$$

So there are 60 possible ordered finishes for the top three places.

Tree diagram showing ordered arrangements of choosing 2 from 3 items
A tree of choices: 3 options for the first position, then 2 for the second, giving 6 ordered arrangements.

Permutation Values for Common n and r

The number of ordered arrangements of r items chosen from n distinct items is \(P(n,r)=\frac{n!}{(n-r)!}\). The table shows common values.

n r P(n, r) Product form
5 2 20 5 × 4
5 3 60 5 × 4 × 3
5 5 120 5 × 4 × 3 × 2 × 1
10 3 720 10 × 9 × 8
10 5 30,240 10 × 9 × 8 × 7 × 6
52 5 311,875,200 52 × 51 × 50 × 49 × 48
26 26 26! = 403,291,461,126,605,635,584,000,000 26 × 25 × … × 1

Special cases:

  • \(P(n,0)=1\): there is exactly one way to arrange nothing.
  • \(P(n,1)=n\): each single item is its own arrangement.
  • \(P(n,n)=n!\): all n items are arranged in every possible order.

More Permutation Examples

Because the factors of \((n-r)!\) cancel, \(P(n,r)\) equals the product of the r numbers \(n\times(n-1)\times\dots\times(n-r+1)\).

Example 1: Seating 4 of 8 people in a row

Order matters, so n = 8 and r = 4:

$$P(8,4)=\frac{8!}{(8-4)!}=\frac{8!}{4!}=8\times7\times6\times5$$

8 × 7 = 56, 56 × 6 = 336, 336 × 5 = 1,680 possible seatings.

Example 2: Gold, silver and bronze among 10 contestants

Each medal goes to a different person and the medals are ranked, so n = 10 and r = 3:

$$P(10,3)=\frac{10!}{7!}=10\times9\times8=720$$

There are 720 possible podiums.

Example 3: Drawing 5 ordered cards from a 52-card deck

With n = 52 and r = 5:

$$P(52,5)=\frac{52!}{47!}=52\times51\times50\times49\times48$$

52 × 51 = 2,652; × 50 = 132,600; × 49 = 6,497,400; × 48 = 311,875,200 ordered five-card sequences.

Advertisement

Key Terms in Permutations

Permutation
An arrangement of items in which the order matters. ABC and CBA count as different permutations.
Factorial
The product of all positive integers up to a number: \(n!=n\times(n-1)\times\dots\times1\). By definition, \(0!=1\).
n
The total number of distinct items available to choose from.
r
The number of items chosen and arranged, with \(0\le r\le n\).
Ordered arrangement
A selection in which the position of each item is part of the outcome, such as a ranking, a seating order or a PIN made of different digits.
Distinct items
Items that can be told apart, with no repeats. The formula \(P(n,r)\) assumes each item can be used at most once.
Combination
A selection in which order does not matter. It is related to permutations by \(nCr=\frac{nPr}{r!}\). For example, \(5C2=\frac{20}{2}=10\).

Note: Permutations with repetition, where items can be reused and the count is \(n^r\), are not computed by this tool. It handles only arrangements without repetition.

Frequently Asked Questions

How is a permutation different from a combination?
A permutation counts ordered arrangements, while a combination ignores order. This calculator uses the permutation formula, so different orderings of the same items are counted as distinct outcomes.

What happens if r is larger than n?
That is not allowed. The calculator returns an error because you cannot arrange more items than you have. You must keep \(n \geq r\).

Can I use 0 for r?
Yes. \(P(n, 0)\) always equals 1, because there is exactly one way to arrange nothing — the empty arrangement.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators