Skip to content

Permutation & Combination Calculator

Exact nPr and nCr (BigInt) for whole numbers 0 <= r <= n <= 1000. Headline shows nCr.

Maintained by the Calcenzo team. Last reviewed September 25, 2026. Methodology

Permutation & Combination Calculator

A permutation and combination calculator counts how many ways you can pick r items from n, with order (nPr) and without order (nCr). Formula: nPr = n × (n-1) × … × (n-r+1); nCr by the multiplicative formula, exact BigInt. Over 30 digits: scientific form + exact row. Choosing 3 from 10 gives 720 ordered picks and 120 groups.

permutation and combination calculator
Permutation and combination calculator chart: nPr and nCr examples.

How to use the permutation and combination calculator

  1. Enter n, the number of items in the set.
  2. Enter r, the number you choose.
  3. Read nPr and nCr.

How the permutation and combination calculator works

The permutation and combination calculator takes two whole numbers: n, the size of the set, and r, how many items you pick. It returns both counts at once. A permutation counts ordered arrangements, so picking A then B differs from B then A. A combination counts unordered groups, so AB and BA are the same choice. The formulas are:

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

The tool needs n ≥ r ≥ 0. It multiplies term by term with exact whole-number (BigInt) arithmetic, so every digit is correct, for any n up to 1,000.

Permutation and combination calculator worked example

A club with 10 members chooses a president, a secretary and a treasurer. Order matters, because each seat is a different job, so the count is 10P3 = 10 × 9 × 8 = 720. If the club instead picks a committee of 3 with no titles, order does not matter, and each group of three has been counted 3! = 6 times, so 10C3 = 720 ÷ 6 = 120. The table shows more cases.

n r nPr nCr
10 3 720 120
20 2 380 190
52 5 311,875,200 2,598,960
49 6 10,068,347,520 13,983,816
5 5 120 1
8 0 1 1

Does order matter?

This is the only question you need to answer before using the numbers. Rankings, seat assignments, passwords and race finishes depend on order, so use nPr. Lottery tickets, poker hands, pizza toppings and committees do not, so use nCr. A useful check: nPr is always nCr multiplied by r!, so permutations are never fewer than combinations.

Everyday examples

A five-card poker hand from a 52-card deck is a combination: 52C5 = 2,598,960 possible hands. A 6/49 lottery has 49C6 = 13,983,816 possible tickets, so one ticket has about a 1 in 14 million chance of the jackpot. Arranging 5 books on a shelf is 5P5 = 5! = 120 orders. Choosing 0 items always gives exactly one way, the empty choice, so nC0 = nP0 = 1.

Repetition is not included

Both counts assume each item is used at most once. If items can repeat, other formulas apply. A 4-digit PIN with digits that can repeat has 10⁴ = 10,000 possibilities, not 10P4 = 5,040. Choosing 3 scoops from 5 flavours where a flavour can be picked twice uses the formula C(n + r − 1, r) = C(7, 3) = 35. The permutation and combination calculator does not cover these cases, so work them out by hand or with the formula above.

Very large results

Counts grow quickly. 52P5 is already over 311 million, and 60C30 is exactly 118,264,581,564,861,424, about 1.18 × 10¹⁷. Ordinary browser numbers are exact only up to 9,007,199,254,740,991, so the tool uses arbitrary-precision integers instead. Results up to 30 digits are shown in full with commas. Longer results are shown in scientific form with the digit count, and the exact nCr is printed in full in its own row, so 200C100, a 59-digit number, is exact to the last digit.

From counts to probability

Counts become probabilities when every outcome is equally likely. The chance of a royal flush is 4 ÷ 2,598,960, about 1 in 649,740, because there are four royal flushes among all five-card hands. In a class of 10, the chance that three named students form the committee is 1 ÷ 120. The permutation and combination calculator gives the denominator; you count the favourable outcomes.

Tips

  • Enter whole numbers only; decimals are rejected.
  • r cannot be larger than n, and n can be at most 1,000.
  • Write down whether order matters before you calculate.
  • Use the permutation and combination calculator to check homework, then show the factorial steps yourself.

Related calculators:

Sources

OpenStax Precalculus 2e, 11.5: Counting principles; OpenStax Introductory Statistics 2e, 3.1: Terminology.

Formula and method

nPr = n*(n-1)*...*(n-r+1); nCr by the multiplicative formula, exact BigInt. Over 30 digits: scientific form + exact row.

Order matters for permutations (nPr). Order does not matter for combinations (nCr). Headline result is nCr; detail lists both.

Questions about this calculator

What is the difference between nPr and nCr?

nPr counts ordered arrangements; nCr counts unordered groups. nPr = nCr × r!.

What is 10C3?

120.

What is 10P3?

720.

How many poker hands are there?

52C5 = 2,598,960.

Does it allow repetition?

No. Each item is used at most once.

Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.

Report a calculation issue