Quick Overview
- This tool calculates the number of ordered arrangements of r items selected from a set of n, accepting two inputs: total elements (n) and elements selected (r).
- The formula used is P(n,r) = n! / (n−r)!, supporting values from 0 to 170 for both n and r with the constraint r ≤ n.
- For example, P(10,3) = 720 and P(7,7) = 5,040.
- It serves students solving permutation problems, developers estimating algorithm search spaces, and researchers working with ordered selection counts.
Permutation Calculator: Find P(n,r) Instantly with Formula
Whether you're prepping for the SAT, debugging a sorting algorithm, or designing a game mechanic, calculating large permutation values by hand is both slow and error-prone. The Permutation Calculator computes the exact number of ordered arrangements of r items chosen from n in seconds. Formula: P(n,r) = n! / (n−r)!. Use it to solve counting problems, validate code output, or understand how quickly ordered selections grow.
What Is a Permutation?
A permutation counts the number of ways to select and arrange r items from a set of n where order matters. The notation P(n,r) — also written nPr — uses the formula n!/(n−r)!. This calculator accepts two inputs: n (total elements) and r (elements selected), supporting values from 0 to 170 for both, with r ≤ n required. Permutations appear throughout US high school and college math: the SAT Math section tests counting principles, AP Statistics covers probability built on permutations, and AP Computer Science uses them to analyze algorithm complexity. The key distinction from combinations is that {A,B} and {B,A} are counted as two different permutations but only one combination — order is the deciding factor.
Formula and Reference Table
There is one formula for permutations, valid for all non-negative integers where r does not exceed n. The table below lists the most commonly referenced values and their real-world contexts.
n | r | Calculation | Result P(n,r) | Common Use |
5 | 2 | 5!/3! | 20 | Basic SAT counting problems |
10 | 3 | 10!/7! | 720 | Medal rankings, podium finishes |
26 | 4 | 26!/22! | 358,800 | 4-letter code from alphabet (no repeats) |
8 | 8 | 8!/0! | 40,320 | Full arrangement of 8 items |
n | 0 | n!/n! | 1 | Special case: selecting nothing |
Quick Examples:
NFL Draft: ways to assign picks 1st, 2nd, 3rd from 32 teams: P(32,3) = 29,760
Assigning gold, silver, bronze from 12 athletes: P(12,3) = 1,320
4-digit PIN from digits 1–9 without repetition: P(9,4) = 3,024
Practical Examples
SAT Math: Seat Assignment Counting
A common SAT question asks how many ways 5 students can be seated in 3 specific chairs. Since order matters (each chair is distinct), this is P(5,3) = 5!/2! = 60. Students who understand why order matters here — not just that the formula applies — perform significantly better on variations of this question type that appear on the actual exam.
AP Computer Science: Brute-Force Search Space
A student writing a route-finding algorithm needs to estimate how many ordered paths exist through 8 of 12 available nodes: P(12,8) = 19,958,400. That number makes it immediately obvious why brute-force search is impractical and why heuristics like A* are necessary — a practical lesson that connects directly to algorithm design course content.
Password Security: No-Repeat PIN Generation
A cybersecurity class exercise asks students to calculate how many 6-digit PINs can be formed from 10 digits without repetition: P(10,6) = 151,200. Comparing this to 10^6 = 1,000,000 (with repetition) illustrates precisely how much the no-repeat constraint shrinks the keyspace — and why password policies matter.
NFL Playoff Bracket Outcomes
A stats teacher asks: in how many ordered ways can 3 conference finalists emerge from 6 remaining teams? P(6,3) = 120. This sports-framed problem keeps students engaged while reinforcing the formula — a technique recommended in AP Statistics curriculum design materials for making abstract counting principles tangible.
Who Can Use This Calculator?
SAT and ACT students — Verify counting and arrangement answers instantly during timed practice sessions.
AP Statistics and AP Computer Science students — Confirm permutation values for probability and algorithm complexity problems.
College math and discrete mathematics students — Check P(n,r) results for combinatorics assignments and exams.
Software engineers and developers — Estimate ordered search spaces when designing algorithms or analyzing worst-case complexity.
Math and statistics teachers — Generate correct reference values for classroom examples without manual calculation.
Data scientists — Compute ordered selection counts for feature ranking and experimental design problems.
Game developers — Calculate possible ordered sequences for card games, puzzle levels, and procedural content generation.
Curious learners — Answer everyday questions like "how many ways can I arrange my top 5 playlist songs?"
Conclusion and Next Steps
Permutation problems show up in standardized tests, software design, cryptography, and everyday decision-making — and the formula P(n,r) = n!/(n−r)! handles every one of them. For values of n above 10 or 12, manual calculation becomes impractical and prone to error. This calculator delivers the exact result with the formula displayed, so you learn while you verify. When you're ready to go further, the Combination Calculator, Factorial Calculator, and Probability Calculator are the natural next tools to explore.
Key Takeaways
Order matters in permutations: {A,B} and {B,A} are two distinct results.
P(n,0) = 1 and P(n,n) = n! are the two special cases; both are handled correctly.
Supported range: n and r from 0 to 170, with r ≤ n required.
For unordered selections, use the Combination Calculator instead.
Free to use on any device; no registration required.