UTILS.
Private by default
nPr

Permutations & Combinations

Compute permutations (nPr) and combinations (nCr) of n items taken r at a time.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

Permutations and Combinations Calculator computes nPr and nCr for a set of n items taken r at a time, without repetition. Enter n and r as whole numbers and two tiles show the number of permutations, where the order of selection matters, and combinations, where it does not. For example, 10 choose 3 gives 720 permutations but 120 combinations.

The formulas are nPr = n! ÷ (n − r)! and nCr = n! ÷ (r! × (n − r)!). The tool calculates them with BigInt arithmetic, which means the results are exact integers and are displayed in full, with every digit, instead of rounding to scientific notation. It multiplies the falling product n × (n − 1) × … × (n − r + 1) and divides by r! for combinations, so no intermediate fraction is lost.

Both values must be non-negative integers, with no decimals or signs. r cannot exceed n, and n is capped at 100,000. Very large n with a large r produces numbers with hundreds of thousands of digits, and since the result updates on every keystroke, such inputs may take a moment. Zero is allowed: nCr with r = 0 is 1, and 0 choose 0 is 1. The tool does not handle repetition (multiset) counts. Everything runs in your browser and nothing is uploaded.

Frequently asked questions

What is the difference between nPr and nCr?
nPr counts ordered arrangements, so ABC and CBA are different. nCr counts selections where order does not matter, so they are the same. nPr is always at least as large as nCr, by a factor of r!.
Why must r be at most n?
You cannot pick more distinct items than exist when repetition is not allowed, so r greater than n shows an error. Both numbers must be non-negative whole numbers.
How big can the numbers get?
n can go up to 100,000. Results are exact BigInt integers shown with all digits, but they can be hundreds of thousands of digits long, which can slow the page.
Does it count selections with repetition?
No. Both results assume each item can be used once. For repeated items, the counts follow different formulas, such as n^r for ordered picks with repetition.

More tools