Compute the exact number of ways to choose k from n

Students, statisticians and organizers use it to count ways of choosing k items from n when order does not matter.

Compute the exact number of ways to choose k from n. Everything runs in your browser, so the values you enter are never uploaded, shared, or stored.

How to use

  1. Enter the value of n, the total number of available items.
  2. Enter the value of k, the number of items you want to choose.
  3. Run the calculation to get the exact number of possible combinations.
  4. Check that k does not exceed n in your input before reading the result.
  5. Copy the number for a lesson, report or planning estimate.

Example

With the sample where n is 5 and k is 2, look at the number of ways to choose two items when order does not matter. This matches situations such as drawing two cards or picking two options.

Input

5
2

Output

10

Limits and formats

Where processing happens

The calculation runs inside your browser. The values you enter are not sent outside and are not retained by the page. You can change n or k and recalculate immediately.

Frequently asked questions

What is the difference between a combination and a permutation?

A combination ignores the order of chosen items, while a permutation takes order into account. This tool counts groups where changing the order does not create a new result.

What happens if k is larger than n?

There is no valid combination in that case. Adjust the values so that k is less than or equal to n, then run the calculation again.

Can I see the list of combinations?

No, the tool returns only the exact count. If you need every group displayed, use a separate enumeration tool.

Tools in the same category