AllCalciHub logo AllCalciHub
Math

Permutation Calculator

Calculate permutations nPr — the number of ways to arrange r items from n items where order matters.

What is Permutation Calculator?

A permutation calculator computes nPr — the number of distinct ordered arrangements of r items selected from a set of n items. Permutations differ from combinations in that the order of selection matters. For example, choosing a president, vice president, and treasurer from a club of 10 people is a permutation problem because each role is distinct.

How to use

  1. 1 Enter n, the total number of items in the set.
  2. 2 Enter r, the number of items to select and arrange.
  3. 3 The result shows nPr along with the formula used.
  4. 4 The cards below display n! and (n-r)! for reference.
  5. 5 r must be less than or equal to n — the calculator will show an error otherwise.

Formula

P(n, r) = n! / (n - r)!

Example calculation

How many ways can 3 students be arranged in first, second, and third place from a class of 10? P(10, 3) = 10! / (10-3)! = 10! / 7! = 10 x 9 x 8 = 720. There are 720 possible ordered arrangements.

Frequently asked questions

What is the difference between a permutation and a combination?

In a permutation, order matters — ABC and BAC are counted as different arrangements. In a combination, order does not matter — ABC and BAC are the same selection. Permutations are always greater than or equal to the corresponding combinations.

What does P(n, n) equal?

P(n, n) equals n!, which is the total number of ways to arrange all n items. For example, P(5, 5) = 5! = 120, meaning there are 120 ways to arrange 5 distinct objects.

What does P(n, 0) equal?

P(n, 0) = 1 for any value of n. This is because there is exactly one way to choose and arrange zero items — by choosing nothing.

Why does the calculator show large numbers as truncated?

Factorials grow extremely rapidly. For large inputs the result has dozens or hundreds of digits. The calculator uses JavaScript BigInt for exact integer arithmetic and truncates the display to keep it readable.

When would I use permutations in real life?

Permutations apply whenever order matters: ranking competitors, assigning roles, arranging items in a sequence, generating PIN codes, or counting possible passwords with no repeated characters.