Combinations and Permutations

Calculate nCr and nPr — how many ways you can choose or arrange r items out of n — with and without repetition. Exact big-integer answers, free and instant, right in your browser.

How to use the combinations and permutations calculator

  1. Enter n, the total number of items. For example n = 49 lottery balls, n = 52 playing cards or n = 10 runners in a race.
  2. Enter r, how many items are picked. For example r = 6 lottery numbers drawn, a 5-card hand, or the 3 podium places.
  3. Read all four answers. The tool instantly shows nCr, nPr and both with-repetition variants as exact whole numbers, each with a copy button and a scientific-notation estimate for huge results.

About this tool

Combinations count selections where order does not matter; permutations count arrangements where order matters. Choosing 3 flavors of ice cream from 10 is a combination problem — C(10, 3) = 120 — while awarding gold, silver and bronze to 3 of 10 runners is a permutation problem — P(10, 3) = 720. This calculator also handles the with-repetition versions: C(n + r − 1, r) for selections where the same item may be picked again (like scoops of ice cream that can repeat) and n^r for sequences like PIN codes, where each of the r positions can be any of n symbols.

Because factorials grow astronomically fast, this nCr and nPr calculator uses exact big-integer arithmetic — you always get every digit of the true answer, not a rounded 1.23e+18, for n and r up to 10,000. Everything runs locally in your browser, so nothing is uploaded and there are no limits. Related tools: the factorial calculator for n! itself and the statistics calculator for analyzing data sets.

Frequently asked questions

What is the difference between a combination and a permutation?

In a combination the order of the chosen items is irrelevant — {A, B, C} is the same selection as {C, B, A}. In a permutation the order matters, so ABC and CBA count as different arrangements. That is why nPr is always at least as large as nCr: nPr = nCr × r!.

When should I use the "with repetition" versions?

Use them when the same item can be chosen more than once. A 4-digit PIN allows repeated digits, so there are 10^4 = 10,000 permutations with repetition. Ordering 3 scoops from 5 flavors, where flavors may repeat and order does not matter, gives C(5 + 3 − 1, 3) = C(7, 3) = 35 combinations with repetition.

What happens if r is greater than n?

Without repetition the answer is 0 — you cannot pick 7 distinct items from a set of 5. The tool shows 0 and a short note. With repetition, r can exceed n just fine, because items may be reused.

How large can n and r be?

Up to 10,000 each. Results are computed with exact big-integer arithmetic, so even C(10000, 5000) — a number with roughly 3,000 digits — is shown in full, with a digit count and scientific-notation estimate underneath.