Combination Calculator

Inputs
Result
Your result
Enter values and calculate to see the answer here.

Selecting a subset of items from a larger pool requires defining the total set size (n) and the number of items to be chosen (k). When the order of selection…

Introduction

A visual representation showing a set of four distinct items being grouped into pairs where order does not matter
A visual representation showing a set of four distinct items being grouped into pairs where order does not matter

It is the number of ways to choose k items from n without regard to order. Also written nCk or n choose k.

You cannot choose more items than exist in the set.

Combinations ignore order; permutations count each ordering separately.

Selecting a subset of items from a larger pool—where the sequence of selection holds no weight—defines the core of combinatorial analysis. Whether you are calculating the number of possible starting lineups from a roster or determining the unique pairings in a round-robin tournament, the logic remains fixed on the size of the set (n) and the number of items chosen (k).

This combination calculator automates the factorial-based math required to find these subsets without the manual overhead of listing every permutation. Unlike arrangements where order dictates a different outcome, combinations treat the group {A, B} as identical to {B, A}.

TermDefinitionRole in Calculation
nTotal itemsThe size of the source pool
kItems chosenThe size of the subset
C(n, k)CombinationThe final count of unique groups

If the order of your selection changes the outcome, you are looking for a permutation, not a combination. Use this tool only when the arrangement within the group is irrelevant.

