Combinations Calculator
Calculate combinations (nCr) and permutations (nPr) with factorial breakdown.
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the Combinations Calculator
This calculator computes combinations (nCr) and permutations (nPr) for any pair of non-negative integers. It shows the result, the formula used, and a factorial breakdown so you can verify the math or learn the process.
- Choose a mode. Select "Combinations (nCr)" if order does not matter (e.g., choosing a committee). Select "Permutations (nPr)" if order matters (e.g., arranging winners in 1st, 2nd, 3rd place).
- Enter n (total items). This is the total number of items you are choosing from. For example, if you are picking 3 cards from a deck of 52, n is 52.
- Enter r (items chosen). This is the number of items you are selecting. In the card example, r is 3. The value of r cannot exceed n.
- Read the result. The answer updates instantly. The breakdown shows the formula, n!, r! (for combinations), and (n-r)! so you can follow the calculation step by step.
Use the Copy button to grab the result for homework or a spreadsheet. Use Share to send a pre-filled link to a classmate or colleague. The calculator supports values of n up to 170, which is the largest factorial that fits in a JavaScript floating-point number.
About Combinations and Permutations
Combinations and permutations are fundamental concepts in counting and probability. A combination counts how many ways you can choose r items from n items when order does not matter. The formula is C(n, r) = n! / (r! * (n-r)!). A permutation counts the arrangements when order does matter. The formula is P(n, r) = n! / (n-r)!.
These formulas appear throughout mathematics, statistics, and computer science. Combinations are used to calculate binomial coefficients, lottery odds, and the number of possible subsets. Permutations are used for ranking problems, password possibilities, and scheduling.
Frequently Asked Questions
What is the difference between combinations and permutations?
Combinations count selections where order does not matter. Choosing cards A, B, C is the same as choosing C, B, A. Permutations count arrangements where order matters. Arranging A, B, C is different from C, B, A. For the same n and r, there are always more permutations than combinations because each combination can be rearranged in multiple ways.
How do you calculate nCr?
The formula for combinations is C(n, r) = n! / (r! * (n - r)!). For example, C(10, 3) = 10! / (3! * 7!) = 3628800 / (6 * 5040) = 120. This means there are 120 ways to choose 3 items from 10 when order does not matter.
What is a factorial?
A factorial (written as n!) is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120. By convention, 0! = 1. Factorials grow extremely fast. 10! is 3,628,800 and 20! is over 2.4 quintillion.
When should I use combinations vs permutations?
Use combinations when the order of selection does not matter, such as choosing a team, picking lottery numbers, or selecting ingredients. Use permutations when the order matters, such as arranging people in a line, assigning ranked positions (gold, silver, bronze), or creating passwords where "abc" is different from "bca."