Permutation Calculator

Calculate permutations P(n, r) - ordered arrangements

About This Tool

You're seating 8 people in 5 reserved chairs and need to know how many distinct seating arrangements exist. That's P(8, 5) = 6,720. Type n and r, get the count. The math is n! / (n−r)!, which is annoying to do by hand for any non-trivial input.

Permutations care about order: ABC, ACB, BAC are three different permutations. If order doesn't matter (you just want which 5 of the 8 attended, not their seating order), you want combinations instead — different formula, much smaller number.

The calculator handles values up to where the factorial overflows JavaScript's number precision, which is around n=170. Past that, you need arbitrary-precision arithmetic anyway.

The permutation formula P(n, r) = n! / (n−r)! counts the number of ordered arrangements when you select r items from a pool of n distinguishable items. The factorial n! means n × (n−1) × (n−2) × ... × 1. So P(8, 5) = 8! / 3! = 40,320 / 6 = 6,720. The math expands fast: P(10, 10) = 10! = 3,628,800, and P(20, 10) is over 670 billion. By n = 50, the numbers exceed what any standard calculator can display without scientific notation.

A worked example: you have 5 finalists in a contest and the top 3 win first, second, and third place medals. How many possible ways could the medals get awarded? P(5, 3) = 5! / 2! = 120 / 2 = 60. Sixty distinct outcomes. If instead you're just picking 3 finalists to advance to the next round (no ordering — same group regardless of which order they're picked), you want combinations: C(5, 3) = P(5, 3) / 3! = 60 / 6 = 10. Same selection problem, very different counts based on whether order matters.

The distinction matters in real applications. Lottery odds: most lotteries are combinations because the order of numbers drawn doesn't matter for matching the ticket. Password strength: permutations because every arrangement of characters is a different password. Tournament brackets: depends on what you're counting — bracket arrangements (permutations) or possible final-four sets (combinations).

The calculator's hard limit is around n = 170 because that's where 170! reaches the limit of JavaScript's double-precision floating point. Past that you need arbitrary-precision arithmetic. For practical problems — committee selections, race finishes, password lengths, lottery odds — you're virtually never above n = 100, so the limit doesn't bite. If you're in cryptography territory where n = 1024, you'd want a different tool with bignum support.

When some items are identical, the standard formula overcounts. For arranging the letters in MISSISSIPPI (11 letters total: 1 M, 4 I's, 4 S's, 2 P's), the count is 11! / (1! × 4! × 4! × 2!) = 34,650 — much smaller than 11! = 39,916,800. The denominator divides out the indistinguishable rearrangements within each repeated letter group. The basic permutation calculator doesn't apply this adjustment automatically; for problems with duplicates, do the math separately.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions