Math

Permutations Calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a permutations calculator?

A permutations calculator tells you how many different ordered arrangements you can make by selecting rr items from a larger set of nn distinct items. Because order matters, picking item A then item B is counted separately from picking B then A.

Permutations show up whenever you need to count sequences: assigning gold, silver, and bronze medals to runners, choosing a president, vice‑president, and treasurer from a club, or working out how many distinct passwords or PIN orderings are possible.

How does it work?

Enter the total number of items nn and how many you want to arrange rr. The calculator evaluates the standard permutation formula and returns the result instantly. It expects whole, non‑negative numbers, and requires rnr \le n — you cannot arrange more items than you have.

The number of permutations of rr items taken from nn is:

nPr=n!(nr)!{}^{n}P_{r} = \frac{n!}{(n-r)!}

Here n!n! (read “n factorial”) is the product of all positive integers up to nn, and 0!=10! = 1 by definition. Unlike a combination, a permutation distinguishes between different orderings of the same selection.

Worked examples

  • n = 5, r = 2. 5P2=5!3!=1206=20{}^{5}P_{2} = \frac{5!}{3!} = \frac{120}{6} = 20 ordered pairs.
  • n = 10, r = 3. 10P3=10!7!=10×9×8=720{}^{10}P_{3} = \frac{10!}{7!} = 10 \times 9 \times 8 = 720 arrangements.
  • n = 5, r = 5. 5P5=5!0!=120{}^{5}P_{5} = \frac{5!}{0!} = 120, which is simply 5!5! — every full ordering of all five items.
  • n = 5, r = 0. 5P0=5!5!=1{}^{5}P_{0} = \frac{5!}{5!} = 1, the single “empty” arrangement.

If you ask for r>nr > n — for instance n=3n = 3 and r=5r = 5 — the result is left blank, because there is no valid arrangement.

Practical notes

When order does not matter, you want a combination instead, which divides the permutation count by r!r! to remove duplicate orderings. The building block of both is the factorial, and growth of these counts is closely related to repeated multiplication explored in the exponent calculator.

Because factorials grow very quickly, permutation counts can become enormous: 20P20=20!{}^{20}P_{20} = 20! already exceeds 2.4×10182.4 \times 10^{18}. For large nn the result is an approximation limited by floating‑point precision.

Report a bug

This field is required.