Permutation and Combination

Calculate combinations (nCr), permutations (nPr), and factorials instantly. Supports with and without repetition. Step-by-step solutions for probability, lottery, and counting problems.

Permutation & Combination Calculator

Calculate nCr, nPr, factorials, and combinations/permutations with repetition

Order does NOT matter — selecting items without caring about arrangement
C(n, r)=n! / (r! × (n-r)!)
Examples:

Permutation & Combination Calculator

Enter values for n and r to calculate combinations, permutations, and factorials

Did you know?
The number of ways to arrange the letters in "MISSISSIPPI" is 34,650.

Quick Reference

Combination
C(n, r) = n! / (r!(n-r)!)
Selection where order doesn't matter
Permutation
P(n, r) = n! / (n-r)!
Arrangement where order matters

Free Permutation and Combination Calculator

Our free Permutation and Combination Calculator helps you instantly calculate combinations (nCr), permutations (nPr), and factorials (n!) with step-by-step solutions. Whether you're solving probability problems, preparing for exams, or working on real-world projects, this tool provides accurate results for any values of n and r.

What are Permutations and Combinations?

Permutations and combinations are fundamental concepts in combinatorics, a branch of mathematics that deals with counting, arranging, and selecting objects. They help answer questions like "How many ways can I choose 3 people from a group of 10?" or "How many different passwords can be made using 4 digits?"

While both concepts involve selecting items from a larger set, they differ in one critical way: whether the order of selection matters. Understanding this distinction is the key to solving counting problems correctly.

Combinations

A combination is a selection of items where the order does NOT matter. For example, choosing 3 flavors of ice cream from 10 available flavors is a combination problem because chocolate-vanilla-strawberry is the same as strawberry-vanilla-chocolate.

Permutations

A permutation is an arrangement of items where the order DOES matter. For example, arranging 3 people in first, second, and third place is a permutation problem because Alice-Bob-Charlie is different from Charlie-Bob-Alice.

Combination Formula Explained (nCr)

The combination formula calculates how many ways you can choose r items from a set of n items without regard to order.

Formula:

C(n, r) = nCr = n! / (r! × (n - r)!)

Where:

  • n is the total number of items
  • r is the number of items being chosen
  • ! denotes factorial (e.g., 5! = 5 × 4 × 3 × 2 × 1 = 120)

Example: How many ways can you choose 3 people from a group of 10?

C(10, 3) = 10! / (3! × 7!)
         = 3,628,800 / (6 × 5,040)
         = 3,628,800 / 30,240
         = 120

There are 120 different ways to choose 3 people from 10.

Key properties of combinations:

  • C(n, 0) = 1 (there is one way to choose nothing)
  • C(n, 1) = n (there are n ways to choose one item)
  • C(n, n) = 1 (there is one way to choose everything)
  • C(n, r) = C(n, n-r) (choosing r items = excluding n-r items)

Permutation Formula Explained (nPr)

The permutation formula calculates how many ways you can arrange r items from a set of n items where order matters.

Formula:

P(n, r) = nPr = n! / (n - r)!

Example: How many ways can 3 people win gold, silver, and bronze medals from 8 contestants?

P(8, 3) = 8! / (8 - 3)!
        = 8! / 5!
        = 40,320 / 120
        = 336

There are 336 different medal arrangement possibilities.

Key properties of permutations:

  • P(n, 0) = 1
  • P(n, 1) = n
  • P(n, n) = n! (arranging all items)
  • P(n, r) = C(n, r) × r! (permutations = combinations × arrangements of each)

Difference Between Permutation and Combination

Understanding when to use permutation vs combination is crucial. Here's a detailed comparison:

FeatureCombination (nCr)Permutation (nPr)
Order matters?NoYes
Formulan! / (r!(n-r)!)n! / (n-r)!
ValueAlways ≤ permutationAlways ≥ combination
RelationshipC(n,r) = P(n,r) / r!P(n,r) = C(n,r) × r!
ExampleChoosing a committeeArranging in a line
A,B vs B,ASame selectionDifferent arrangements
Typical useSelection problemsArrangement problems

How to decide which to use: Ask yourself — "Does changing the order create a different outcome?" If YES, use permutation. If NO, use combination.

With and Without Repetition Explained

Sometimes items can be selected more than once (with repetition) or only once (without repetition).

Without Repetition (Standard)

In standard permutations and combinations, each item can only be selected once. You cannot pick the same item twice.

  • Combination without repetition: C(n, r) = n! / (r!(n-r)!)
  • Permutation without repetition: P(n, r) = n! / (n-r)!

Example: Selecting a committee of 4 from 12 people — a person cannot be on the committee twice.

With Repetition

When repetition is allowed, items can be selected multiple times.

Combination with repetition: C(n+r-1, r) = (n+r-1)! / (r!(n-1)!)

This counts how many ways you can choose r items from n types when you can pick the same type multiple times.

Example: Choosing 2 scoops of ice cream from 3 flavors — you can pick chocolate twice.

C(3+2-1, 2) = C(4, 2) = 4! / (2! × 2!) = 6

The 6 combinations are: CC, CV, CS, VV, VS, SS

Permutation with repetition: n^r

Each of the r positions can be filled with any of the n items.

Example: A 4-digit PIN using digits 0-9:

10^4 = 10,000 possible PINs (0000 through 9999)

How to Use This Calculator

Using our Permutation and Combination Calculator is straightforward:

  1. Select the tab for your calculation type: Combination (nCr), Permutation (nPr), With Repetition, or Factorial (n!)
  2. Enter n — the total number of items available
  3. Enter r — the number of items to select or arrange
  4. View results — the answer appears instantly with formatted numbers
  5. Expand steps — click "Step-by-Step Calculation" to see the full mathematical derivation
  6. Try examples — use the quick example buttons for common scenarios

