Skip to content
Dilawar Hussain

Combinations and permutations calculator

Count ordered selections, unordered subsets, and factorial arrangements with exact integers.

Browser compute / no account / no upload

Count arrangements with or without regard to order. Combinations are subsets, permutations are ordered selections, and the factorial counts orderings of a whole set.

Whole number from 0 to 1000.

Whole number from 0 to n.

Method

  • Permutations count ordered selections: AB and BA are different. Combinations count subsets: AB and BA are the same.
  • P(n, k) = n! / (n - k)! and C(n, k) = n! / (k!(n - k)!). The calculator evaluates them with exact integer steps to avoid overflow.
  • The limits are n up to 1000 and 0 <= k <= n. Factorials grow quickly, so the result is also shown in full for large values.

Reference: NIST DLMF: Binomial Coefficients

Counting problems usually come down to one question: does order matter? If it does, count permutations. If it does not, count combinations. This calculator handles both, plus the factorial that underlies them, and returns exact integers rather than rounded floating point values.

Formulas

The factorial $n!$ is the product of every whole number from 1 to $n$, with $0! = 1$ by convention. A permutation chooses $k$ items from $n$ and arranges them in order. A combination chooses the same $k$ items and ignores their order.

Worked example: a committee

Example 1

Choosing a committee

Problem

A department has 10 people and needs a committee of 3. How many committees are possible?

Solution

  1. Order does not matter, so use combinations.

  2. Apply the formula: .

  3. Cancel the 7! factor: .

Answer

120 committees

Source: Combination formula.

Worked example: a podium

Example 2

First, second, and third place

Problem

Eight runners compete. How many ways can the gold, silver, and bronze medals be awarded?

Solution

  1. Order matters, so use permutations.

  2. Apply the formula: .

Answer

336 podium orders

Source: Permutation formula.

When to use each count

The same items give different counts depending on whether order matters.
SelectionOrder mattersOrder ignored
Choose 2 from A, B, CAB, AC, BA, BC, CA, CB = 6AB, AC, BC = 3
Choose 3 from 10P(10,3) = 720C(10,3) = 120
Arrange all 5 letters5! = 1201 if all letters are used

Common mistakes

  • Using permutations when order does not matter, which overcounts each group by $k!$.
  • Using combinations when order matters, which undercounts by the same factor.
  • Forgetting that $0! = 1$. It makes $C(n,0) = C(n,n) = 1$.
  • Allowing $k$ to exceed $n$. There are no ways to choose more items than you have without replacement.
  • Rounding a large result. Counting problems need exact integers, which is why this calculator uses big integers.

Limits and assumptions

The calculator assumes distinct items and selection without replacement. It does not handle identical objects, circular arrangements, or restrictions such as adjacent items. Those problems need a modified count, often by dividing by the factorial of the number of identical items or by fixing one item in place.

Key takeaways

  • Permutations count ordered selections; combinations count unordered subsets.
  • $P(n,k) = n!/(n-k)!$ and $C(n,k) = n!/(k!(n-k)!)$.
  • Selection without replacement is assumed unless replacement is stated.
  • Exact integers matter, and the full result is available for every count.