Mathematics
Combinations and permutations
Work out how many ways you can choose k items from n, ordered or unordered and without repetition, for n up to 200. Results are exact whole numbers, so 10 choose 3 gives 120.
Enter the number of items n (0 to 200) and the selected items k, then choose the operation. Results are exact whole numbers. You can change every value; the format of decimal results is under More options. Downloads keep your inputs and results, and nothing is saved or sent.
Result
Formula / calculation:
Combinations count selections where order does not matter: C(n, k) = n! / (k! (n − k)!). Permutations count ordered selections: P(n, k) = n! / (n − k)!. Items are not repeated, and the results are exact whole numbers, even when they have many digits.
Decimal results are approximate. Inputs stay in this browser tab.
How it works
Formula and units are shown with the result. Floating-point arithmetic except exact integer combinatorics/modulo and cent-based bill distribution. A separate UK form lists the complete power set of the positional set {1,...,n}, for n from 0 to 7. It reuses the existing combination enumeration for every subset size, including the empty and full subsets; n=0 gives one empty subset. Complete grouped JSON layers and exact counts have their own current/saved CSV/TXT record. No named elements, nested sets or infinite sets; the order is presentation, not an ordered-selection operation. The separate Cartesian-product form accepts two JSON arrays of distinct quoted text labels, for example ["red","blue"] and ["S","M"], plus a basis and confirmation. Numeric-looking labels must also be quoted; expressions are never evaluated and numeric set normalisation is not performed. Each set has at most 16 labels of at most 32 UTF-8 bytes, and the product at most 64 ordered pairs. The A labels are the outer order and B labels the inner order. [] is a known empty set; a blank input is unknown and refused. Duplicate labels are refused without changing order. The full count and all pairs have five bounded exports. This is distinct from the existing positional power-set form and from vector cross products, complex Cartesian coordinates or infinite sets.
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Number of items n (0–200)
- 10
- Selected items k (0–n)
- 3
- Operation
- Unordered, no repetition
- Displayed decimal places (0–12)
- 6
- Result format
- Fixed decimals
Result
- Exact integer
- 120
Frequently asked questions
How do I calculate combinations?
Combinations without repetition use C(n,k) = n! / (k! (n − k)!). For n = 10 and k = 3 the exact result is 120.
What values of n and k can I use?
n can be from 0 to 200 and k from 0 to n. Results are exact integers.
Can I list all the combinations?
Yes, enumeration works for combinations without repetition with n up to 49 and k up to 10, listing at most 50 sets in lexicographic order.
How do I list the power set of a set?
A separate form lists every subset of {1,...,n} for n from 0 to 7, grouped by size, including the empty set and the full set.
Can I calculate a Cartesian product of two sets?
Yes. Enter two JSON arrays of quoted, distinct text labels, up to 16 labels per set and 64 ordered pairs.