Permutation and Combination Calculator: nPr, nCr and Repetition

Permutation and Combination Calculator

Calculate ordered permutations, unordered combinations, selections with repetition, and distinct arrangements of repeated objects.

Inputs are limited to 1,000 total objects so exact whole-number results remain practical in the browser.


Permutation and combination formulas

A permutation counts ordered selections: nPr = n! ÷ (n − r)!. A combination counts selections where order does not matter: nCr = n! ÷ [r!(n − r)!].

When repetition is allowed, ordered selections use nr. Unordered combinations with repetition use C(n + r − 1, r).

For repeated identical objects with group counts a, b, c, …, the number of distinct arrangements is n! ÷ (a!b!c!…), where the group counts sum to n.

Checked examples

CalculationInputsExact result
Permutation5P360
Combination5C310
Permutation10P103,628,800
Combination52C52,598,960
Ordered with repetition4 objects, 3 positions64
Combination with repetition4 types, select 320
Repeated objectsCounts 2, 2, 130
Repeated letters in MISSISSIPPICounts 1, 4, 4, 234,650

How to use the calculator

  1. Decide whether order matters and whether repetition is allowed.
  2. Select the matching calculation type.
  3. Enter the number available and the number selected, or enter repeated-object group counts.
  4. Select Calculate arrangements to see the exact whole-number result and formula.

Permutation or combination?

  • Order matters: a podium, password, schedule or seating order uses a permutation.
  • Order does not matter: a committee, hand of cards or unordered subset uses a combination.
  • Repetition allowed: use one of the repetition modes when an object or type may be selected more than once.
  • Repeated identical objects: use group counts when arranging a collection that already contains duplicates, such as letters in a word.

Limits and interpretation

  • All inputs must be whole numbers.
  • Without repetition, r cannot exceed n.
  • The exact calculation supports at most 1,000 total objects.
  • For combinations with repetition, n + r − 1 cannot exceed 1,000.
  • Zero selections produce one empty arrangement. This is the standard combinatorial convention.
  • The calculator uses exact integer arithmetic rather than floating-point approximations.

Frequently asked questions

What do nPr and nCr mean?

nPr counts ordered selections of r objects from n. nCr counts unordered selections of r objects from n.

Why is 5P3 larger than 5C3?

The same three selected objects can be arranged in 3! different orders. Therefore 5P3 equals 5C3 × 3!.

Does order matter in a lottery selection?

If only the chosen numbers matter and their draw order is irrelevant, use combinations. If prizes depend on exact order, use permutations.

Can the calculator handle very large answers?

Yes. It uses exact browser integer arithmetic and displays every digit, with a scientific-notation summary for answers longer than 18 digits.

Related calculators

Use the Probability Calculator for event and binomial probabilities, the GCF and LCM Calculator for factors and multiples, or the Random Number Generator for random selections.