🆕 Newly Added Calculators:

🔀 Permutation and Combination Calculator

Muhammad Yasir Yasin
By Muhammad Yasir Yasin · Updated 11 Nov 2026 Founder · 20 Year+ Telecom + IT Expert
Muhammad Yasir Yasin

Muhammad Yasir Yasin

Founder, metacalculator.org

Muhammad Yasir Yasin is a Telecom + IT expert from Pakistan with 20+ years of proven experience — the career documented on his LinkedIn. He has been in pure IT since 1998, and works as a crypto consultant & trader since 2016. He is the founder of metacalculator.org, seotools.metacalculator.org (SEO Tools) and metatrendonline.com (Digital Products Market Place): free tools built to give clear, checked answers, with no sign-ups and no paywalls.

Every calculator here is built from the published formula, tested by hand, and explained in plain words.

Permutation And Combination Calculator

Result

Permutations count arrangements where order matters — gold, silver, bronze medals for 5 runners is P(5,3) = 60. Combinations count groups where order does not matter — choosing any 3 of 5 friends is C(5,3) = 10.

The calculator builds both with direct multiplication instead of giant factorials, so it stays exact for n all the way up to 170.

How to use this calculator

Enter n for the total items and r for how many you choose. The calculator returns both P(n,r) and C(n,r) at once.

  1. Type n, the total number of items to choose from.
  2. Type r, how many items are chosen or arranged.
  3. Make sure r is not larger than n.
  4. Press Calculate and read the permutation count and the combination count.

Worked example: choosing 3 from 5

Five people — call them A, B, C, D, E — and three slots to fill.

Permutations (order counts — gold, silver and bronze medals): P(5, 3) = 5! ⁄ (5 − 3)! worked out as 5 × 4 × 3 = 60. A-gold/B-silver/C-bronze is not B-gold/A-silver/C-bronze.

Combinations (order does not count — a three-person team): C(5, 3) = 5! ⁄ (3! × 2!) = 120 ⁄ 12 = 10. Each trio was counted six times in the 60 (once per ordering), and the formula divides those duplicates away.

Permutations with repetition (a 3-digit code from 5 symbols, symbols reusable): 5³ = 125.

Combinations with repetition (3 scoops, 5 flavours, doubles allowed): C(5 + 3 − 1, 3) = C(7, 3) = 35.

What does this calculator compute?

It computes P(n,r), the number of ordered arrangements of r items chosen from n, and C(n,r), the number of unordered groups. Both are built by direct multiplication, exact for n up to 170.

The only question that matters: does order count?

You are choosing r things from n. If swapping two of your choices produces a different result — a different podium, a different code — you are in permutation country. If the swapped result is the same thing — the same committee, the same hand of cards — it is a combination. Almost every counting mistake in this topic is answering that one question wrong.

A problem set worth recognising

ProblemTypeWorkingAnswer
Medals for gold and silver from 5 runnersPermutation5 × 420
A 2-person team from 5 peopleCombinationC(5, 2)10
2-digit code from 5 symbols, repeats allowedPermutation with repetition5²25
2 scoops from 5 flavours, same flavour twice allowedCombination with repetitionC(6, 2)15
Handshakes if 10 people all shake handsCombinationC(10, 2)45

The last row is the famous handshake problem: every handshake is an unordered pair of people, so 10 people produce C(10, 2) = 45 handshakes — not 90, because A shaking B is the same handshake as B shaking A.

Why the repetition variants sit in between

Repetition changes the counting because the pool refills. A code can reuse a symbol, so every position keeps all n choices — pure multiplication, nʳ. A combination with repetition keeps the “order doesn’t matter” rule but allows doubles, which the stars-and-bars formula C(n + r − 1, r) handles. If a problem lets you pick the same item twice, one of these two is almost certainly the tool.

Frequently asked questions

What is the difference between P(5, 2) = 20 and C(5, 2) = 10?

P(5, 2) counts arrangements where order matters — first and second are different slots. C(5, 2) counts selections where only the set matters. The factor between them is exactly 2! = 2, the number of ways to order each chosen pair — dividing by it removes the duplicates.

How many handshakes happen when 10 people each shake hands with everyone else once?

45. A handshake is a pair of people with no order to it, so the count is C(10, 2) = 10 × 9 ⁄ 2 = 45. Counting 10 × 9 = 90 would count every handshake twice.

When do I use the “with repetition” versions?

When a chosen item can be chosen again. Codes and PINs (permutations with repetition, nʳ) and selections like scoops of ice cream or coins making up a sum (combinations with repetition, C(n + r − 1, r)). If the item is used up once picked, stay with the plain versions.

Why is C(5, 2) the same as C(5, 3)?

Choosing 2 people to include is the same act as choosing 3 to leave out — every selection of 2 defines its complement of 3. The formula agrees: both evaluate to 10. The calculator’s factorial working shows the symmetry directly.

How large can n get?

The plain results are exact for n up to 170 (the largest factorial that fits in standard arithmetic). Beyond that the calculator switches to an approximation and says so — lottery-scale counts like C(59, 5) are still exact, since the factorials cancel before they overflow.