Combinations & Permutations
Calculate combinations C(n,k) and permutations P(n,k) with formulas and results for large numbers. Essential for combinatorics.
Combination — C(n,k) — order does NOT matter
Permutation — P(n,k) — order MATTERS
When to use each?
Reach for the Combination C(n,k) whenever the order of the elements is irrelevant. Picture choosing 3 people out of a group of 10 for a committee: who gets picked first makes no difference.
The Permutation P(n,k) comes in when order does matter. That is the case for counting how many podiums (1st, 2nd, 3rd place) a race with 10 drivers can produce, since each position counts.
Combinatorics: formulas and counting
Combinatorial analysis counts arrangements of objects. A permutation of n elements is P(n) = n! — all possible orderings. An arrangement of n objects taken k at a time, where order matters, is A(n,k) = n! / (n−k)!. A combination, where order does not matter, is C(n,k) = n! / (k!·(n−k)!), also written as the binomial coefficient (n choose k). These coefficients are exactly the entries of Pascal's triangle. The fundamental counting principle says: if a process has independent steps with a, b, c… outcomes, the total is a·b·c… Examples: a 4-digit numeric password without repeated digits has A(10,4) = 5040 options; a 5-card poker hand from a standard deck has C(52,5) = 2,598,960 possibilities; Brazil's Mega-Sena lottery (choose 6 of 60) has C(60,6) = 50,063,860.
Applications: probability, cryptography and biology
Combinatorics underpins probability (Laplace's classical formula counts favorable cases over possible cases), cryptography (a k-bit key has 2^k possible values), genetics (allele combinations) and bioinformatics (sequence alignment counts). It is standard content in Brazilian university-entrance exams (ENEM, vestibular).
FAQ
Combination or arrangement? If order matters (podium, password, license plate), use arrangement. If order does not matter (committee, lottery, poker hand), use combination.
What is 0!? By convention, 0! = 1 — this keeps formulas like C(n,0) = 1 consistent.
What if k > n? Both C(n,k) and A(n,k) are 0 — you cannot choose more elements than exist.
Why does C(n,k) = C(n,n−k)? Choosing which k to include is equivalent to choosing which n−k to exclude.
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.