MATH CALCULATOR

Permutation and Combination Calculator

A clear, focused calculator with validation and a short explanation of the method.

Permutation: nPr = n! ÷ (n − r)!. Combination: nCr = n! ÷ [r! × (n − r)!]. Both require whole-number inputs with 0 ≤ r ≤ n.

← Back to all calculators

Permutation versus combination

Permutations count ordered arrangements, while combinations count selections where order does not matter. Choosing the correct model is more important than simply applying a formula.

Worked example

For n = 5 and r = 3, nPr = 5 × 4 × 3 = 60 ordered arrangements. The combination count is nCr = 5! ÷ (3! × 2!) = 10 groups. The permutation result is larger because changing the order creates a different arrangement.

How to choose the right method

Use permutations for ordered roles, rankings, codes or positions when order matters. Use combinations for selecting a group when only membership matters. If repeated choices are allowed or some items are identical, a different counting model may be needed.

Input limits and precision

Enter non-negative integers with r no greater than n. The calculator accepts n up to 170; exact integer results can be very large, so the implementation uses integer arithmetic to avoid ordinary floating-point rounding.

Frequently asked questions

Why is nCr usually no larger than nPr?

Each combination can be arranged in r! different orders, so nPr = nCr × r! when 0 ≤ r ≤ n.

What do 0 selected items mean?

There is one way to choose nothing from a set, so nC0 = 1. The empty arrangement also gives nP0 = 1 under the standard convention.

Does order matter for a team selection?

Usually not if the selected people simply form a team, so combinations are appropriate. If each person fills a distinct role, permutations may be appropriate.

Permutations and Combinations: Choosing the Right Counting Formula

Permutations and combinations count selections from a set, but they answer different questions. A permutation counts arrangements where order matters; a combination counts groups where order does not matter. Choosing the right model is the key step before entering values into the calculator.

Formulas and symbols

For n distinct items and a selection of r items, nPr = n! ÷ (n − r)! and nCr = n! ÷ [r! × (n − r)!]. Here, n is the total number of available items, r is the number selected, and factorial means n! = n × (n−1) × … × 1, with 0! = 1. The standard formulas assume distinct items and selection without replacement.

Worked example

Suppose five students compete for first, second and third place. Order matters, so the number of podium arrangements is 5P3 = 5 × 4 × 3 = 60. If a teacher instead chooses any three students for a committee, order does not matter: 5C3 = 5! ÷ (3! × 2!) = 10 groups.

How to use the calculator

  1. Count the full set and enter that value as n.
  2. Enter how many items are selected as r.
  3. Ensure both inputs are non-negative whole numbers and r does not exceed n.
  4. Calculate both nPr and nCr, then choose the result that matches the question’s meaning.

Features and applications

Showing both results makes it easier to compare ordered arrangements with unordered groups. Permutations appear in rankings, passwords with distinct positions, seating plans and race outcomes. Combinations appear in committees, lottery-style selections, sample groups and choosing ingredients where sequence does not matter. The calculator is useful for probability exercises because counting possible outcomes often comes before calculating a probability.

Important assumptions

If repetition is allowed, the formula may change. If items are identical, ordinary distinct-item formulas can overcount. Large factorials also grow quickly, so results may exceed a spreadsheet or programming language’s exact integer range even when the mathematics is correct.

For probability, the count alone is not the probability. Under equally likely outcomes, probability is favourable outcomes divided by all possible outcomes. Real-world outcomes may not be equally likely, so do not treat a combinatorial count as a prediction. Define whether order, repetition and replacement matter before calculating.

Frequently asked questions

When should I use a permutation?

Use it when changing the order creates a different outcome, such as ranking three winners.

When should I use a combination?

Use it when the selected group stays the same regardless of order, such as a committee.

Can r be greater than n?

No, not for the standard without-replacement formulas used here; require 0 ≤ r ≤ n.