Combination Calculator (nCr)

A combination counts the number of ways you can select r items from a set of n when the order of selection does not matter. It is one of the two central counting operations in combinatorics, alongside permutations. The difference between them is straightforward: if choosing items A, B, C and choosing C, B, A are considered the same result, you want a combination; if the different orderings are considered distinct, you want a permutation. Selecting members for a committee, choosing questions to answer on an exam, picking lottery numbers, dealing a hand of cards, and forming a team are all combination problems because only the membership of the group matters, not the sequence in which members were chosen. The formula for nCr is n factorial divided by r factorial times the factorial of n minus r. This is the same as nPr divided by r factorial, which removes the r factorial different orderings of the same group. You enter n, the total number of items available, and r, the number you are selecting, with r no larger than n. The calculator returns the combination count, the equivalent permutation count nPr for comparison, and the ratio between them (which always equals r factorial). The calculation uses a stable step-by-step product to avoid building huge factorials, so it stays accurate for large inputs. Enter your n and r values to see the result update immediately.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
Advertise on this page
10
combinations (nCr)
Equivalent nPr60
nPr / nCr6 (= r!)
Probability of one group10.00%

How it works

The calculator uses the smaller of r and n minus r in the denominator to minimise the number of steps, then multiplies and divides alternately so the running total stays a whole number throughout. This gives n factorial divided by r factorial times the factorial of n minus r without ever building the full factorials, which would overflow for large inputs. The permutation count nPr is computed as the descending product of r terms from n. The ratio nPr over nCr always equals r factorial, confirming how many orderings exist for each combination.

Worked example

With n = 5 and r = 3, the combination count is 5! divided by (3! times 2!) = 120 divided by (6 times 2) = 10 combinations. This might represent the number of different three-person groups that can be formed from five people. The equivalent permutation count is 60, because each group of three can be arranged in 3! = 6 different orders, and 10 times 6 equals 60.

Related calculators