Combinations vs Permutations, Explained

When order matters and when it does not: the nCr and nPr formulas, repetition variants like stars and bars, and how to read huge counts sensibly.

5 min read Updated Jul 2026

Quick Answer

Combinations and permutations answer "how many ways" questions, and the only difference is whether order matters. When it does not, use the nCr calculator side: C(n, r) counts selections, like teams or lottery tickets. When order matters, use the nPr calculator side: P(n, r) counts arrangements, like podium finishes. For example, choosing 2 of 5 people gives C(5, 2) = 10 teams, but seating 2 of 5 in a first and second chair gives P(5, 2) = 20 arrangements. This combinations permutations calculator works as a combination calculator and a permutation calculator in one, with or without repetition, and it expands the formula it used.

Try The Combinations & Permutations Calculator →

How Counting Ways Works

Everything grows from the counting principle: choices multiply. Filling r slots from n items, the first slot has n options, the next n - 1, and so on, which is the permutation formula P(n, r) = n! / (n - r)!. If order is irrelevant, every selection of r items has been counted r! times (once per shuffle), so divide it out: C(n, r) = n! / (r! × (n - r)!), the binomial coefficient. Therefore the two counts always relate by P = C × r!, and asking "when order matters" is the whole decision. The calculator states which formula it applied and works the substitution, so how many combinations exist never arrives as an unexplained number.

When Items May Repeat

Repetition changes both formulas. Ordered with repetition is the easiest count in this guide: every slot resets to all n choices, giving n^r; a 4-digit PIN is 10^4 = 10,000. Unordered with repetition is the subtle one, counted by the stars and bars formula C(n + r - 1, r): choosing 3 scoops from 4 flavors, repeats welcome, is C(6, 3) = 20. The repetition switch in the calculator moves between all four cases and names the formula each time, which is the fastest way to learn which one a word problem wants.

Examples

For example, lottery odds. Six numbers from 49, order irrelevant: C(49, 6) = 13,983,816 possible tickets, which is why jackpots roll over.

Podium finishes. Ten runners, three medals where gold, silver, and bronze differ: P(10, 3) = 10 × 9 × 8 = 720 outcomes.

PIN codes. Four digit slots, each allowing all ten digits: 10^4 = 10,000 codes, which is why a 4-digit PIN is considered weak.

This Calculator vs the Alternatives

A scientific calculator has nCr and nPr buttons but tells you nothing about which to press, and its floating-point display silently rounds counts beyond about 15 digits. A spreadsheet's COMBIN and PERMUT functions share both problems. Working by hand teaches the most but factorials explode fast. This tool computes on exact big integers, so C(1000, 500), a number with 300 digits, comes out exact, with a scientific form such as 2.70 × 10^299 beside it for reading. However, the plain-language line under the result ("ways to choose 2 of 5 items when order does not matter") is the real feature: it keeps the formula tied to the situation it counts.

Deciding Whether Order Matters

The test is one question: if two outcomes contain the same items in a different sequence, are they the same outcome? Teams, hands of cards, and pizza toppings say yes, so they are combinations. Rankings, passwords, and seat assignments say no, so they are permutations. Word problems rarely use either word, which is why practicing the translation matters more than memorizing the formulas.

Common Mistakes