Advertisement

Free Online Permutation & Combination Calculator

Calculate nPr and nCr with and without repetition.

Permutations count ordered arrangements; combinations count unordered selections. Without repetition, r cannot exceed n. With repetition, the same item may be chosen more than once.

Permutations (nPr)
—
Ordered arrangements
Combinations (nCr)
—
Unordered selections
n
—
Total pool
r
—
Items chosen
Mode
—
Repetition rule
Permutation / combination ratio
—
nPr ÷ nCr = r!

Formulas and working

  1. Enter n and r to see the formulas and results.
Advertisement

About the Permutation and Combination Calculator

Permutations and combinations both count ways to choose items from a group, but they answer different questions. A permutation cares about order: a password of 4-7-2 is different from 7-2-4. A combination ignores order: a committee of three people is the same committee regardless of who is listed first. This calculator computes nPr and nCr for the chosen values of n and r, with a repetition toggle, and shows the formula and result using exact integer arithmetic.

Without repetition

When each item can be chosen only once, the number of ordered arrangements is nPr = n! / (n − r)!. Starting with 10 items and choosing 3 gives 10 × 9 × 8 = 720. The unordered count is nCr = n! / (r!(n − r)!), which divides the permutation count by r! because each group of three can be ordered in six ways. That yields 120. This is why nPr is always at least as large as nCr for the same n and r, and the ratio is exactly r!.

With repetition

When repetition is allowed, each of the r positions can be any of the n items, so the ordered count is nPr = nr. Choosing 3 digits from 0 to 9 with repetition gives 1000 possible codes. The unordered count uses the stars-and-bars identity nCr = (n + r − 1)! / (r!(n − 1)!), which counts multisets rather than plain subsets. For 10 flavors and 3 scoops, that is 220 possible combinations when repeats are allowed.

Exact results for large numbers

Factorials grow quickly: 20! is already more than 2.4 quintillion, and ordinary floating-point arithmetic loses precision well before that. This calculator uses BigInt integer arithmetic, so results are exact even when they contain hundreds of digits. Large answers appear in a scrollable card and can be copied with the buttons. Values are formatted with thousands separators for readability, but the digits themselves are not rounded.

Everyday applications

Use permutations for passwords, PINs, race finishing orders, seating arrangements and scheduling. Use combinations for lottery tickets, card hands, committees, menu selections and choosing which optional features to include. The repetition toggle matters: a lottery usually draws without replacement, while a PIN pad allows repeated digits. When the count is zero or one, check the constraints: without repetition, r greater than n is impossible, while r = 0 always has exactly one selection, the empty selection.

Frequently asked questions

Does order matter for nCr?

No. nCr counts sets, so the same items in a different order are not counted again. If order matters, use nPr instead. The calculator shows both values so you can pick the one that matches your problem.

Why does nPr equal nCr multiplied by r!?

Each unordered selection of r items can be arranged in r! different orders. The permutation count includes every ordering, while the combination count includes each group once, so the permutation count is r! times larger.

What is the largest value I can enter?

This tool accepts n and r up to 500. Results can still have thousands of digits, which BigInt handles exactly. Very large outputs are scrollable and copyable rather than abbreviated.

Sponsored
Find a bug? Report now