Permutation Calculator (nPr)
Calculate the number of ways to arrange r items from a set of n, where order matters.
Calculator Inputs
Your Result
Enter your details and press Calculate to see your result.
Formula
How it works
- Enter the total number of items.
- Enter how many items you're choosing and arranging.
- View the number of possible permutations.
Share on Social Media:
A permutation is an arrangement where order matters. nPr is the number of ways to choose r items from n and put them in order. Enter n (total items) and r (items chosen) and this calculator gives the exact number.
The nPr formula
P(n, r) = n! ÷ (n − r)! = n × (n − 1) × … × (n − r + 1)
In words: you have n choices for the first position, n − 1 for the second, and so on for r positions.
Worked examples
- Race podium: 10 runners, how many ways to award gold, silver and bronze? P(10, 3) = 10 × 9 × 8 = 720.
- PIN with no repeated digits: a 4-digit code from 10 digits: P(10, 4) = 5,040.
- Arranging everything: P(5, 5) = 5! = 120 ways to line up 5 books.
Permutation or combination?
Ask: does the order of the chosen items change the outcome?
- Yes: use a permutation. A president, secretary and treasurer chosen from a club; the order of letters in a code.
- No: use a combination. A 3-person committee; a hand of cards; lottery numbers.
For the same n and r, permutations are always r! times more than combinations: P(10, 3) = 720 and C(10, 3) = 120, because each group of 3 can be ordered in 3! = 6 ways.
Repetition
This calculator counts permutations without repetition: each item can be used once. If items can repeat, like digits on a normal 4-digit PIN, the count is simply nʳ: 10⁴ = 10,000.
Input rules
n and r must be whole numbers with 0 ≤ r ≤ n. If r is bigger than n there's no way to choose, and the result is 0. P(n, 0) = 1. Results are exact, even when they run to hundreds of digits.
Related: Factorial Calculator.