Permutation and Combination Calculator

Count combinations (nCr) and permutations (nPr), with or without repetition, and the arrangements of a word with repeated letters, exactly however large, with the factorial working and Pascal’s triangle.

Calculator Numbers & Math Updated Oct 3, 2026
How to Use
  1. Choose combinations (order doesn’t matter), permutations (order matters) or arrange a word.
  2. Type n, the number of items to choose from, and r, how many you take; or type the word.
  3. Tick repetition allowed if the same item can be picked again (dice, PINs, ice-cream scoops).
  4. Read the count, exact however many digits it has, and the chance of hitting one particular outcome.
  5. Pascal’s triangle highlights C(n, r); for small permutations the first arrangements are listed.
Input
Presets
Counting
Count
—
Formula
—
Chance of one
—
Size
—

Worked Example

Poker hands. Order doesn’t matter, so it is C(52, 5) = (52 × 51 × 50 × 49 × 48) ÷ (5 × 4 × 3 × 2 × 1) = 311,875,200 ÷ 120 = 2,598,960.

A podium. Gold, silver and bronze from 8 runners: order matters, so P(8, 3) = 8 × 7 × 6 = 336. The same 3 runners on the podium in any order would count once as a combination: 336 ÷ 3! = 56.

The common mistake: using a permutation for a lottery. P(49, 6) = 10,068,347,520 counts every order of the same 6 numbers separately. A lottery ticket doesn’t care about order, so the right count is C(49, 6) = 13,983,816, 720 (= 6!) times fewer.

Show Work

Enter n and r to see the working.

Formulas

Combinations
C(n, r) = n! ÷ (r!(n − r)!)
Permutations
P(n, r) = n! ÷ (n − r)!
Ordered, repeats allowed
nʳ
Unordered, repeats allowed
C(n + r − 1, r)
Multiset arrangements
n! ÷ (k₁! k₂! … )
Pascal
C(n, r) = C(n − 1, r − 1) + C(n − 1, r)

Counting Before Algebra

Indian mathematicians counted combinations long before Europe: Pingala’s work on poetic metres (around 200 BC) contains the pattern of Pascal’s triangle, and the 6th-century physician Sushruta counted the 63 combinations of six tastes. The triangle was known to al-Karaji in Persia around 1000 AD, to Yang Hui in China in 1261 and to Tartaglia in Italy; Blaise Pascal’s 1654 treatise made it famous in Europe.

Combinatorics now underpins probability, cryptography (counting keys), coding theory and computer science, where “how many cases are there?” decides whether a search is feasible.

About This Calculator

This calculator counts combinations and permutations with or without repetition, for n and r up to 100,000, using exact whole-number arithmetic so results with thousands of digits are still right. It also counts the distinct arrangements of any word, gives the odds of one particular outcome, and shows Pascal’s triangle or a list of arrangements for small cases.

Everything runs in your browser; nothing is sent anywhere.

Related calculators: Factorial Calculator, Probability Calculator, and Factoradic Converter.

Frequently Asked Questions

What is the difference between a permutation and a combination?

Order. Choosing 3 people for a committee is a combination: C(10, 3) = 120. Choosing a president, secretary and treasurer from 10 is a permutation: P(10, 3) = 10 × 9 × 8 = 720, because each committee can be ordered in 3! = 6 ways. So P(n, r) = C(n, r) × r!.

How do I calculate nCr?

C(n, r) = n! ÷ (r!(n − r)!). In practice multiply r numbers down from n and divide by r!: C(52, 5) = 52 × 51 × 50 × 49 × 48 ÷ 120 = 2,598,960, the number of five-card poker hands. C(n, r) = C(n, n − r), because choosing what to take is the same as choosing what to leave.

What if items can be repeated?

Ordered with repetition: nʳ, so a 4-digit PIN has 10⁴ = 10,000 possibilities. Unordered with repetition: C(n + r − 1, r) (“stars and bars”), so 3 scoops from 5 flavours, repeats allowed, can be chosen in C(7, 3) = 35 ways.

How many ways can the letters of a word be arranged?

n! divided by the factorial of each letter’s count, because swapping identical letters changes nothing. MISSISSIPPI has 11 letters with I ×4, S ×4, P ×2: 11! ÷ (4! · 4! · 2!) = 34,650 distinct arrangements, instead of 39,916,800.

What does Pascal’s triangle have to do with it?

Row n of Pascal’s triangle lists C(n, 0), C(n, 1), …, C(n, n). Each entry is the sum of the two above it, because C(n, r) = C(n − 1, r − 1) + C(n − 1, r): a choice either includes a particular item or doesn’t. Row 4 is 1, 4, 6, 4, 1, the coefficients of (a + b)⁴.

How do I use the Permutation and Combination Calculator?

Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Lotteries

6 numbers from 49: 13,983,816 tickets, one wins.

Cards

2,598,960 five-card poker hands.

Passwords and PINs

A 4-digit PIN has 10,000 combinations; 8 lowercase letters have 208,827,064,576.

Races

Gold, silver and bronze from 8 runners: P(8, 3) = 336 ways.

Words

MISSISSIPPI can be rearranged 34,650 ways.

Last updated: