Permutation & Combination Calculator

Updated July 2026

Enter the total number of items (n) and how many you choose (r) to instantly compute both the number of combinations (nCr) and permutations (nPr). Results are exact even for large numbers, and everything runs privately in your browser.

Combinations vs permutations: a combination counts selections where order does not matter — nCr = n! / (r!(n − r)!). A permutation counts arrangements where order does matter — nPr = n! / (n − r)!. Because every combination can be arranged in r! ways, nPr always equals nCr × r!.
Must satisfy 0 ≤ r ≤ n, whole numbers only.
Combinations (nCr) — order doesn't matter
Permutations (nPr) — order matters
n! (factorial of n)

How this combination & permutation calculator works

Counting problems come in two flavours. When the order of the items matters — the gold, silver and bronze in a race, the digits of a PIN, the seating around a table — you are counting permutations. When the order does not matter — the six numbers on a lottery ticket, a hand of cards, a committee picked from a group — you are counting combinations.

The combination formula is nCr = n! / (r!(n − r)!) and the permutation formula is nPr = n! / (n − r)!. The only difference is the extra division by r! in combinations, which removes the r! ways each chosen set could have been ordered. That is why permutations are always larger than or equal to combinations for the same n and r.

Worked example (n = 5, r = 2): there are C(5, 2) = 5! / (2!·3!) = 10 combinations — the ten unordered pairs you can pick from five items. There are P(5, 2) = 5! / 3! = 20 permutations — each of those ten pairs can be ordered two ways (2! = 2), and 10 × 2 = 20.

Reference note: results are computed with an exact step-by-step (multiplicative) method rather than full factorials, so large values of n stay accurate without overflow. Inputs must be non-negative whole numbers with r no greater than n.

Frequently asked questions

What is the difference between a permutation and a combination?
A permutation counts arrangements where order matters, so AB and BA are different. A combination counts selections where order does not matter, so AB and BA are the same. For the same n and r there are always at least as many permutations as combinations.
What is nCr?
nCr is the number of combinations — the number of ways to choose r items from n when order does not matter. It equals n! / (r!(n − r)!), and is also written C(n, r) or the binomial coefficient "n choose r".
What is nPr?
nPr is the number of permutations — the number of ways to arrange r items chosen from n when order matters. It equals n! / (n − r)!, which is the same as nCr multiplied by r!.
When does order matter?
Order matters when different arrangements are different outcomes — race finishes, passwords, seating order — so use permutations (nPr). When you only care which items were chosen, such as a lottery draw or a team, use combinations (nCr).
How is it calculated?
Combinations use nCr = n! / (r!(n − r)!) and permutations use nPr = n! / (n − r)!. This tool multiplies and divides step by step instead of building huge factorials, so the result stays exact and never overflows.
What is a factorial?
A factorial, written n!, is the product of every whole number from 1 up to n — for example 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition 0! = 1, and factorials count the ways to arrange n distinct items in a row.
⚡ Permutation & Combination Calculator — by larely ↗

Related tools

Logarithm Calculator

Compute log of any base, plus log10, ln and log2, with change of base.

Factorial Calculator

Calculate n! exactly for any non-negative integer, including huge values.

Fibonacci Calculator

Generate the Fibonacci sequence and find the Nth Fibonacci number.

Molarity Calculator

Solve molarity = moles / liters, including from mass and molar mass.

Modulo Calculator

Calculate a mod n with quotient, remainder and negative-number handling.

Percent Error Calculator

Calculate percent error between an experimental and a true value.

Z-Score Calculator

Find a z-score and its percentile from a value, mean and standard deviation.

Cylinder Volume Calculator

Find a cylinder's volume, surface area and capacity in liters or gallons.

Half-Life Calculator

Calculate remaining quantity, decay constant and half-lives elapsed.

Percent Yield Calculator

Calculate reaction percent yield from actual and theoretical yield.

Trigonometry Calculator

Calculate sin, cos, tan and their inverses in degrees or radians.

Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles or temperature.

Browse all 251 free tools →