Permutation Calculator

P(n, r) — how many ways r items can be arranged from n when order matters.

Your result will appear here

Fill in the fields and press Calculate.

A permutation counts arrangements where "order matters": choosing r items from n and lining them up, the order you place them in makes a different outcome — (A, B) and (B, A) are two distinct arrangements. From race finishes to password possibilities, from titled appointments to letter arrangements, the answer to "how many different orderings" is a permutation.

Enter the number of items (n) and how many to arrange (r), and P(n, r) is calculated instantly.

How is it calculated?

Formula

P(n, r) = n! ÷ (n−r)!. You place r items in order: n choices for the first spot, n−1 for the second, … n−r+1 for the rth — the product of those.

Permutation or combination?

Again the deciding question: does order matter? - If it does → permutation (first-second-third, a password, a seating order). - If it does not → combination (a team, group, selection).

Because orderings are counted, P(n,r) is always greater than or equal to C(n,r) — exactly r! times as large.

Special cases

  • P(n, n) = n! — arranging all items is the factorial itself. Five people arrange in P(5,5) = 5! = 120 ways.
  • P(n, 1) = n — there are n ways to pick and place a single item.
  • P(n, 0) = 1.

Where it is used

  • Ordering/ranking: how many ways the top three can be decided in a race.
  • Passwords/codes: the number of non-repeating digit codes.
  • Arrangements: books on a shelf, people in a line, letter permutations.

For unordered selections use a combination calculator; for the factorial underneath use a factorial calculator.

Worked example

In a race of 10 runners, how many ways can the top 3 (first, second, third) be filled? Order matters — who is first versus second changes the outcome — so it's a permutation: P(10, 3) = 10! ÷ 7! = 10 × 9 × 8 = 720. If instead you chose an unordered group of 3 from those 10, the answer would be C(10,3) = 120; the permutation being exactly 6 times larger (3! = 6) reflects that each group has 6 orderings. Arranging all 5 of a set gives P(5,5) = 5! = 120.

FAQ

How is a permutation calculated?+

With P(n, r) = n! ÷ (n−r)! — the number of ways to arrange r items from n in order. Just enter n and r.

What is the difference between a permutation and a combination?+

In a permutation order matters (A,B ≠ B,A); in a combination it does not. Since P(n,r) = C(n,r) × r!, a permutation is always greater than or equal to a combination.

Why does P(n, n) equal n!?+

Arranging all n items means n choices for the first place, n−1 for the second, and so on — the product is n!. For example all arrangements of 5 people are P(5,5) = 5! = 120.

Are password possibilities found with permutations?+

For passwords with no repeated digits, yes: a 4-digit code from 10 distinct digits is P(10,4) = 5,040. If digit repetition is allowed the count is 10⁴ instead (not a permutation).

Why is a race finish a permutation?+

Who takes first, second and third matters — order changes the outcome. So the top 3 from 10 runners can be filled in P(10,3) = 720 different ways.

Which tool do I use if order does not matter?+

If only who is selected matters (a group, team, committee), you need a combination. Use a combination calculator to find C(n, r).