User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Integer from 0 to 1000
Integer from 0 to n
Presets:
Enter values above and press Calculate
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Miscounting combinations is a common source of error in probability, statistics, and experimental design. The binomial coefficient C(n, k) counts the number of ways to choose k items from n distinct items where order does not matter and no item is selected twice. A manual factorial calculation for n = 50 already produces a 65-digit number, making overflow inevitable on standard 64-bit floats. This calculator uses arbitrary-precision integer arithmetic (BigInt) to return exact results for inputs up to n = 1000. It also provides a step-by-step multiplicative expansion and a Pascal's Triangle fragment so you can visually verify the result.

Note: this tool computes combinations without repetition only. If your problem allows selecting the same item more than once, you need the multiset coefficient C(n + k โˆ’ 1, k). The formula assumes 0 โ‰ค k โ‰ค n. By convention C(n, 0) = 1 and C(0, 0) = 1.

combination calculator combinatorics C(n k) binomial coefficient permutation probability Pascal triangle factorial

Formulas

The number of combinations without repetition (binomial coefficient) is defined as:

C(n, k) = n!k! โ‹… (n โˆ’ k)!

To avoid computing huge factorials, the multiplicative (product) form is used instead:

C(n, k) = kโˆi = 1 n โˆ’ k + ii

The symmetry property C(n, k) = C(n, n โˆ’ k) is exploited: computation uses min(k, n โˆ’ k) iterations. Pascal's recurrence relation provides an alternative verification path:

C(n, k) = C(n โˆ’ 1, k โˆ’ 1) + C(n โˆ’ 1, k)

Where: n = total number of distinct items in the set. k = number of items chosen. n! = factorial of n (1 ร— 2 ร— โ€ฆ ร— n). By definition, 0! = 1.

Reference Data

nC(n,1)C(n,2)C(n,3)C(n,4)C(n,5)C(n,6)C(n,7)C(n,8)
55101051 - - -
6615201561 - -
772135352171 -
88285670562881
10104512021025221012045
1313782867151287171617161287
202019011404845155043876077520125970
2626325260014950657802302306578001562275
303043540602740514250659377520358005852925
36366307140589053769921947792834768030260340
4545990141901489951221759814506045379620215553195
494911761842421187619068841398381685900584450978066
5252132622100270725259896020358520133784560752538150
60601770342204876355461512500638603862069202558620845
1001004950161700392122575287520119205240016007560800186087894300

Frequently Asked Questions

This calculator accepts values of n up to 1000. It uses JavaScript BigInt arithmetic, which handles arbitrary-precision integers. The result for C(1000, 500) has 300 digits and is computed exactly. No floating-point approximation is involved.
The factorial definition requires computing n! which grows astronomically. For n = 170, the factorial already exceeds the IEEE 754 double-precision range (~1.7 ร— 10308). The multiplicative formula computes the product incrementally: multiply by (n โˆ’ k + i) then divide by i at each step. Combined with BigInt, intermediate values stay manageable and exact.
Permutations count ordered arrangements: P(n, k) = n! รท (n โˆ’ k)!. Combinations disregard order, so C(n, k) = P(n, k) รท k!. For example, choosing 5 cards from 52: P(52, 5) = 311,875,200 ordered hands, but C(52, 5) = 2,598,960 unordered hands.
There is exactly one way to choose zero items from any set: take nothing. Mathematically, C(n, 0) = n! รท (0! ร— n!) = 1. Similarly C(n, n) = 1 because there is only one way to take everything.
Most lotteries require selecting k numbers from n without repetition and without order. The 6/49 lottery has C(49, 6) = 13,983,816 possible outcomes, giving a jackpot probability of approximately 7.15 ร— 10โˆ’8. Powerball uses C(69, 5) ร— 26 = 292,201,338 combinations.
Yes. The calculator automatically uses min(k, n โˆ’ k) as the loop bound. For C(1000, 998), it performs only 2 iterations instead of 998. This reduces time complexity from O(k) to O(min(k, n โˆ’ k)).