Permutation Calculator

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

Written by Ahmet Tur · Reviewed by Kübra Yıldız · Updated

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.

Permutation Calculator: step-by-step worked example

In how many ways can gold, silver and bronze go to 3 of 8 finalists?

Example inputs
Total items (n)
8
Chosen (r)
3
  1. 1

    Set up the formula

    P(n, r) = n! ÷ (n − r)!

    8! ÷ 5! = 40,320 ÷ 120

  2. 2

    Cancel: keep the first r factors

    P(n, r) = n × (n − 1) × … × (n − r + 1)

    8 × 7 × 6 = 336

  3. 3

    If order did not matter (combination)

    C(n, r) = P(n, r) ÷ r!

    336 ÷ 6 = 56

Result · Permutations P(n, r)336
Ordered, unordered and with repetition
  • Combination C(n, r)56
  • Permutation P(n, r)336
  • With repetition nʳ512

Good to know: Ask: does order matter? Choosing president, VP and secretary is a permutation; choosing a 3-person committee is a combination. If items can repeat (e.g. a PIN), use nʳ.

Permutation Calculator — how it works

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.

Frequently asked questions

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).

About this page

Publisher:
Kalkoro — Teknolojig Bilişim Teknolojileri A.Ş., İstanbul
Written by:
Ahmet Tur — Editor (Math, date & time, unit conversion, physics & chemistry, everyday tools)
Reviewed by:
Kübra Yıldız — Editor

Parameters come from official sources; the last update date is shown at the bottom of the page.

Spotted a wrong result? Use the "Report a bug" button at the top of the page; every report is reviewed.

How we calculate and our accuracy policy →

Results are for information only. For official matters the relevant authority's calculation prevails.

Last updated: