Find the exact number of ordered selections of k from n

Students and analysts use it to count ordered selections of k items from n in ranking, allocation or draw problems.

Find the exact number of ordered selections of k from n. Everything runs in your browser, so the values you enter are never uploaded, shared, or stored.

How to use

  1. Enter n, the total number of available items, on the first line of the input box.
  2. Type k, the number of items you pick, on the next line, then run the calculation with the main button.
  3. Read the value in the result area: it is an exact count, with no rounding or approximation.
  4. You can also import a text file holding both values, or clear everything and start from an empty box.

Example

The sample puts 12 on the first line and 4 on the second. Once it runs, check that the answer matches a count of ordered picks: order matters, so the same items chosen in a different order count as another selection. Expect a whole number rather than a decimal value.

Input

12
4

Output

11880

Limits and formats

Where processing happens

Both numbers are handled inside your browser and never leave your device. The page does the arithmetic itself and prints the exact count just below. Nothing survives once you close the tab, and the erase action clears the boxes straight away.

Frequently asked questions

How is an arrangement different from a combination?

In an arrangement, order counts: picking A then B is not the same selection as B then A. In a combination, only the group matters. This page counts arrangements, meaning ordered selections of k items taken from n.

What happens when k is larger than n?

No ordered selection exists then, because you are asking for more items than are available. Check both values before running the calculation again and fix the one that does not match your problem.

Can I load the two values from a file?

Yes, the import field accepts text files and common data formats such as csv, json, md, xml or yaml. The file must contain the two expected values, n first and k second, in the same order as manual typing.

Tools in the same category