Solverly

Permutations & Combinations Calculator

Enter n and r to get permutations (nPr) and combinations (nCr) — with or without repetition — plus steps, formulas, and examples.

Permutations & combinations: enter n and r to see nPr and nCr instantly.

Your inputs

Tip: For no repetition, r must be ≤ n. With repetition, r can exceed n.

Results

Permutations (nPr)
720
Combinations (nCr)
120
n
10
r
3
Show steps
  • Permutations (no repetition): nPr = n! / (n − r)!
  • Combinations (no repetition): nCr = n! / (r!(n − r)!)
  • n = 10, r = 3
  • nPr = n × (n − 1) × … × (n − r + 1)
  • nCr = nPr / r!

Results interpretation

  • Permutations count arrangements where order matters.
  • Combinations count selections where order doesn’t matter.
  • Check “repetition allowed” if items can repeat (e.g., PIN codes). Leave unchecked for draws without replacement.
  • Large n,r produce very large integers—shown in compact scientific notation when needed.

How this calculator works

Formula & assumptions

No repetition: nPr = n! / (n − r)! and nCr = n! / (r!(n − r)!). We compute nPr as a product to avoid huge factorials, and nCr with a multiplicative formula that stays exact with big integers.

With repetition: Permutations = n^r and Combinations = C(n + r − 1, r).

Assumptions: indistinguishable items except for identity; independent selection steps; no additional constraints.

Use cases & examples

Example 1 (no repetition): How many 3-letter codes from 10 letters with no repeat? Permutations: nPr = 10×9×8 = 720. Combinations (ignoring order): nCr = C(10,3) = 120.

Example 2 (with repetition): 4-digit PIN codes from 10 digits: n^r = 10^4 = 10,000. Combinations with repetition for picking 4 scoops from 10 flavors: C(10+4−1,4) = C(13,4) = 715.

Example 3 (cards): 5-card poker hands: C(52,5) = 2,598,960 (order doesn’t matter).

Permutations & Combinations — FAQ

When do I choose permutations vs. combinations?

Use permutations when order matters; combinations when order doesn’t.

What does “repetition allowed” mean?

Items can be reused (like digits in a PIN). Without repetition, each item can be used at most once.

Why is nCr smaller than nPr?

Combinations divide out the r! re-orderings of the same selection.

Can r exceed n?

Only when repetition is allowed. Without repetition, r ≤ n.

How are huge numbers handled?

We compute exactly using big integers and display compact notation for readability.

Do these formulas assume all items distinct?

Yes. If you have repeated/identical items with extra constraints, the counts differ.

Permutations vs. Combinations: A Practical Guide for Counting

Our permutations and combinations calculator helps you answer a deceptively simple question: “How many ways can this happen?” Whether you’re exploring PIN codes, designing an experiment, building a sampling plan, or sizing a security keyspace, the key distinction is whether order matters and whether repetition is allowed. When order matters, you’re counting arrangements—that’s permutations. When order doesn’t, you’re counting selections—that’s combinations. Turning vague scenarios into these two switches yields clean, exact answers you can trust.

In the most common “no repetition” setting, permutations count all r-long strings drawn from n distinct items without reuse: nPr = n!/(n−r)!. Combinations collapse order by dividing out the r! ways to reorder the same selection: nCr = n!/(r!(n−r)!). If you allow repetition, permutations become n^r (each position picks from all n options), and combinations become the classic “stars and bars” formula: C(n+r−1, r), which counts multisets of size r from n types.

Getting the switches right is more than a textbook exercise. In quality engineering, combinations quantify how many test cases cover r-way interactions across n factors. In cybersecurity, permutations with repetition approximate password keyspaces under policy constraints. In product, combinations explain why a seemingly small set of options explodes into thousands of configurations. And in research, combinations determine how many sample draws are possible or how manycommittee selections exist from a pool.

Large inputs generate astronomically large integers. This tool computes the exact values using big-integer arithmetic and shows a readable scientific shorthand (e.g., 1.23e+45) when needed. Two practical tips: (1) sanity-check that inputs reflect the real rules—can items repeat? does order matter? (2) if a scenario has additional constraints (e.g., “no adjacent vowels”), the count must incorporate those rules and may require a custom derivation.

With the right model, the counting falls out immediately. Use permutations for ordered arrangements, combinations for unordered selections, flip the repetition toggle as your scenario allows, and you’ll have an exact, defensible answer in seconds.