Permutation & Combination Calculator
Calculate nPr (permutations) and nCr (combinations) for any n and r, with formula explanations and Pascal's triangle reference.
Supports n up to ~170 exactly; larger values shown in scientific notation.
P(8,3) = 8! / (5)! = 336C(8,3) = 8! / (3! × 5!) = 56nPr = nCr × r! → 56 × 6 = 336Row n contains C(n,0), C(n,1), …, C(n,n)
One Question Separates Permutations From Combinations: Does Sequence Matter?
Five runners finish a race. How many different podium results (gold, silver, bronze) are possible? The answer is P(5,3) = 60 — because order matters, first-second-third is different from third-first-second. Now a different question: from the same 5 runners, how many 3-person relay teams can be formed? The answer is C(5,3) = 10 — only which runners are chosen matters, not their sequence. Same numbers, same action of selecting 3 from 5, but the first question cares about arrangement and the second does not. That single distinction — does order matter? — determines whether you need a permutation or a combination every single time.
This free permutation and combination calculator computes both nPr and nCr simultaneously with full formula breakdowns, shows the relationship nPr = nCr × r!, and includes an interactive Pascal's Triangle that reveals all combination values visually. Supports values up to n = 170 exactly using JavaScript BigInt arithmetic, with larger values shown in scientific notation.
Pascal's Triangle Is a Combination Table in Disguise
Every entry in Pascal's Triangle is a combination value. Row n, position k (counting from 0) contains C(n, k). Row 4 reads: 1, 4, 6, 4, 1 — which are C(4,0), C(4,1), C(4,2), C(4,3), C(4,4). The triangle is built by Pascal's Identity: C(n,r) = C(n−1,r−1) + C(n−1,r) — each entry is the sum of the two directly above it. The symmetry visible in the triangle — 1 4 6 4 1, not 1 4 6 4 2 — reflects the identity C(n,r) = C(n, n−r): choosing r items to include is equivalent to choosing n−r items to exclude.
Pascal's Identity is also the proof behind the Binomial Theorem: (a+b)ⁿ = Σ C(n,k) × aⁿ⁻ᵏ × bᵏ. The coefficients of (a+b)⁴ = a⁴ + 4a³b + 6a²b² + 4ab³ + b⁴ are exactly row 4 of Pascal's Triangle — 1, 4, 6, 4, 1. This connection between combinatorics and algebra is one of the most elegant relationships in mathematics, and it shows up in probability distributions, polynomial expansions, and number theory all at once.
Real Problems That Require This Calculator
A 6/49 lottery has C(49,6) = 13,983,816 possible ticket combinations — each equally likely to win. A 5-card poker hand from 52 cards is C(52,5) = 2,598,960 possible hands. An 8-character password using only uppercase letters allows P(26,8) ordered arrangements when no letter repeats. Choosing 3 members from 12 candidates for a committee is C(12,3) = 220 ways. The top 3 finishers in a race of 8 runners give P(8,3) = 336 ordered podium outcomes. These are not abstract exercises — they are the denominators in probability calculations that determine odds, game design, and risk assessment.
The sum of all entries in row n of Pascal's Triangle equals 2ⁿ, which counts the total number of subsets of an n-element set including the empty set and the full set. C(n,0) = C(n,n) = 1 always. C(n,1) = n always. For the underlying factorial values that drive these formulas, the Factorial Calculator shows exact results up to 170! with digit counts and a reference table. All calculations in this tool run in your browser using exact BigInt arithmetic — no data leaves your device at any point.
✓Verified by ToollyX Team · Last updated June 2026