Mihsaba›Math›Permutation & Combination Calculator

Permutation & Combination Calculator

Calculate exact nPr and nCr and compare repetition-allowed counts for whole-number inputs up to n and r = 1000 without floating-point rounding.

Share this free calculator

Send this tool to someone who needs the calculation.

How to use

The calculator compares four counting cases from the same n and r: permutations without repetition, combinations without repetition, and the corresponding order-sensitive and order-insensitive counts when repetition is allowed. Results use custom integer arithmetic instead of floating-point numbers so large counts are not rounded.

  1. Enter n for the total number of distinct items and r for the chosen items or positions.
  2. Use whole numbers from 0 to 1000 with r ≤ n for the no-repetition cases.
  3. Calculate to see nPr, nCr and both repetition-allowed counts together.
  4. Choose the relevant result by asking whether order matters and whether an item may repeat.

How it is calculated

P(n,r)=n!÷(n-r)!; C(n,r)=n!÷[r!(n-r)!]; with repetition: n^r and C(n+r-1,r)

Example

Example n=10, r=3: P(10,3)=720 and C(10,3)=120 without repetition. With repetition allowed, ordered selections are 10³=1000, while unordered selections with repetition are C(12,3)=220.

Important notes

The 1000 limit protects browser responsiveness while keeping the displayed integers exact. nPr and nCr are not evaluated through floating-point factorials. Without repetition r must be ≤ n; the repetition formulas shown are n^r for ordered selections and C(n+r−1,r) for unordered selections.

Worked examples and interpreting results

Selecting two of five distinct items gives 20 ordered arrangements when order matters, but 10 groups when it does not. This example assumes an item cannot be repeated.

Worked examples and interpreting results
CaseCalculationResult
Permutations without repetitionP(5,2) = 5! ÷ 3!20
Combinations without repetitionC(5,2) = 5! ÷ (2! × 3!)10
Ordered selections with repetition5²25

How to check the result

Ask whether A then B differs from B then A, and whether A can be used more than once. Those answers determine the formula. Without repetition, the selection size cannot exceed the available set.

Frequently asked questions

When should I use permutations instead of combinations?

Use permutations when changing order creates a different outcome; use combinations when only the selected group matters.

Does the calculator support repetition?

Yes. Alongside standard nPr and nCr it shows n^r and C(n+r−1,r) for repetition-allowed cases.

Why not use ordinary floating-point factorials?

Factorials grow very quickly and normal JavaScript numbers lose integer precision, so this tool uses custom exact integer arithmetic.