Skip to content

Permutations and Combinations Calculator (nPr, nCr, With Working)

nPr and nCr with the factorials written out, plus the counts when repetition is allowed.

Inputs

10P3 — order matters
720

Use this calculator on your own site

Free embed

  • Two lines of HTML, unlimited views
  • Shows a small CalculateEveryday bar, with a credit link under the calculator

What each Permutations and Combinations input means

n (total items)
The total number of distinct items to choose from: 10 runners, 52 cards, 49 lottery balls. Up to 170. Every count is worked out exactly; past 21 digits it is shown in scientific notation.
r (chosen items)
How many you pick or arrange. It cannot be more than n when each item is used once; for repeats — PIN codes, dice, scoops of the same flavour — read the last result line.

Permutations and Combinations formula

nPr = n! ÷ (n − r)! · nCr = n! ÷ (r! × (n − r)!) = nPr ÷ r!

P(n,r)=n!(n−r)!,C(n,r)=n!r! (n−r)!P(n, r) = \frac{n!}{(n-r)!}, \qquad C(n, r) = \frac{n!}{r!\,(n-r)!}

A permutation counts arrangements where order matters: choosing r of n items for first, second, third place gives n × (n − 1) × … — r factors — which is n! ÷ (n − r)!. A combination counts selections where order does not matter, so every group of r items that the permutation counted r! times is counted once: nCr = nPr ÷ r!. OpenStax's examples are a professor arranging 9 of 12 exam questions — P(12, 9) = 79,833,600 — and a diner choosing 2 of 5 sides — C(5, 2) = 10. The page writes out the factors, the division by r!, and also the counts when items can repeat: n^r ordered and C(n + r − 1, r) unordered.

Permutations and Combinations worked example

From 10 runners, the ways to award gold, silver and bronze — order matters — are 10 × 9 × 8 = 720. The ways to pick any 3 for a relay team, where order doesn't matter, divide that by 3! = 6: 120. If the same item can be picked more than once, as with a 3-digit code from 10 digits, it is 10³ = 1,000.

More Permutations and Combinations examples

Poker hands: 5 cards from a 52-card deck. Dealt in order there are 52 × 51 × 50 × 49 × 48 = 311,875,200 sequences. A hand ignores order, so divide by 5! = 120: 2,598,960 different hands.

OpenStax's diner choosing 2 of 5 side dishes: 5C2 = 10 combinations. If the order mattered — a first side and a second — there would be 5 × 4 = 20 permutations, each pair counted twice.

Where the Permutations and Combinations calculator can give the wrong answer

  • r cannot be larger than n when each item can be used once.
  • nC0 and nCn are both 1: there is one way to choose nothing and one way to choose everything.
  • n is capped at 170 because 171! is too large for an ordinary computer number; the results above about 10²¹ are shown in scientific notation.
  • Arrangements of letters with repeats (like DISTINCT) divide by the repeats' factorials: 8! ÷ (2! × 2!) = 10,080 — a different formula from the ones here.

Spotted a mistake? Tell us

Permutations and Combinations reference table

Combinations C(n, r) for n up to 10 — Pascal's triangle, where each entry is the sum of the two above it
nr = 0r = 1r = 2r = 3r = 4r = 5r = 6
31331———
414641——
515101051—
61615201561
717213535217
8182856705628
919368412612684
1011045120210252210
Source: Arithmetic: C(n, r) = n! ÷ (r!(n − r)!) as in OpenStax College Algebra 2e §9.5; each entry also equals C(n − 1, r − 1) + C(n − 1, r)

Permutations and Combinations FAQ

Order. A permutation counts arrangements (first, second, third), a combination counts groups. 10P3 = 720 but 10C3 = 120, because each group of 3 can be ordered 6 ways.