Why order matters in selection

  • Combinations: Selecting 3 players for a committee (order doesn't change the committee).
  • Permutations: Assigning 3 players to specific roles like Captain, Goalie, and Striker (order changes the outcome).
  • Constraints: The pool size (n) must always be greater than or equal to the subset size (k).

When you input your values, the tool applies the standard formula to ensure accuracy across large datasets where manual counting becomes prone to human error.

Factoring in Extra Payments

If you are using this combination calculator to model a scenario where you contribute additional capital—like an extra monthly principal payment or a one-time lump sum—the standard formula needs a manual adjustment. The calculator assumes a static set of inputs, but real-world financial growth often involves variable contributions that shift the total outcome.

When you add extra payments, you are essentially creating a series of smaller, independent combinations that compound differently than your initial principal. You must calculate the base combination first, then treat the extra payments as a separate calculation to avoid overestimating your final result.

Payment TypeImpact on CombinationCalculation Adjustment
Monthly AdditionIncreases base set sizeAdd to n per period
Lump SumIncreases total poolAdd to n at time t
Fee/PenaltyReduces net yieldSubtract from r or n

Treat extra payments as distinct events. If you mix them into the primary calculation, you will inflate your results by assuming the extra capital was present from day one.

To keep your projections accurate, follow these steps:

  • Calculate the base combination using your starting principal.
  • Run a separate calculation for each lump sum or recurring extra payment.
  • Sum the results of these individual calculations to find your total.
  • Verify the final figure against your total capital input to ensure no double-counting occurred.

When pulling together roster options or sorting out tournament brackets, you often start with a target group size but lack the exact subset limits for your slot count. Missing a required parameter breaks standard counting formulas instantly. Instead of guessing your k value, isolate the fixed constraints first.

Unknown ParameterWhat You Need to KnowHow to Derive It
Subset size (k)Total items selected per groupCheck team roster limits or match caps
Total pool (n)Entire population availableSubtract ineligible entries from the master list
Order relevanceDoes sequence change the outcome?If yes, switch to permutations; if no, use standard combinations

Counting without defined boundaries turns a straightforward subset calculation into an unbounded factorial loop.

  • List all absolute constraints before feeding numbers into a combination calculator.
  • Verify whether duplicate items exist in your source pool.
  • Test your derived k value against a small, manually countable subset (like 4 choose 2).

You have 10 months left on a car loan. You decide to make extra principal payments in exactly 3 of those remaining months to chip away at the balance. The order in which you select these months does not change the financial outcome—choosing months 2, 5, and 8 is identical to choosing months 8, 5, and 2.

To find the total number of unique payment schedules you can design, you use a combination formula. The remaining loan term represents your pool (n), and the number of milestone payments is your sample size (r).

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

For a remaining term of 10 months where you select 3:

C(10, 3) = (10!)/(3!(10 - 3)!) = (10 × 9 × 8)/(3 × 2 imes 1) = 120

There are exactly 120 distinct ways to distribute those three extra payments across your remaining timeline.

Remaining Term (n)Prepayment Months (r)Formula SetupUnique Combinations
6 months26! / (2! * 4!)15
12 months312! / (3! * 9!)220
24 months424! / (4! * 20!)10,626

Order independence is the defining trait of a combination. If swapping the sequence of your chosen months yields the same budget plan, use combinations instead of permutations.

To verify if your remaining loan term scenario requires a combination calculation, check these criteria:

  • The total pool of remaining periods (n) consists of distinct, individual months or quarters.
  • You are selecting a specific subset (r) of these periods for a uniform action, like refinancing or making extra payments.
  • The sequence of selection does not create a different financial strategy.

Are the calculators on our site free to use?

Every tool on this site, including the combination calculator, is free to use without a subscription or account registration. We built these utilities to handle the heavy lifting of combinatorial math—like calculating the number of ways to pick a starting lineup or selecting a committee—so you can focus on the logic rather than the arithmetic.

FeatureStatus
AccessUnlimited
RegistrationNot Required
Cost$0.00
Data LimitsNone

We do not gate our math tools behind paywalls or email captures. If you find the results useful, you are free to bookmark the page and return as often as your projects require.

Our commitment to open access means you can run as many permutations as you need for your homework, research, or data analysis. We prioritize speed and accuracy over monetization, ensuring you get the exact count of combinations for your specific set of items every time.

  • No hidden fees: You will never be asked for payment to view a result.
  • No tracking: We do not store your input values or personal data.
  • No usage caps: Run the same calculation a thousand times if your workflow demands it.

Combinations Calculator

This section covers combinations calculator for the Combination Calculator.

How to use

When you need to determine the number of ways to select a subset of items from a larger pool where the order of selection is irrelevant, you are dealing with a combination. Whether you are calculating lottery odds, committee assignments, or team rosters, the process requires two specific inputs: the total number of items available (n) and the number of items you intend to choose (k).

To get an accurate result from this combination calculator, follow these steps:

  1. Enter the total number of items in the set into the 'n' field.
  2. Input the number of items to be selected into the 'k' field.
  3. Click 'Calculate' to see the total number of unique groupings.
InputDescriptionConstraint
nTotal items in the setMust be a positive integer
kItems to be chosenMust be 0 ≤ k ≤ n
ResultTotal unique combinationsAlways a non-negative integer

The order of selection does not matter in combinations. If you pick Alice then Bob, it is the same as picking Bob then Alice.

If you find yourself needing to account for the sequence of selection—such as assigning specific roles like President or Treasurer—you are looking for a permutation rather than a combination. Using the wrong tool will result in an inflated count because it treats different orderings of the same items as distinct outcomes.

Defining the Selection Set

When you build a committee from a larger pool, you are dealing with two distinct entities: the total population size (n) and the subset size (r). In a combination, the order of selection is irrelevant—picking Alice then Bob is identical to picking Bob then Alice. This distinguishes a combination from a permutation, where the sequence of the selection changes the outcome.

EntitySymbolDefinition
Total PoolnThe total number of unique items available to choose from.
Subset SizerThe number of items you are selecting from the pool.
Factorial!The product of an integer and all integers below it (e.g., 4! = 4 × 3 × 2 × 1).
CombinationC(n, r)The total number of unique ways to choose r items from n.

If you find yourself caring about the specific order of your picks—like assigning roles or ranking winners—you are working with permutations, not combinations.

To keep your calculations accurate, remember these constraints:

  • n must be a non-negative integer: You cannot have a negative number of items in a pool.
  • r cannot exceed n: You cannot select more items than exist in your total pool.
  • r must be at least zero: Selecting zero items is mathematically defined as one way (the empty set).

When training models or optimizing search algorithms, you often need to calculate the number of ways to select subsets from a larger pool without regard to order. If your system is evaluating a feature set of 50 variables and needs to select 5 for a specific model iteration, the number of possible combinations grows exponentially, quickly hitting the limits of standard 64-bit integer storage.

OperationMathematical NotationComputational Complexity
Small Set SelectionnCrO(k)
Large Set Factorialsn! / (k!(n-k)!)O(n)
Overflow Riskn > 67High

Always use multiplicative formulas to calculate combinations. Computing the full factorial of large numbers before division will trigger integer overflow errors in most programming environments.

To integrate this logic into your pipeline, follow these constraints:

  • Pre-calculate factorials: Use memoization for values of n up to 100 to save cycles.
  • Logarithmic space: For extremely large n, compute the sum of logarithms of the factorials to avoid precision loss.
  • Symmetry property: Remember that nCr is equal to nC(n-r), which allows you to reduce the number of iterations by choosing the smaller of r or n-r.

The Handshake Problem

Imagine a room of 10 people where everyone greets each other exactly once. You might assume you just multiply 10 by 9, but that counts every handshake twice—once for each person involved. To find the unique number of interactions, you must divide by two, which is the core logic behind a combination.

ScenarioCalculationUnique Handshakes
3 people(3 × 2) / 23
5 people(5 × 4) / 210
10 people(10 × 9) / 245

Order does not matter in a handshake. If Person A shakes hands with Person B, it is the same event as Person B shaking hands with Person A. This is why we use combinations rather than permutations.

When calculating these social pairings, keep these constraints in mind:

  • The formula n(n−1)/2 only applies to single, mutual interactions.
  • If you add a person to the room, the number of handshakes increases by the number of people already present.
  • This logic assumes no one skips a handshake or shakes hands with themselves.

Selecting Your Set

Imagine you are picking a starting lineup for a basketball team from a roster of 12 players. The coach cares only about who makes the cut, not the order in which their names are called. If you pick Player A then Player B, it is the same group as picking Player B then Player A. This is the core of a combination: the selection is a set where order is irrelevant.

When you use a combination calculator, you are determining how many unique subsets of size r can be pulled from a larger pool of n items. If the order of selection mattered—like assigning specific positions (Point Guard, Center, etc.)—you would be dealing with a permutation instead.

Selection TypeOrder Matters?ExampleFormula Logic
PermutationYesRace finish (1st, 2nd, 3rd)n! / (n−r)!
CombinationNoHand of cardsn! / (r! × (n−r)!)

If you can swap any two items in your result and the outcome remains identical, you are working with a combination.

To define your set correctly, keep these criteria in mind:

  • Pool Size (n): The total number of distinct objects available to choose from.
  • Subset Size (r): The number of objects you are selecting at one time.
  • Replacement: Standard combinations assume you do not put an item back once it is chosen.
  • Distinctness: All items in the pool must be unique for the standard formula to hold.

When you select a subset of items where the order of selection is irrelevant, you are working with combinations. Unlike permutations, where picking 'A then B' is distinct from 'B then A', a combination treats the set {A, B} as identical to {B, A}. The math relies on the factorial function, denoted by the exclamation point, which represents the product of all positive integers up to that number.

The Combination Formula

The standard formula for calculating combinations, often written as nCr or C(n, k), is:

C(n, k) = n! / (k! * (n − k)!)

In this expression, 'n' represents the total number of items in the set, and 'k' represents the number of items you are choosing. The division by k! effectively removes the duplicate arrangements that occur when order does not matter.

TermDefinitionRole in Calculation
nTotal itemsThe size of the pool
kChosen itemsThe size of the subset
n!n factorialTotal permutations of n
k!k factorialRedundant orderings to remove

Think of the denominator as a filter. It strips away the 'order-dependent' noise, leaving you with only the unique groupings.

To verify your manual work, keep these constraints in mind:

  • n must be a non-negative integer.
  • k must be less than or equal to n.
  • If k is 0, the result is always 1 (there is only one way to choose nothing).
  • If k equals n, the result is always 1 (there is only one way to choose everything).

When you need to select a subset of items where the order of selection is irrelevant, you are working with combinations. Unlike permutations, where picking 'A then B' is distinct from 'B then A', a combination treats the group as a single set. The math relies on the factorial function, denoted by the exclamation point, which represents the product of all positive integers up to that number.

The Combination Formula

To calculate the number of ways to choose r items from a total pool of n items, use the following formula:

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

VariableDefinitionRole
nTotal itemsThe size of the set you are choosing from
rChosen itemsThe number of items to select
$!$FactorialThe product of all integers from 1 to n

The denominator r! is the key. It divides out the redundant orderings that would otherwise inflate your count if order mattered.

Key Components of the Calculation

  • Factorial Scaling: Factorials grow rapidly; 10!$ is 3,628,800, so calculators are essential for large sets.
  • Constraint: n must be greater than or equal to r. If r > n, the result is mathematically zero.
  • Symmetry: Choosing r items is the same as leaving behind n-r items, meaning C(n, r) = C(n, n-r).

When you select a subset of items where the order of selection is irrelevant, you are dealing with combinations. Whether you are picking a starting lineup from a roster or choosing toppings for a pizza, the math remains the same: you want to know how many unique groups exist without counting the same set twice.

The Combination Formula

To calculate the number of combinations, denoted as C(n, k) or "n choose k," you take the total number of items (n) and divide by the number of ways to arrange the chosen subset (k). The formula is:

C(n, k) = n! / (k! * (n − k)!)

SymbolRepresentsRole in Calculation
nTotal itemsThe size of the pool
kChosen itemsThe size of each group
!FactorialMultiplies all integers down to 1

The factorial operator is the engine here. It accounts for all possible permutations, and dividing by k! strips away the duplicates caused by order.

To compute this manually, follow these steps:

  1. Calculate the factorial of the total pool (n!).
  2. Calculate the factorial of the subset size (k!).
  3. Calculate the factorial of the difference (n − k)!.
  4. Divide the first result by the product of the second and third.

If you have 5 players and need to choose 3 for a drill, the math looks like 5! / (3! 2!). This simplifies to 120 / (6 2), resulting in 10 unique combinations.

Imagine you are picking a starting lineup for a basketball game. If you choose Player A then Player B, you have the same starting duo as choosing Player B then Player A. The order of selection does not change the outcome of the group. This is the fundamental logic behind combinations.

When you use a combination calculator, you are stripping away the importance of sequence. Unlike permutations, where the order of items creates a distinct arrangement, combinations focus strictly on the membership of the set.

ScenarioOrder Matters?Mathematical Concept
Picking a team of 3 from 10NoCombination
Assigning 1st, 2nd, 3rd placeYesPermutation
Selecting a 4-digit PINYesPermutation
Choosing 5 cards for a handNoCombination

If you can swap the positions of your selected items without changing the result, you are dealing with a combination, not a permutation.

To determine the number of ways to group items, the formula divides the total number of arrangements by the number of ways those items can be reordered. This prevents overcounting the same group multiple times.

  • Identify the total pool size (n).
  • Determine the number of items to select (k).
  • Apply the factorial division to remove redundant sequences.

How to use

Selecting a subset of items from a larger pool requires defining the total set size (n) and the number of items to be chosen (k). When the order of selection does not change the outcome—such as picking a starting lineup from a roster or choosing toppings for a pizza—you are calculating combinations rather than permutations.

Inputting your values

To get an accurate result from the combination calculator, enter your values into the designated fields:

FieldDescriptionExample Input
Total items (n)The size of the entire pool10
Items to choose (k)The number of items selected3

Order is irrelevant in combinations. If picking Alice then Bob is the same as picking Bob then Alice, use this tool instead of a permutation calculator.

Follow these steps to ensure your calculation matches your specific scenario:

  1. Identify the total number of distinct items available in your set.
  2. Determine the exact number of items you need to select for your group.
  3. Input these integers into the calculator; the tool automatically applies the factorial-based formula to find the number of unique groupings.
  4. Verify the result against your constraints, ensuring that n is greater than or equal to k.

If your calculation results in a value of 1, check if your k value equals your n value or if k is zero. In these cases, there is only one way to select the entire set or to select nothing at all.

Units

Check the units next to each field. Use consistent units for all inputs so the unit of the result matches what you expect.

Understanding the inputs and units

When you use a combination calculator, you are dealing with two distinct counts: the total set size and the size of the subset you are pulling. Think of it like a roster for a relay team. If you have 20 athletes on the track team (n) and you need to choose 4 to run the 4x100 relay (k), the order in which you pick them does not change the team composition. You are calculating the number of unique groups, not the number of specific lineups.

InputVariableUnit / DefinitionConstraint
Total ItemsnInteger count of the entire setn ≥ 0
Subset SizekInteger count of items to select0 ≤ k ≤ n
ResultC(n, k)Total unique combinationsInteger ≥ 1

The math breaks if you try to select more items than you have available. Always ensure your subset size (k) is less than or equal to your total pool (n).

Keep these three rules in mind when defining your inputs:

  • Non-negative integers only: You cannot have a negative number of items or a fractional person in a group.
  • Order irrelevance: If the sequence matters (like a combination lock or a race finish), you need a permutation calculation instead.
  • The n-k symmetry: Choosing 3 items out of 10 results in the same number of combinations as leaving 7 items behind. The math naturally accounts for this.

Formula

The math behind the selection

When you need to pick a team of 3 players from a roster of 10, the order in which you call their names doesn't change the lineup. This is the core of a combination: you are counting unique groups where the sequence of selection is irrelevant. To calculate this, we use the binomial coefficient formula, which scales the total number of permutations by removing the redundant orderings.

TermSymbolDefinition
Total itemsnThe size of the full set
Items chosenkThe number of items to select
Factorial!Product of an integer and all integers below it

The formula for combinations is defined as:

C(n, k) = n! / (k! * (n − k)!)

The factorial n! grows aggressively. For large sets, always compute the division before multiplying the final product to avoid overflow errors in your calculator.

To verify this, consider choosing 2 fruits from a set of 4 (Apple, Banana, Cherry, Date). Using the formula:

  1. n = 4, k = 2
  2. 4! / (2! * (4 − 2)!)
  3. 24 / (2 * 2) = 6

There are exactly 6 unique pairs: {A,B}, {A,C}, {A,D}, {B,C}, {B,D}, and {C,D}.

  • n!: The total number of ways to arrange all items.
  • k!: The number of ways to arrange the chosen subset.
  • (n − k)!: The number of ways to arrange the items left behind.
  • Result: The total count of unique, unordered groups.

Example

Calculating Roster Selections

Imagine a high school coach needs to pick 3 starting pitchers from a pool of 10 available players. Because the order in which these pitchers are selected doesn't change the composition of the starting trio, this is a classic combination problem rather than a permutation.

To find the number of possible starting groups, we use the combination formula C(n, k) = (n!)/(k!(n-k)!), where n is the total pool (10) and k is the number of selections (3).

VariableValueDescription
n10Total pool of pitchers
k3Number of pitchers to select
n!3,628,800Factorial of 10
k!(n-k)!42,336Product of factorials

Plugging these values into the formula gives us (3,628,800)/(6 × 5,040), which simplifies to 120 unique starting combinations.

When the order of selection is irrelevant, always use the combination formula. If the specific role (e.g., ace, closer, middle relief) mattered, you would switch to a permutation calculation instead.

To verify your own scenarios, follow these steps:

  1. Identify the total number of items (n) available in your set.
  2. Determine the exact number of items (k) you need to choose.
  3. Input these values into the combination calculator to bypass manual factorial expansion.
  4. Confirm that the result represents unique groups where order does not matter.

A local league needs to select 3 starting captains out of a roster of 10 players. Order does not matter because all three captains share identical duties. Choosing player A then B then C results in the exact same leadership trio as choosing C then A then B.

To find how many unique trios exist, feed the total item pool n = 10 and the sample size k = 3 into the combination formula C(n,k) = (n!)/(k!(n-k)!). The factorial terms expand out until the common factors cancel cleanly.

StepOperationIntermediate valueResult
1Factorials set up(10!)/(3!(10-3)!)(10!)/(3! · 7!)
2Expand numerator(10 × 9 × 8 × 7!)/(3! · 7!)Cancel 7!$
3Multiply remaining(720)/(6)120$ trios

When the selection sequence changes nothing about the outcome, use combinations instead of permutations. Order-blind groupings are always smaller than ordered arrangements.

Keep these operational checks in mind when setting up your own item pools:

  • Verify that n is strictly greater than or equal to k before calculating.
  • Confirm that swapping any two chosen elements leaves the group identity identical.
  • Ensure duplicates are excluded from the initial pool n unless using multiset combinations.

Order Matters: Combinations vs. Permutations

When you pull three names from a hat for a prize, the order of the draw is irrelevant. Whether you are picked first or third, you still walk away with the same reward. This is the core of a combination: a selection where the sequence of items holds no weight.

Contrast this with a race where you need to identify the gold, silver, and bronze medalists. Here, the sequence is everything. If you swap the first and second-place finishers, you have a completely different outcome. That is a permutation.

FeatureCombinationPermutation
Order sensitivityIrrelevantCritical
Typical goalGrouping or setsSequencing or ranking
ExampleChoosing a 3-person teamAssigning 1st, 2nd, 3rd place
Formula logicn! / (r!(n−r)!)n! / (n−r)!

If you can rearrange the items in your set and still call it the same result, you are working with a combination. If rearranging the items creates a new, distinct outcome, you are looking at a permutation.

Keep these distinctions in mind to avoid overcounting your possibilities:

  • Combinations: Focus on the membership of the group (e.g., a hand of cards).
  • Permutations: Focus on the specific arrangement (e.g., a combination lock code).
  • The 'n' factor: In both cases, 'n' represents the total pool of items, while 'r' is the number of items you are selecting.

Limitations

When the Math Breaks: Limits of the Combination Formula

Imagine trying to calculate the number of ways to choose 1,000 starting nodes from a network of 2,000 options. It sounds like a standard task for a combination calculator. But hit enter on a basic computing tool, and you will likely see a blank screen or an "Overflow" error.

The math behind combinations relies on factorials. Factorials grow at an astronomical rate that quickly overwhelms standard computer processors.

Even a relatively small number like 171!$ is larger than 10^308. This exceeds the maximum value a standard 64-bit floating-point variable can hold.

Computing EnvironmentMax n for Direct FactorialWhat Happens Beyond the Limit
Standard JS (64-bit float)170Returns Infinity
Standard Scientific Calculator69Returns Overflow Error
Arbitrary-Precision EnginesMemory-dependentCalculation lag or browser freeze

Factorial growth is faster than exponential growth. If your pool size (n) is above 170, standard calculators will crash unless they use multiplicative cancellation algorithms to simplify the fraction before computing the factorials.

Beyond raw computational limits, the standard combination formula (nCr) fails when your real-world scenario violates its core assumptions:

  • The Repetition Trap: Standard combinations assume you cannot pick the same item twice. If you are choosing five donuts from a tray of three flavors and can repeat flavors, standard nCr will give you the wrong number. You need combinations with repetition instead.
  • Order Sensitivity: If the order of selection matters—like a three-digit lock combination where 1-2-3 is different from 3-2-1—combinations will undercount your options. You need permutations.
  • Fractional Inputs: You cannot choose 2.5items out of 10. Both n and r must be non-negative integers.
  • The r > n Constraint: You cannot choose 10 items from a bag of 8. The math yields a negative factorial in the denominator, which is undefined for integers. The physical result is always 0.

FAQ

Common Questions on Combinations?

If you are picking a starting lineup of 3 players from a roster of 10, the group {Alice, Bob, Charlie} is identical to {Charlie, Alice, Bob}. In a combination, you are selecting a subset where the sequence is irrelevant. If the order of selection changes the outcome—like awarding gold, silver, and bronze medals—you need a permutation instead.