Permutation Calculator (nPr)

Math Updated 30 Oct 2026

Counts the ways to choose and arrange r items from a set of n when the order matters, written P(n, r) or nPr. Choose whether items can repeat (like digits in a PIN) or not (like runners on a podium) and get the exact answer with the formula filled in. For small sets the calculator also lists the actual arrangements using letters A, B, C…, and shows the matching number of combinations where order does not matter.

  • All n objects are distinct; n and r are whole numbers up to 1,000.

Formula

P(n, r) = n! ÷ (n − r)!; with repetition nʳ
  • Order matters: AB and BA are different permutations.
  • P(n, n) = n!, the number of ways to arrange all n objects.
  • Each combination of r items can be ordered in r! ways, so P(n, r) = C(n, r) × r!.
  • Arrangements are listed when there are at most 300 of them.

Arrange 3 of 5 objects

Inputs
  • Total number of objects (n): 5
  • Sample size (r): 3
  • Can an object be used more than once?: no

P(5, 3) = 5! ÷ 2! = 5 × 4 × 3 = 60 ordered arrangements. As combinations (order ignored) there are 60 ÷ 3! = 10.

Sources & references

  • Permutation
    Wikipedia · Retrieved 30 Oct 2026

    k-permutations of n: n! ÷ (n − k)!; with repetition nᵏ.

Frequently asked questions

When should I use permutations instead of combinations?
Use permutations when the order or position matters, such as passwords, seating plans or race finishes. Use combinations when only the group matters, such as a lottery ticket.
How many 4-digit PINs are there?
Digits can repeat, so it is 10⁴ = 10,000. Without repeated digits it would be P(10, 4) = 5,040.
How many ways can 8 runners finish first, second and third?
P(8, 3) = 8 × 7 × 6 = 336.

Related calculators