MathpermutationsnPrcombinatorics

Permutations Calculator (nPr)

Enter n (total items) and r (items to arrange) to calculate the number of permutations P(n, r). A permutation is an ordered selection — the order of chosen items matters. The exact formula is n! / (n−r)!, which this calculator approximates using nʳ. The content below shows how to apply the exact formula with worked examples and step-by-step cancellation.

Advertisement

Calculator

See your Permutations Calculator (nPr) results

Enter your email to unlock results — free forever.

or

No spam, ever. Unsubscribe at any time.

Advertisement

Formula

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

P(n, r) counts the number of ways to select r items from n distinct items where order matters. The exact formula is n!/(n−r)!. Writing this out, the (n−r)! terms in the denominator cancel with the matching terms at the bottom of n!, leaving the falling factorial product: n × (n−1) × (n−2) × … × (n−r+1). For P(10, 3): 10 × 9 × 8 = 720. The calculator uses nʳ as an approximation, which equals the exact value only when all n items are being arranged (r = n). For exact results with r < n, use the falling factorial product shown above.

How to use the Permutations Calculator (nPr)

  1. 1

    Enter your n (total items)

  2. 2

    Enter your r (items arranged)

  3. 3

    Read your results instantly

    Results update in real time as you type.

Advertisement

Understanding ordered selection

A permutation answers the question: 'In how many ways can I choose and arrange r items from a pool of n?' The crucial word is 'arrange' — the order of the chosen items matters, so selecting {A, B, C} in the order A-B-C is considered different from B-A-C or C-B-A.

A classic example: a club of 10 members needs to elect a president, vice president, and secretary. The order of assignment matters because each role is distinct. The number of ways to fill these three positions is P(10, 3) = 10 × 9 × 8 = 720. Compare this with the 120 ways to choose a 3-person committee (where roles are identical, so order does not matter).

In general, P(n, r) = C(n, r) × r!, because each unordered group of r can be arranged in r! ways. Permutations always equal or exceed combinations for the same n and r.

The falling factorial product

The most practical way to compute P(n, r) is the falling factorial product: start at n and multiply down through r consecutive integers. P(n, r) = n × (n−1) × (n−2) × … × (n−r+1).

Step through the logic: the first slot can hold any of n items, the second slot any of the remaining n−1, the third any of the remaining n−2, and so on for r slots total. Multiplying these options together gives the total count.

Examples: • P(5, 2) = 5 × 4 = 20 • P(7, 3) = 7 × 6 × 5 = 210 • P(10, 4) = 10 × 9 × 8 × 7 = 5040

This computation never requires evaluating the full factorial n!, making it feasible for larger n.

Advertisement

Permutations in passwords, codes, and cryptography

Permutation counting underpins security analysis for passwords and combination locks. A 4-digit PIN drawn without repetition from 0–9 has P(10, 4) = 5040 possibilities — far fewer than the 10⁴ = 10,000 possibilities when repetition is allowed, which is the standard PIN model.

In cryptography, permutation ciphers rearrange the letters of a message according to a key. The number of possible keys for an n-letter block is n! — the number of full permutations. For a 26-letter key, 26! ≈ 4 × 10²⁶ is computationally infeasible to brute-force.

Permutation groups are also central to abstract algebra and the mathematics underlying symmetric encryption. Understanding permutation counts is therefore foundational not just for combinatorics homework but for real-world security design.

Tips & Insights

Use the falling factorial, not the full factorials

Computing P(n, r) as n × (n−1) × … × (n−r+1) is faster and less error-prone than computing n! and (n−r)! separately and dividing. For P(100, 3), compute 100 × 99 × 98 = 970,200 directly instead of computing 100! and 97!.

P(n, n) equals n!

When r = n, you are arranging all items, and P(n, n) = n!. This is the 'full permutation' case — the total number of ways to arrange n distinct objects in a sequence.

Distinguish repetition-allowed from without-repetition

Standard permutations assume no item is used twice. If repetition is allowed (e.g., a 3-digit code where digits can repeat), the count is simply nʳ. The calculator's approximation (nʳ) therefore gives the with-repetition answer; use the falling factorial for the without-repetition (standard) case.

Worked Examples

Awarding medals at a race

n (total runners): 8r (medals: gold/silver/bronze): 3

P(8, 3) = 8 × 7 × 6 = 336. There are 336 ways to assign gold, silver, and bronze medals to runners from a field of 8.

4-digit PIN without repetition

n (digits 0–9): 10r (PIN length): 4

P(10, 4) = 10 × 9 × 8 × 7 = 5040 possible PINs without repeated digits, compared to 10,000 with repetition allowed.

Advertisement

Frequently Asked Questions

What is the difference between a permutation and a combination?

A permutation is an ordered selection — the arrangement matters. A combination is an unordered selection — only the membership of the group matters. P(n, r) ≥ C(n, r) always, with equality only when r = 0 or r = 1.

How do I compute P(n, r) when n is large?

Use the falling factorial: P(n, r) = n × (n−1) × … × (n−r+1). This requires only r multiplications and avoids computing enormous factorials. For P(100, 3) = 100 × 99 × 98 = 970,200.

What does P(n, 0) equal?

P(n, 0) = 1. There is exactly one way to arrange zero items — the empty arrangement. This matches the formula: n!/(n−0)! = n!/n! = 1.

Are permutations used in probability?

Yes. If all arrangements are equally likely, the probability of a specific ordered outcome is 1/P(n, r). For example, the chance that 3 specific runners finish in a specific order from 8 is 1/P(8, 3) = 1/336 ≈ 0.3%.

What are circular permutations?

In circular arrangements (like seating around a table), one position is fixed to remove rotational equivalence, giving (n−1)! arrangements instead of n!. Two arrangements that differ only by rotation are considered identical.

Advertisement

Related Calculators