TheCalculatorsHub

Combination Calculator

Loading Combination Engine...
Disclaimer: Results are estimates only. Always verify important calculations with a qualified professional before making decisions. Learn about our methodology.

Whether you are choosing lottery numbers, forming a sports team, or designing an experiment, you need to work out how many ways items can be selected. A combination calculator gives you C(n,r) (order does not matter) and P(n,r) (order matters) instantly, even for large n up to 200.

The difference between combinations and permutations trips up many students. Combinations count unordered selections: choosing 3 people from a group of 10 gives C(10,3) = 120 possible teams regardless of which person is chosen first. Permutations count ordered arrangements: assigning 3 specific roles to 3 of those 10 people gives P(10,3) = 720, because the order now matters.

Formulas

The combination formula is C(n,r) = n! / (r! × (n-r)!). The permutation formula is P(n,r) = n! / (n-r)!. Both are described in detail in Math Is Fun's combinatorics guide. For large n such as 100 or 200, factorials overflow standard 64-bit floats, so this calculator uses BigInt arithmetic to carry out exact calculations.

How to Use This Calculator

Enter n (total items) and r (items to choose). The calculator returns C(n,r), P(n,r), and the probability that a random selection from all n items would match a specific set of r items. For n above 50, the numbers become astronomically large, which is why combinations are displayed with their total digit count when they exceed 15 digits.

Combinations vs Permutations: Key Differences

ScenarioUseFormulaExample C(5,3)
Choosing a committeeCombinationn!/(r!(n-r)!)10
Assigning ranked prizesPermutationn!/(n-r)!60
Lottery oddsCombinationn!/(r!(n-r)!)10
Password arrangementsPermutationn!/(n-r)!60

With that in mind, always ask whether the order of selection changes the outcome before deciding which formula to use.

Lottery Example

A standard 6/49 lottery draws 6 numbers from 1 to 49. C(49,6) = 13,983,816. Your probability of matching all 6 is 1 in 13,983,816, or about 0.0000071%. Given that context, it becomes clear why jackpot prizes need to be enormous to attract players.

On top of that, you can build up partial-match probabilities. The chance of matching exactly 5 of 6 numbers in a 6/49 lottery is C(6,5) × C(43,1) / C(49,6) = 258/13,983,816 ≈ 0.00185%. Use our Coin Flip Probability Calculator for binary outcome scenarios, or our P-Value Calculator for hypothesis testing.

Repetition Allowed

When repetition is allowed (for example, choosing a 4-digit PIN where each digit can repeat), the formula changes to n^r. A 4-digit PIN from digits 0-9 has 10^4 = 10,000 possibilities. That said, our calculator covers the standard no-repetition case used in most combinatorics problems.

Pascal's Triangle Connection

C(n,r) values form Pascal's triangle. Each entry is the sum of the two entries directly above it. This is why C(n,r) = C(n-1,r-1) + C(n-1,r), a property described at Britannica. As a result, you can narrow down combination values by hand using Pascal's triangle for small n.