Combination & Permutation Calculator

Calculate combinations C(n,r) and permutations P(n,r) with full BigInt precision and step-by-step formula display.

r ≤ n required. Both whole numbers between 0 and 170.

Quick Example

This combination calculator and permutation calculator finds C(n,r) and P(n,r) — also written nCr and nPr — with full BigInt precision and a complete step-by-step formula display. As a combined permutation and combination calculator it shows both results side by side, so you can instantly compare how many ways there are to choose r items from n with and without regard to order. Below you will find the combination formula, the permutation formula and worked examples for lottery, poker and committee problems.

What Is a Combination?

A combination is the number of ways to choose r items from n without regard to order, written C(n,r) or nCr. So what does combination mean in practice? In a combination, {A, B, C} and {C, A, B} count as the same selection — only which items are chosen matters, not the order they are picked in. This is exactly what most people mean when they ask what is a combination.

For example, forming a 3-person group from 10 friends gives C(10,3) = 120 ways. With a permutation, where order matters, the same 3 people can be arranged in P(10,3) = 720 different orders.

What Is a Permutation?

A permutation is the number of ways to arrange r items from n when order does matter, written P(n,r) or nPr. So the answer to what is a permutation is: every different ordering counts as a separate result. Arranging 3 letters from {A, B, C} gives ABC, ACB, BAC, BCA, CAB and CBA — six distinct permutations. Because each unordered combination can be reordered in r! ways, permutations are always more numerous than combinations: P(n,r) = C(n,r) × r!.

The Combination Formula and Permutation Formula

The two core formulas this nCr nPr calculator uses are:

  • Combination formula: C(n,r) = n! / (r! × (n−r)!) — order doesn't matter
  • Permutation formula: P(n,r) = n! / (n−r)! — order matters
  • Relationship: P(n,r) = C(n,r) × r!

In every formula, n is the total number of items, r is the number chosen and the exclamation mark (!) means factorial — the product of all whole numbers down to 1.

How to Calculate Combinations

To learn how to calculate combinations by hand, follow these four steps:

  1. Compute n! (n factorial).
  2. Compute r!.
  3. Compute (n−r)!.
  4. Apply the combination formula C(n,r) = n! / (r! × (n−r)!).

Example: C(5,2) = 5! / (2! × 3!) = 120 / (2 × 6) = 10. As an nCr calculator this tool computes all the steps with BigInt arithmetic, so even very large values such as C(170,85) — a 50-digit number — stay exact with no rounding error.

Combination vs Permutation

FeatureCombination C(n,r)Permutation P(n,r)
OrderDoesn't matterMatters
Formulan! / (r!(n−r)!)n! / (n−r)!
Example useLottery, committee, card handRace ranking, passwords, seating
C(5,2) vs P(5,2)1020

Real-World Examples

The simplest way to decide which formula to use is to ask one question: does the order matter? If it does not, count selections; if it does, count arrangements. These everyday examples show both at work:

  • Lottery: Choosing 6 numbers from 49 → C(49,6) = 13,983,816 possible tickets (order irrelevant).
  • Poker: A 5-card hand from a 52-card deck → C(52,5) = 2,598,960 possible hands.
  • Committees: Selecting 3 people from 10 for a committee → C(10,3) = 120 ways.
  • Race podium: Gold, silver and bronze from 8 runners (order matters) → P(8,3) = 336 arrangements.
  • Passwords & PINs: Ordering 4 distinct digits from 10 → P(10,4) = 5,040 possible codes.

Combinations With Repetition

This tool calculates standard combinations without repetition. For combinations with repetition, the formula is C_R(n,r) = C(n+r−1, r). To calculate it here, enter n+r−1 as the new n and keep r the same.

Whether you are working through a permutation and combination problem for school, estimating lottery odds or counting possible passwords, enter your n and r above to get both results at once. For more worked examples and common questions, see the frequently asked questions below.

Frequently Asked Questions About the Combination & Permutation Calculator

A combination is the number of ways to choose r items from n without regard to order. Written C(n,r) or nCr. {A,B,C} and {C,A,B} count as the same selection. Forming a 3-person group from 10 friends gives C(10,3) = 120 ways.

C(n,r) = n! / (r! × (n−r)!), where n is the total items, r the number chosen and ! is factorial. The permutation formula P(n,r) = n! / (n−r)! relates by P(n,r) = C(n,r) × r!.

Steps: 1) Compute n!, 2) Compute r!, 3) Compute (n−r)!, 4) Apply C(n,r) = n!/(r!(n−r)!). Example: C(5,2) = 120/(2×6) = 10. This tool computes all steps automatically.

In a combination, order does not matter: {A,B,C} = {C,A,B}. In a permutation, order matters: ABC, BCA, CAB are different. For the same r, P(n,r) is always C(n,r) × r!.

This tool calculates standard combinations without repetition. For combinations with repetition use C_R(n,r) = C(n+r−1, r) — enter n+r−1 as the new n and keep r the same.

nCr (C(n,r)) is the combination — choosing r from n without order. nPr (P(n,r)) is the permutation — arranging r from n with order. nCr = n!/(r!(n−r)!), nPr = n!/(n−r)!.

Couldn't find the answer you were looking for?

Explore all our tools and get the fastest answer to your question.

Go to All Tools