Math / calculator

Permutation & Combination Calculator

Count exact permutations and combinations without replacement using bounded integer-safe arithmetic.

Calculator

Calculator

Count ordered or unordered selections.

Select r items from n distinct items without replacement. Both are whole numbers from 0 to 1,000, with r ≤ n. Results use exact integer arithmetic.

Selection

Your result

Enter details to see the result.

Complete the inputs and calculate to see the main result and its supporting breakdown.

Example

Worked example

Example inputs

Selection type
Combination — order does not matter
n — total items
5
r — selected items
2

Calculation breakdown

P(n,r) = n!/(n−r)!. C(n,r) = n!/[r!(n−r)!]. Multiplicative BigInt products avoid floating-point factorial overflow.

Example result

Combinations

10

Exact count, without replacement.

How to interpret the result

The exact integer counts selections from distinct items without replacement. Combinations group arrangements that differ only in order; permutations count each order separately. Zero selected items produce one empty selection.

How to use this calculator

  1. Choose permutations if order matters, or combinations for unordered groups.
  2. Enter whole-number n and r with 0 ≤ r ≤ n ≤ 1,000.
  3. Calculate the exact count of selections without replacement.

How it works

Formula

P(n,r) = n!/(n−r)!. C(n,r) = n!/[r!(n−r)!]. Multiplicative BigInt products avoid floating-point factorial overflow.

When does order matter?

Use permutations for ordered arrangements and combinations for unordered groups. C(5,2)=10 whereas P(5,2)=20.

What this calculator does

Count arrangements when order matters or groups when it does not, using distinct items selected without replacement.

Inputs you will need

Required or selected inputs

  • Selection type
  • n — total items
  • r — selected items

Assumptions

  • Items are distinct, selections are without replacement, and order matters only for permutations. Selecting zero items has one outcome.

Limitations

  • Whole-number n and r are limited to 0–1,000, with r ≤ n. Repetition and indistinguishable objects are not modeled.

Useful next steps

Turn counts of equally likely outcomes into an event probability with Probability Calculator.

See how HandyChest handles units, validation, rounding, and testing, or Report a problem with this calculator.

Good to know

Frequently asked questions

What if r is zero?

There is one empty selection, so both C(n,0) and P(n,0) equal one, including when n is zero.

Keep going