Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Combination & Permutation Calculator

Combination & Permutation Calculator

Calculate combinations (nCr) and permutations (nPr) instantly with step-by-step solutions for probability and counting problems.

Combination and Permutation Calculator

The combination and permutation calculator solves counting problems by computing combinations (nCr) and permutations (nPr) the moment you type. Enter a total (n) and how many items you pick (r), and you get the exact count with the formula and full working shown.

Use it whenever you need to count possibilities: lottery odds, committee selections, seating arrangements, passwords, or homework. A built-in quick reference makes it easy to tell the two ideas apart so you choose the right one every time.

Combination vs permutation: use a Combination C(n,r) when order does not matter (picking 3 people for a committee), and a Permutation P(n,r) when order matters (assigning President, Vice President, and Secretary).
Private by design: every calculation runs in your browser. Nothing you type is ever uploaded to a server.

How to Use the Calculator

1

Choose the calculation type

Click the Combination or Permutation tab depending on whether order matters in your problem.

2

Enter the total (n)

Type the total number of items in the Total items (n) field. Any whole number from 0 up to 1000 is supported.

3

Enter how many to choose (r)

Type how many items you want to choose or arrange in the Items to choose (r) field. Keep r less than or equal to n.

4

Read the result and the steps

The answer updates instantly as you type. Open Show calculation steps to follow how it was derived, or Quick reference to compare the two formulas.

Features

Combinations and Permutations

Switch between Combination (nCr) and Permutation (nPr) with a single tab to match any counting problem.

Instant Calculation

Results update automatically as you type n and r, with no calculate button to press.

Step-by-Step Solutions

Expand the calculation steps to see exactly how the answer is derived from the formula.

Large Number Support

Compute with n up to 1000 using BigInt precision, so even huge factorials stay exact.

Smart Number Formatting

Readable thousands separators for everyday numbers and scientific notation once results pass 20 digits.

Optimized Algorithms

Uses shortcuts like C(n,r) = C(n, n-r) and partial factorials to compute fast without overflow.

Quick Reference Table

A built-in table compares combination versus permutation by order, formula, example, and relationship.

Input Validation

Clear messages flag empty, negative, non-integer, r-greater-than-n, or out-of-range inputs as you type.

Frequently Asked Questions

What is the difference between a combination and a permutation?

In a combination, order does not matter, so ABC, BAC, and CAB count as the same selection. In a permutation, order matters, so ABC, BAC, and CAB are all different arrangements. Use combinations to select groups and permutations to arrange sequences.

How do I calculate nCr and nPr?

Pick the Combination or Permutation tab, enter n (the total) and r (how many you choose), and the result appears instantly. Under the hood it uses C(n,r) = n! / (r! × (n-r)!) and P(n,r) = n! / (n-r)!. Open the steps to see each one worked out.

What does "n choose r" mean?

"n choose r" is the everyday name for the combination C(n,r) — the number of ways to choose r items from n when order is ignored. For example, 10 choose 3 equals 120, the number of different 3-person groups you can form from 10 people.

When does order matter in counting?

Order matters when rearranging the same items creates a genuinely different outcome — ranking finishers, assigning distinct roles, or building a sequence such as a PIN. Whenever that is the case, use Permutation. If only the chosen set matters, use Combination.

How do I calculate lottery odds?

Use the Combination tab, since draw order does not matter. To find the odds of picking 6 numbers from 49, compute C(49, 6) = 13,983,816 possible combinations, which means a 1-in-13,983,816 chance for a single ticket.

What is the relationship between C(n,r) and P(n,r)?

P(n,r) = C(n,r) × r!. Permutations equal combinations multiplied by the number of ways to arrange the r selected items. This is also shown in the Quick reference panel.

Why is my result shown in scientific notation?

When a result is longer than 20 digits it is displayed in scientific notation, such as 1.234567e+50, so it stays readable. The calculation itself uses BigInt and remains exact behind the scenes.

Why is n limited to 1000?

The maximum value for n is capped at 1000 to keep calculations fast and responsive. That range covers virtually every practical counting problem while keeping performance smooth in the browser.

C(10, 3)
120
Formula
C(n,r) = n! / (r! × (n-r)!)
Combination
Permutation
Order
Doesn't matter
Matters
Formula
n!/(r!(n-r)!)
n!/(n-r)!
Example
Pick 3 from 10
Arrange 3 from 10
Relationship: P(n,r) = C(n,r) × r!
Enter n (total items) and r (items to choose)
Use Combination when order doesn't matter (selecting a team)
Use Permutation when order matters (arranging positions)
Click Show calculation steps to see the detailed solution
Open Quick reference to compare the two formulas side by side
Supports large numbers up to n = 1000
Want to learn more? Read documentation →
1/7
Start typing to search...
Searching...
No results found
Try searching with different keywords