Permutation Calculator (nPr)
Count the ordered arrangements of r items chosen from n.
Results update as you type.
About this calculator
A permutation counts how many ways you can arrange r items chosen from a set of n, where order matters — so first, second and third place are three different outcomes. This calculator returns the exact count and the formula it used, even for large n and r.
The formula is nPr = n! / (n − r)!, which is the same as multiplying the top r numbers counting down from n. For 10 items taken 3 at a time, that is 10 × 9 × 8 = 720. Choosing none gives nP0 = 1, and arranging all of them gives nPn = n!. You cannot choose more items than you have, so if r is greater than n the tool returns a dash.
Permutations answer "how many ordered sequences?" — the number of possible race finishes, seating orders, PIN codes or ranked shortlists. When order does not matter, use a combination instead, which is always the smaller count.
Frequently asked questions
What is the difference between a permutation and a combination?
In a permutation order matters (first, second, third are different outcomes); in a combination it does not. There are always at least as many permutations as combinations.
What is the permutation formula?
nPr = n! / (n − r)!. For 10 items taken 3 at a time: 10 × 9 × 8 = 720.
When should I use a permutation?
When order matters: ranking finishers, filling first/second/third places, seating people in a row, or building an ordered code.
What happens if r is greater than n?
You cannot arrange more items than you have, so the result is undefined and the tool returns a dash.
What is nP0?
It is 1 — there is exactly one way to arrange nothing, the empty arrangement.
What is nPn?
It equals n!, because arranging all n items in order is the same as a full factorial. For example 4P4 = 4! = 24.
API — use this calculator from code
Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →
Endpoint
GET https://calculator.free/api/v1/permutation/
curl
curl "https://calculator.free/api/v1/permutation/?n=10&r=3"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/permutation/?" + new URLSearchParams({
"n": "10",
"r": "3"
}));
const data = await r.json();
console.log(data.results);
Results are estimates for general guidance only, not financial, medical or tax advice.