Neatbo.

Permutations and combinations

Count ordered arrangements and unordered selections exactly from n distinct items.

Browser-local processingInputTwo whole numbers: n and rOutputExact nCr and nPr / JSON
  1. 1Add input
  2. 2Review and run
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.

⌘ / Ctrl + Enter to run

Choose from distinct items without replacement: each item can be picked once. Use a whole number from 0 to 10,000 for n and from 0 to 1,000 for r; r cannot exceed n.

Enter Total distinct items (n).
Preparing the tool…

Before you start

Enter how many distinct items you have (n) and how many you choose (r). Compare combinations, where order is ignored, with permutations, where order changes the result. Each item can be chosen once.

How to use this tool

  1. Enter the total number of distinct items n and the number selected r in the visible fields.
  2. Read nCr for groups where order does not matter, or nPr for arrangements where positions matter.
  3. Copy either exact count, expand long results, or download the JSON containing both counts.

Supported inputs and limits

Whole numbers only: 0 ≤ n ≤ 10,000 and 0 ≤ r ≤ min(n, 1,000). The items are distinct and selected without replacement.

Both results are exact integers. Long answers show a short preview; copy, expand or download the full digits.

This counts outcomes, not the possible lists themselves or the probability of a particular outcome. No account or upload is needed.

Worked example

Example input

5
Example options
{"r":2}

Example output

{
  "n": 5,
  "r": 2,
  "permutations": "20",
  "combinations": "10"
}

When something does not work

Enter whole numbers without signs or separators. Keep n at most 10,000 and r at most 1,000 and no greater than n.

Frequently asked questions

When should I use nCr instead of nPr?

Use nCr when choosing a group and rearranging its members does not create a new outcome. Use nPr when positions or selection order matter, such as first and second place.

Can an item be chosen more than once?

No. This tool counts selections from distinct items without replacement. Repeated choices use a different formula.

What happens when r is zero?

There is one empty selection and one empty arrangement, so nC0 and nP0 are both 1, including when n is zero.

Why is a long answer shortened on screen?

The calculation remains exact. The result card gives its digit count and lets you expand or copy the full integer; the JSON download also includes every digit.

Is my input sent to a server?

No. The calculation runs in your browser. Save any result you need before closing the tab.

Documentation & further reading

Related tools