Permutations and combinations
Count ordered arrangements and unordered selections exactly from n distinct items.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
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
- Enter the total number of distinct items n and the number selected r in the visible fields.
- Read nCr for groups where order does not matter, or nPr for arrangements where positions matter.
- 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
Unit converter
Convert length, area, mass, volume and temperature with compatible units side by side.
Percentage calculator
Find a share, calculate an amount from a percent, or measure percentage change.
Aspect ratio calculator
Reduce a width and height to a ratio, then plan a proportional pixel size.
Data size converter
Convert bit and byte amounts across decimal MB/GB and binary MiB/GiB units.