Permutation Calculator

Ordered arrangements nPr beside combinations nCr for any n and r.

Math and PercentUpdated 2026-10-112 min read
Permutation Calculator
Must be 0 through n.
Permutations (order matters)
...
Combinations (order ignored)...
Full arrangements of n...

What it does

Order decides which formula rules. Handing gold, silver, and bronze to 8 runners cares who finishes where, so every ranking counts separately. Picking a 3 person committee from the same 8 ignores seating entirely, collapsing each 6 orderings of a trio into one group.

The tool above counts both sides at once. Type n items and r positions to get permutations (order matters), combinations (order ignored), and n! for arranging everything. The 8 and 3 defaults replay the medals story: 336 podiums against 56 trios.

The math is the classical counting pair documented across NIST combinatorics references: permutations multiply n x (n - 1) down through r slots, and combinations divide that product by the r! internal orders. Their ratio is always exactly r!, here 6, which the result note states for every input.

Exact integers explode fast, so the page guards the exit. Inputs above n = 100 are refused, and results past exact integer range ask for smaller numbers instead of printing rounded fiction. Small classroom values always compute precisely.

How to use

  1. Type n, the distinct items available.
  2. Type r, the positions filled, from 0 through n.
  3. Read permutations when rank or sequence matters.
  4. Read combinations when only membership matters.
  5. Use the n! line for arranging every item.
  6. Shrink n and r if the tool reports overflow.

Formula

P(n, r) = n! / (n - r)!. C(n, r) = n! / (r! x (n - r)!). Ratio P/C = r!.
n
Distinct items available.
r
Positions filled, 0 through n.
!
Factorial: product down to 1, with 0! = 1.
P / C
Ordered count versus unordered count.

P(8, 3) multiplies 8 x 7 x 6 = 336 directly. C(8, 3) takes the same 336 and divides by 3! = 6 to reach 56. Edge cases fall out cleanly: r = 0 gives 1 way (choose nothing), r = n gives n! orders against exactly 1 group, and r = 1 gives n each way.

Worked example

Example: medals for 8 runners, 3 places

Defaults n = 8 and r = 3 already filled in.

  1. Factorials: 8! = 40,320 and (8 - 3)! = 5! = 120.
  2. Permutations: 40,320 / 120 = 336.
  3. Direct check: 8 x 7 x 6 = 336. Matches.
  4. Combinations: 336 / 3! = 336 / 6 = 56.
  5. Ratio check: 336 / 56 = 6 = 3!. Matches.
  6. Tool shows 336 orders, 56 groups, 40,320 full lineups.

Reference table

Orders vs groups for small fields
FieldP(n, 2)C(n, 2)
5 items2010
8 items5628
10 items9045
12 items13266

Limits

  • Distinct items assumed; duplicate or identical items need multiset division.
  • No repetition allowed; PIN codes with repeats use n^r instead.
  • Exact display ends near 9 x 10^15; bigger counts need logs or software.
  • Circular seatings and derangements follow their own formulas.

Common mistakes

  • Using combinations for races, passwords, and locks where order rules.
  • Using permutations for committees and hands where order means nothing.
  • Allowing r above n, which has zero ways, not a negative factorial.
  • Forgetting 0! = 1, breaking the r = 0 and r = n edges.
  • Reading rounded floats as exact for giant n.

Try it yourself

Quick checks. Answers sit tucked under each question.

10 sprinters, gold and silver. Orders and pairs?

P = 10 x 9 = 90 orders; C = 90 / 2 = 45 pairs.

5 books fully shelved in a row. Orders?

5! = 120; combinations collapse to 1 group of all five.

Why is P always a multiple of C?

Each unordered group of r rearranges into exactly r! orders.

Questions

What is nPr?

Ordered picks of r from n: n! / (n - r)!.

What is nCr?

Unordered groups of r from n: n! / (r! x (n - r)!).

When does order matter?

Ranks, sequences, codes, and seats: swapping two picks changes the outcome.

What is 0!?

1 by definition, which keeps empty picks and full picks consistent.

Why do locker combinations misuse the word?

Padlocks need exact sequences, so they are permutations despite the name.

What is the max input here?

n through 100 with exact display while integers stay precise.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.