Skip to content
Math

Permutations & Combinations Calculator

Choose r items from n and see how many ways you can do it — ordered (permutations) or unordered (combinations), with and without repetition — plus the factorial working and Pascal’s triangle.

Calculator

Combinations nCr
10
Choosing 3 from 5.
Permutations nPr (ordered)
60
Permutations with repetition (nʳ)
125
Combinations with repetition
35

Working

nPr = n! / (n − r)! = 5! / 2! = 60

nCr = n! / (r!·(n − r)!) = 10

Pascal’s triangle (row n = 5)

Results are estimates. Verify with a professional for important decisions.

About this calculator

This calculator finds all four classical counting values at once: ordered selections without repetition (nPr), unordered selections without repetition (nCr), ordered selections with repetition (nʳ), and unordered selections with repetition. Enter the pool size n and the sample size r, and see every count instantly.

How to read your results

The headline figure is nCr — the number of ways to choose r items from n when order does not matter. Below it you also get nPr (order matters, no repeats), nʳ (order matters, repeats allowed), and the with-repetition combination count. The step-by-step breakdown shows the factorial expansion for nPr and nCr, and the Pascal's-triangle panel highlights exactly where your nCr value sits.

How it's calculated

Permutations without repetition use nPr = n! / (n − r)!, computed multiplicatively as the product n × (n−1) × … × (n−r+1) to avoid overflow. Combinations without repetition use nCr = n! / (r!(n−r)!), computed with the symmetric multiplicative formula ∏(n−k+i)/i for i = 1..k where k = min(r, n−r). Ordered with repetition is simply nʳ. Unordered with repetition applies the multiset formula C(n+r−1, r), also computed multiplicatively.

Worked example

Choose 3 items from a pool of 5 (for example, selecting 3 toppings from a menu of 5).

nPr = 60 ordered arrangements; nCr = 10 unordered selections; with repetition: 125 ordered and 35 unordered.

Frequently asked questions

What is the difference between a permutation and a combination?

A permutation counts arrangements where the order matters — ABC and BAC are two different outcomes. A combination counts selections where the order does not matter — ABC and BAC are the same outcome. In practice, use permutations for rankings, orderings, or sequences, and combinations for committees, teams, or subsets.

When should I use the "with repetition" variants?

Use with-repetition counts when items can be chosen more than once — for example, picking digits for a password or selecting flavours when the same flavour can appear multiple times. The formula nʳ covers ordered choices with repeats; C(n+r−1, r) covers unordered choices with repeats.

Why does the calculator cap n at 170?

170 is the largest integer whose factorial fits in a 64-bit floating-point number (170! ≈ 7.3 × 10³⁰⁶). Beyond that, JavaScript's Number type overflows to Infinity. The calculator uses the multiplicative formula rather than computing full factorials, so results are accurate up to the JavaScript safe-integer limit.

Sources

Reviewed by the YouCalc Team · Last reviewed

Spot a translation issue, a calculation issue, or have a suggestion? Let us know.

More calculators like this. Pick the next one.