🌐 EN

Advanced Permutation & Combination Calculator

Calculate various possibilities from basic permutations and combinations to repetitions and derangements. Essential tool for probability and statistics problem solving.

Results
Permutation (nPr) - Order matters
Combination (nCr) - Order doesn't matter
Permutation with repetition (n^r)
Combination with repetition H(n,r)
Derangement !n
n! (Factorial)
Permutation probability Combination probability

Formulas

nPr = n! / (n-r)!
nCr = n! / (r! × (n-r)!)
n^r (repetition allowed)
H(n,r) = C(n+r-1, r)
!n = n! × Σ((-1)^k / k!)

Visual Example

Selecting 3 from 5 items

Visual Example Selecting 3 from 5 items 1 2 3 4 5 Total items (n): 5, Items to select (r): 3
GUIDE

Learn more

01

Understanding Permutations vs Combinations

Permutation considers order when selecting items (AB ≠ BA), while combination does not (AB = BA). For selecting 2 from ABC: permutation gives 6 results (AB, BA, AC, CA, BC, CB), combination gives 3 (AB, AC, BC). Use permutations for passwords or race rankings where order matters, combinations for team selection or lottery numbers where order does not matter.

02

Permutations and Combinations with Repetition

Permutations with repetition allow selecting the same item multiple times with order (n^r). Rolling a die 3 times has 6^3 = 216 outcomes. Combinations with repetition allow duplicates without order: H(n,r) = C(n+r-1, r). Choosing 3 ice cream scoops from 5 flavors (duplicates allowed) is a classic example. These concepts model real-world selection scenarios mathematically.

03

Derangements (Complete Permutations)

Derangement counts arrangements where no element appears in its original position. Denoted !n, calculated as !n = n! × (1/0! - 1/1! + 1/2! - ... + (-1)^n/n!). For 3 people randomly picking hats, !3 = 2 (arrangements BCA, CAB where none gets their own hat). Used in probability theory, Secret Santa games, and card shuffling problems.

04

Probability Calculations Using Permutations and Combinations

Solving probability problems requires calculating total outcomes and specific event outcomes. Drawing 5 cards from 52 uses combinations for total possibilities (C(52,5)). Applied to poker flush probability, lottery odds, password cracking difficulty, and more. Correctly distinguishing permutations from combinations is the first step to accurate probability calculations.

05

Factorial Concepts and Fast Calculation Methods

Factorial (n!) is the product of all integers from 1 to n, fundamental to permutations and combinations. 5! = 120, 0! = 1 by definition. Factorials grow rapidly (10! = 3,628,800, 20! ≈ 2.4×10^18), requiring overflow precautions. Stirling's approximation estimates large n: n! ≈ √(2πn) × (n/e)^n. Widely used in algorithm complexity analysis and statistical distribution calculations.

06

Real-Life Applications - Selection and Arrangement Problems

Permutations and combinations appear throughout daily life: selecting 3 from 5 meeting attendees (C(5,3)=10), creating 4-digit passwords (10^4=10,000), seating 10 people in 3 chairs (P(10,3)=720), choosing 2 ice cream scoops from 5 flavors (H(5,2)=15). Essential for algorithm design, data structure analysis, probability simulation in programming. This calculator helps analyze complex real-world problems mathematically for optimal decision-making.

Frequently asked questions

When should I use permutation (nPr) versus combination (nCr)?
Use permutation when the order of the selected results matters, and combination when it does not. For example, electing distinct roles like president and vice-president is a permutation, while simply picking 3 representatives is a combination.
Why can't I enter very large values of n?
This calculator supports n up to 170. Beyond that, factorial values exceed the range that floating-point numbers can represent accurately, so the limit prevents incorrect results.
When would I use permutation or combination with repetition?
Use permutation with repetition (n^r) when repeats are allowed and order matters, like a 4-digit PIN. Use combination with repetition (H(n,r)) when repeats are allowed but order does not matter, like choosing several scoops of ice cream from a set of flavors.
What are derangements (!n) used for in real life?
Derangements count arrangements where nothing ends up in its original spot — useful for assigning Secret Santa names so no one draws themselves, or calculating the probability that every letter ends up in the wrong envelope.
Why does the calculator show an error when r is greater than n?
You cannot select more items than exist in the set. Both permutations and combinations require r ≤ n, and the calculator flags an error whenever that condition is violated.