Explore all tools
FREE ONLINE TOOLNo visitor account required

Permutation and Combination Calculator

Permutations P(n, r) and combinations C(n, r) computed exactly — plus n! and the r! that connects the two.

—

Permutations P(n, r) — order matters

Combinations C(n, r) — order does not matter—
n! (all items arranged)—
r! (arrangements within each combination)—

Note: Exact integer arithmetic is used, so results are correct digit for digit. n is capped at 500 to keep the page responsive.

Report a problem with this tool

Order Matters, or It Does Not

That single question splits counting in two. Permutations count arrangements where order matters — podium finishes, passwords, running orders: P(n, r) = n! / (n − r)!. Combinations count selections where it does not — committees, lottery tickets, pizza toppings: C(n, r) = n! / (r! (n − r)!). This calculator computes both exactly (arbitrary precision, so no rounded trillions) and shows n! itself for scale.

Worked Example

From 10 people choose 3: as a ranked top three there are P(10, 3) = 10 × 9 × 8 = 720 outcomes; as an unordered committee of three there are C(10, 3) = 120. The ratio between them is exactly 3! = 6 — every committee can be arranged 6 ways, which is the whole relationship between the two formulas. And 10! = 3,628,800 is why brute-forcing even small arrangements stops being funny very quickly.

Reality Checks From Counting

A 6-from-49 lottery has C(49, 6) = 13,983,816 combinations — the true odds behind the ticket. A deck of cards has 52! ≈ 8 × 1067 orders, more than atoms in the galaxy, so a well-shuffled deck is almost certainly in an order that has never existed. Counting also disciplines security: an 8-character password from 62 symbols has 628 ≈ 2.18 × 1014 permutations, a number whose size is the entire defence.

Frequently Asked Questions

How do I know whether to use permutation or combination?

Ask whether order matters. Podium finishes and passwords: permutation. Committees and lottery tickets: combination. Same n and r, very different counts.

Why is the combination always smaller?

Every unordered selection of r items can be arranged r factorial ways, and the permutation counts all of them. C = P / r factorial exactly.

What is C(49, 6) and why does it matter?

13,983,816 — the number of ways to choose 6 numbers from 49, and therefore the true odds denominator of a 6/49 lottery jackpot.

How big can n be here?

Up to 500. The arithmetic is exact integer arithmetic, so even 100 factorial is correct to the last digit.