For the Repetition tab, both combination-with-repetition and permutation-with-repetition results are shown side by side.

Common Examples

Lottery Combinations

A standard 6/49 lottery requires choosing 6 numbers from 49. Since order doesn't matter:

C(49, 6) = 49! / (6! × 43!) = 13,983,816

Your odds of winning with a single ticket are 1 in 13,983,816.

Committee Selection

Choosing a committee of 5 from 20 people:

C(20, 5) = 20! / (5! × 15!) = 15,504

Password Possibilities

An 8-character password using lowercase letters (26 options per position):

26^8 = 208,827,064,576 possible passwords

If using uppercase, lowercase, and digits (62 characters):

62^8 = 218,340,105,584,896 possible passwords

Race Positions

Awarding gold, silver, and bronze to 3 of 12 athletes:

P(12, 3) = 12! / 9! = 1,320 different podium arrangements

Card Hands

Number of possible 5-card hands from a standard 52-card deck:

C(52, 5) = 52! / (5! × 47!) = 2,598,960

Factorials Explained

A factorial (written as n!) is the product of all positive integers from 1 to n. Factorials are the building blocks of permutation and combination formulas.

Definition:

n! = n × (n-1) × (n-2) × ... × 3 × 2 × 1
0! = 1 (by definition)

Common factorial values:

nn!Value
00!1
11!1
55!120
1010!3,628,800
1515!1,307,674,368,000
2020!2,432,902,008,176,640,000
5050!~3.04 × 10^64
100100!~9.33 × 10^157

Factorials grow extremely rapidly. By the time you reach 70!, the result already has over 100 digits. This is why our calculator uses arbitrary-precision arithmetic to handle large values without overflow.

Real-World Applications

Permutations and combinations are used across many fields:

Probability and Statistics Calculating the likelihood of events, from coin flips to genetic inheritance patterns. Every probability calculation involving discrete outcomes relies on combinatorics.

Computer Science Algorithm analysis, hash functions, cryptography, and database design all depend on combinatorial mathematics. Password strength is directly related to permutation counting.

Game Theory Analyzing possible moves in chess, poker, and other games. There are more possible chess games than atoms in the observable universe.

Quality Control Determining sample sizes and defect rates in manufacturing. Combinations help calculate how many items to test from a production batch.

Genetics Calculating the number of possible gene combinations, allele arrangements, and inheritance patterns in biology.

Business and Finance Portfolio diversification, scheduling, resource allocation, and risk assessment all use combinatorial analysis.

Sports Tournament brackets, playoff scenarios, team selections, and ranking systems all involve permutation and combination calculations.

Frequently Asked Questions

What is the difference between permutation and combination?

A permutation counts arrangements where order matters (like race placements), while a combination counts selections where order doesn't matter (like committee members). For the same n and r, there are always more permutations than combinations because each combination can be arranged in r! different ways.

How many combinations are in a lottery?

A standard 6/49 lottery has C(49, 6) = 13,983,816 possible combinations. This means your odds of winning the jackpot with one ticket are approximately 1 in 14 million. A Powerball-style lottery (5 from 69 plus 1 from 26) has C(69,5) × 26 = 292,201,338 combinations.

How to calculate nCr?

Use the formula C(n, r) = n! / (r! × (n-r)!). For example, C(10, 3) = 10! / (3! × 7!) = 3,628,800 / (6 × 5,040) = 120. You can also use our calculator above — just enter n and r and get instant results with steps.

What is factorial?

A factorial (written n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By convention, 0! = 1. Factorials are fundamental to permutations and combinations because they count the total number of ways to arrange n distinct objects.

When should I use permutation vs combination?

Use permutation when the order of selection creates different outcomes (e.g., passwords, race results, seating arrangements). Use combination when order doesn't matter (e.g., choosing team members, selecting lottery numbers, picking dishes from a menu). Ask yourself: "Would swapping two items create a new, distinct result?"

What is combination with repetition?

Combination with repetition allows items to be selected more than once. The formula is C(n+r-1, r). For example, choosing 3 scoops of ice cream from 5 flavors (where you can pick the same flavor multiple times) gives C(5+3-1, 3) = C(7, 3) = 35 combinations.

How many ways can you arrange n objects?

The number of ways to arrange all n objects is n! (n factorial). For example, 5 objects can be arranged in 5! = 120 different ways. A deck of 52 cards can be arranged in 52! ≈ 8.07 × 10^67 ways — a number far larger than the estimated number of atoms on Earth.

How to calculate password possibilities?

For a password of length r using n possible characters, the total number of possibilities is n^r (permutation with repetition). For example, an 8-character password using 62 characters (a-z, A-Z, 0-9) gives 62^8 = 218,340,105,584,896 possibilities. Adding special characters increases this dramatically.

Why Use Our Calculator

Our Permutation and Combination Calculator is built to be the most comprehensive and reliable tool available:

  • All calculation types — Combinations, permutations, with repetition, and factorials in one tool
  • Step-by-step solutions — See every mathematical step with factorial breakdowns
  • Large number support — Handles values that would overflow standard calculators using arbitrary-precision arithmetic
  • Scientific notation — Very large results are automatically shown in scientific notation
  • Common examples — Quick-access buttons for lottery, committees, PINs, and more
  • Instant results — Calculations happen in real-time as you type
  • Fun facts — Learn interesting combinatorics trivia while you calculate
  • Mobile friendly — Works perfectly on phones, tablets, and desktop computers
  • No registration required — Use it freely without creating an account
  • Completely free — No hidden costs, no premium tiers, no limitations