Permutation Calculator
Find the number of ordered arrangements quickly using either the standard permutation formula nPr or the repetition model nr.
n must be a whole number 0 or greater.
For standard nPr, r cannot be greater than n.
What is a permutation?
A permutation is a way of arranging items where order matters. If you pick first place, second place, and third place in a race, the sequence matters. That means A-B-C is different from B-A-C.
In math and statistics, permutations are used whenever rank, sequence, position, or priority matters. This includes scheduling, passwords, seating charts, and assignment problems.
Permutation formulas
1) Without repetition (standard nPr)
Use this when each item can be used only once:
P(n, r) = n! / (n - r)!
- n = total number of available items
- r = number of positions to fill
- ! = factorial operation (e.g., 5! = 5 × 4 × 3 × 2 × 1)
2) With repetition allowed
Use this when the same item can appear more than once:
Prep(n, r) = nr
Example: a 4-digit PIN code from digits 0–9 has 10 choices for each position, so total outcomes are 104 = 10,000.
How to use this permutation calculator
- Enter n (total items).
- Enter r (how many positions to fill).
- Check Allow repetition if repeats are possible.
- Click Calculate to see the result and formula expansion.
Permutation vs combination (important)
A common mistake is using permutations when combinations are needed.
- Permutation: order matters (ABC different from BAC)
- Combination: order does not matter (ABC same as BAC)
If you are choosing a committee, combinations are usually correct. If you are assigning gold/silver/bronze medals, permutations are correct.
Worked examples
Example A: Awarding 3 medals from 10 contestants
Since medal positions are different, order matters:
P(10, 3) = 10 × 9 × 8 = 720
Example B: Creating a 5-character code from 26 letters with repetition
Reuse is allowed, so use nr:
265 = 11,881,376
Common mistakes to avoid
- Using nPr when you actually need combinations nCr.
- Forgetting that r cannot exceed n in standard permutations.
- Confusing zero factorial: 0! = 1, not 0.
- Ignoring whether repetition is allowed by the problem setup.
Why permutations matter in real life
Permutations are practical, not just academic. They help estimate possibilities, manage risk, and design systems.
- Cybersecurity: password and key-space calculations
- Operations: production and scheduling order
- Data science: feature ordering and ranking problems
- Games and puzzles: counting valid arrangements
Quick FAQ
Can n or r be zero?
Yes. If r = 0, there is exactly 1 arrangement (the empty arrangement).
Can r be larger than n?
For standard permutations, no. For repetition mode (nr), yes, because items can be reused.
Does this calculator handle large values?
Yes. It uses big-integer arithmetic in your browser so large exact values can be computed without floating-point rounding errors.