Combinations and Permutations Calculator
Free Combinations permutations Calculator for sequences. Enter values to get step-by-step solutions with formulas and graphs.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Combinations and Permutations Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: P(n,r) = n!/(n-r)! | C(n,r) = n!/(r!(n-r)!)
Worked example โ 13,983,816 possible combinations | Winning probability: 1 in ~14 million
Formula
P(n,r) = n!/(n-r)! | C(n,r) = n!/(r!(n-r)!)
P(n,r) counts ordered arrangements of r items from n distinct items. C(n,r) counts unordered selections. With repetition: P = n^r and C = (n+r-1)!/(r!(n-1)!). The factorial n! equals the product of all integers from 1 to n.
Worked Examples
Example 1: Lottery Probability
Problem:A lottery draws 6 numbers from 49 balls (without repetition, order does not matter). How many possible outcomes exist?
Solution:This is a combination without repetition: C(49, 6) C(49,6) = 49! / (6! x 43!) = (49 x 48 x 47 x 46 x 45 x 44) / (6 x 5 x 4 x 3 x 2 x 1) = 10,068,347,520 / 720 = 13,983,816 Probability of winning = 1 / 13,983,816
Result:13,983,816 possible combinations | Winning probability: 1 in ~14 million
Example 2: Password Possibilities
Problem:How many 4-character passwords can be made from 26 lowercase letters? Calculate both with and without repetition.
Solution:With repetition (letters can repeat): P = 26^4 = 456,976 passwords Without repetition (all letters unique): P(26,4) = 26! / 22! = 26 x 25 x 24 x 23 = 358,800 Difference = 456,976 - 358,800 = 98,176 Repetition adds 27.4% more possibilities
Result:With repetition: 456,976 | Without: 358,800 | 27.4% more with repetition
Frequently Asked Questions
What is the difference between combinations and permutations?
The fundamental difference is whether order matters. Permutations count arrangements where order is important: choosing president, vice president, and treasurer from 10 people is a permutation problem because the same 3 people in different roles count as different outcomes. Combinations count selections where order does not matter: choosing 3 committee members from 10 people is a combination problem because the same 3 people form only one committee regardless of selection order. The permutation count is always greater than or equal to the combination count for the same n and r values because permutations count each unordered group multiple times.
What are the formulas for permutations and combinations?
Permutations without repetition: P(n,r) = n! / (n-r)!, which counts ordered arrangements of r items from n distinct items. Combinations without repetition: C(n,r) = n! / (r!(n-r)!), which counts unordered selections. With repetition allowed, permutations become n^r (each of the r positions can be any of the n items). Combinations with repetition use the multiset formula: C(n+r-1, r) = (n+r-1)! / (r!(n-1)!). The exclamation mark denotes factorial, where n! equals n times (n-1) times (n-2) down to 1. These formulas are cornerstone tools in combinatorics and probability theory.
When should I use permutations versus combinations in word problems?
Use permutations when the problem involves arrangement, ordering, ranking, or assigning distinct roles. Key phrases include: arrange, order, rank, first/second/third, sequence, password, PIN, license plate, and schedule. Use combinations when the problem involves selection, grouping, or choosing without regard to order. Key phrases include: choose, select, committee, team, group, hand of cards, and subset. A helpful test: if swapping two selected items creates a different outcome, use permutations. If swapping does not change anything, use combinations. For example, a 4-digit PIN uses permutations (1234 differs from 4321), while choosing 4 pizza toppings uses combinations.
What does repetition mean in permutations and combinations?
Repetition (also called replacement) means items can be selected more than once. Without repetition, once an item is chosen, it cannot be chosen again, like dealing cards from a deck. With repetition, items remain available for subsequent selections, like rolling a die multiple times where each roll can produce any number. A 4-digit PIN with repetition has 10^4 = 10,000 possibilities (each digit can be 0-9 regardless of other digits). Without repetition, the same PIN has 10 x 9 x 8 x 7 = 5,040 possibilities. Real-world scenarios with repetition include passwords, dice rolls, and sampling with replacement. Without repetition includes lottery draws and card dealing.
How are combinations used in probability calculations?
Combinations form the foundation of many probability calculations. The probability of an event equals favorable outcomes divided by total outcomes, and both are often calculated using combinations. For a lottery drawing 6 numbers from 49, the total outcomes are C(49,6) = 13,983,816. The probability of matching all 6 is 1/13,983,816. In card games, the probability of being dealt a flush in poker requires calculating C(13,5) x 4 favorable hands divided by C(52,5) total hands. The binomial probability formula uses combinations directly: P(X=k) = C(n,k) x p^k x (1-p)^(n-k), which calculates the probability of exactly k successes in n trials.
What is the relationship between combinations and Pascals triangle?
Each entry in Pascals triangle equals a specific combination value. Row n, position r gives C(n,r). Row 0 is just 1. Row 1 is 1, 1. Row 2 is 1, 2, 1. Row 3 is 1, 3, 3, 1. Row 4 is 1, 4, 6, 4, 1. Each number is the sum of the two numbers above it, which corresponds to the identity C(n,r) = C(n-1,r-1) + C(n-1,r). This identity has a beautiful combinatorial interpretation: to choose r items from n, either include the nth item (choosing r-1 more from n-1) or exclude it (choosing all r from n-1). Pascals triangle also reveals binomial coefficients used to expand expressions like (a+b)^n.
How do I calculate permutations and combinations for large numbers?
For large values of n, direct factorial computation can overflow even 64-bit numbers (n! exceeds standard number limits around n=170). Several strategies exist for handling large values. Use logarithms: log(C(n,r)) = log(n!) - log(r!) - log((n-r)!) where log(n!) can be approximated by Stirlings formula: n*log(n) - n + 0.5*log(2*pi*n). Compute iteratively to avoid large intermediate values: C(n,r) = product of (n-i)/(i+1) for i from 0 to r-1. Use symmetry: C(n,r) = C(n,n-r), so always compute with the smaller of r and n-r. Programming languages like Python handle arbitrary precision integers natively, making large factorial computations straightforward.
What are real-world applications of combinations and permutations?
Combinations and permutations appear in cryptography, genetics, computer science, and everyday life. Password security depends on permutation counts: an 8-character password from 62 alphanumeric characters has 62^8 = 218 trillion possibilities. Genetic combinations determine possible offspring traits: two parents heterozygous for 10 genes can produce 3^10 = 59,049 different genotype combinations. Sports brackets use combinations to determine possible matchups. DNA sequence analysis counts permutations of nucleotide bases. Network routing finds the number of possible paths through nodes. Quality control uses combinations to determine sample sizes for inspection. Even ice cream shops calculate combinations to know how many sundae varieties they can offer.
What is the multiplication principle and how does it relate to permutations?
The multiplication principle (also called the counting principle or rule of product) states that if one event can occur in m ways and a second independent event can occur in n ways, then the two events can occur together in m x n ways. This principle is the foundation of permutation formulas. P(n,r) applies the multiplication principle sequentially: the first position has n choices, the second has n-1 choices, down to n-r+1 choices for the last position. Multiplying these gives n x (n-1) x ... x (n-r+1) = n!/(n-r)!. With repetition, each position independently has n choices, giving n x n x ... x n = n^r. The multiplication principle extends to any number of sequential decisions.
How do combinations with repetition work and where are they used?
Combinations with repetition, also called multisets, count the ways to choose r items from n types when each type can be selected multiple times and order does not matter. The formula is C(n+r-1, r). A classic example is choosing 5 donuts from 3 flavors: C(3+5-1, 5) = C(7,5) = 21 ways. This is equivalent to the stars and bars method in combinatorics, where you distribute r identical items into n distinct bins. Other applications include distributing identical coins among friends, choosing quantities of different ice cream scoops, and polynomial coefficient counting. The concept is fundamental in statistical mechanics for counting particle distributions.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎAnnulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
๐งฎArea Calculator
Calculate area with inputs, formulas, and instant results.
๐งฎArea of a Rectangle Calculator
Calculate the area, perimeter, and diagonal of a rectangle. Find missing sides from known area. Convert between metric and imperial area units.
๐งฎArea of Crescent Calculator
Calculate area of crescent with inputs, formulas, and instant results.
๐งฎCenter of Mass Calculator
Calculate center of mass with inputs, formulas, and instant results.
๐งฎCentroid Calculator
Calculate centroid with inputs, formulas, and instant results.
๐งฎChord Length Calculator
Calculate chord length with inputs, formulas, and instant results.
๐งฎConic Sections Calculator
Calculate conic sections with inputs, formulas, and instant results.