Mathematics
Exact factorials, combinations and first sets
Count unordered or ordered choices, repetition and indistinguishable groups with exact integers. Optionally inspect the first ten lexicographic combinations.
The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. JSON, HTML and TXT downloads keep your inputs and all result rows; long integers keep every digit you entered. Automatic recalculation after editing is off unless you switch it on. Nothing is saved, imported or sent automatically.
Result
Formula / calculation:
Integers n,k0–1000; no repetition requires k no greater than n. Repeated combinations use C(n+k−1,k), expanded upper argument at most 1000. Multiset group counts separated by semicolons, at most 20, sum equal n. First at most 10 sets n0–49,k0–10; this is enumeration, no draw or prediction. Empty choice and 0^0 count 1. Report values over 500 characters refuse instead of truncating.
Decimal results are approximate. Inputs stay in this browser tab.
How it works
Own exact integer algorithms: sieve/trial division, Fibonacci recurrence, elementary counting and extended Euclid. Integers n,k0–1000; no repetition requires k no greater than n. Repeated combinations use C(n+k−1,k), expanded upper argument at most 1000. Multiset group counts separated by semicolons, at most 20, sum equal n. First at most 10 sets n0–49,k0–10; this is enumeration, no draw or prediction. Empty choice and 0^0 count 1. Report values over 500 characters refuse instead of truncating.
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Operation
- Combinations without repetition
- Population size or total elements n
- 49
- Number selected k (ignored for factorial/groups)
- 6
Result
- Exact count
- 13983816
Frequently asked questions
How do I calculate combinations such as 49 choose 6?
Choose the operation, enter n and k, and calculate. The editable example uses n=49 and k=6 for unordered choices, with the exact integer result.
What ranges can n and k take?
Integers n and k are 0 to 1000. Without repetition, k must be no greater than n.
How are combinations with repetition counted?
Repeated combinations use C(n+k-1,k), where the expanded upper argument is at most 1000.
How do I count indistinguishable groups?
Enter multiset group counts separated by semicolons, at most 20 groups, with a sum equal to n. The example uses 2;2;2.
Can I list the actual combinations?
Yes, the first at most 10 lexicographic sets, for n 0 to 49 and k 0 to 10. This is enumeration only, with no draw or prediction.
What are the special cases and limits?
The empty choice and 0^0 count as 1. Report values over 500 characters are refused instead of being truncated.