Combinations Calculator

QuickCalculators computes combinations nCr, permutations nPr, and combinations with replacement from n and r, showing the factorial expansion when steps are open. Enter n and r, choose the mode, then read the count with the formula that matches whether order matters.

01 calculator

Result

    Worked solution

    QuickCalculators computes combinations nCr, permutations nPr, and combinations with replacement from n and r, showing the factorial expansion when steps are open. Enter n and r, choose the mode, then read the count with the formula that matches whether order matters.

    This page is the canonical combinatorics home for the math hub. Statistics probability tools should link here rather than duplicate counting formulas.

    Calculate combinations (nCr)

    Concept diagram: Inputs leads to combinations (nCr) leads to ResultInputscombinations (nCr)Result
    Calculate combinations (nCr).

    A combination counts unordered selections of r items from n distinct items. The notation C(n, r), nCr, or "n choose r" all name that count. QuickCalculators evaluates the combination when 0 ≤ r ≤ n for nonnegative integers and explains out-of-range inputs.

    Order does not matter in a combination: {A, B} is the same selection as {B, A}. That is the contrast with permutations on the same page.

    Apply the combinations formula

    Formula result = f(inputs), with variables: in is inputs, f is formula, out is resultresult = f(inputs)ininputsfformulaoutresult
    Apply the combinations formula.

    The combinations formula is C(n, r) = n factorial / (r factorial × (n - r) factorial). QuickCalculators expands or cancels factorials in the work panel so the fraction reduces before a giant factorial is fully written when possible.

    Example: C(5, 2) = 5 factorial / (2 factorial * 3 factorial) = (5 * 4) / (2 * 1) = 10. Symmetry C(n, r) = C(n, n - r) follows from the same formula and can cut work when r is large.

    Calculate permutations (nPr)

    Concept diagram: Inputs leads to permutations (nPr) leads to ResultInputspermutations (nPr)Result
    Calculate permutations (nPr).

    A permutation counts ordered arrangements of r items from n. The formula is P(n, r) = n factorial / (n - r) factorial. QuickCalculators evaluates nPr as a mode so set-5 permutation scrapes merge here instead of splitting the cluster.

    Example: P(5, 2) = 5 * 4 = 20. Each unordered pair corresponds to 2 factorial ordered pairs when r = 2, linking P(n, r) = C(n, r) * r factorial.

    Calculate combinations with replacement

    Concept diagram: Inputs leads to combinations with replacement leads to ResultInputscombinations withreplacementResult
    Calculate combinations with replacement.

    Combinations with replacement count unordered selections when repetition is allowed. The standard formula is C(n + r − 1, r). QuickCalculators evaluates that mode so the older combinations-with-replacement tool folds into this page. Example: choosing 2 flavors from 5 with repeats allowed uses C(5 + 2 − 1, 2) = C(6, 2) = 15.

    Clarify whether the story allows repeats before picking the mode.

    Calculate C(5, 2) step by step

    Process with 3 steps: Enter C(5, 2) step by step; Read the main result; Check the breakdown1Enter C(5, 2) step bystep2Read the main result3Check the breakdown
    Calculate C(5, 2) step by step.

    The fixture computes C(5, 2) on QuickCalculators.

    1. Write 5 factorial / (2 factorial * 3 factorial).
    2. Cancel 3 factorial to leave (5 * 4) / (2 * 1).
    3. Compute 20 / 2 = 10.

    Listing the pairs from {1,2,3,4,5} also yields ten unordered pairs, matching the formula.

    List the combinations of a small set

    Concept diagram: Inputs leads to List combinations of a small set leads to ResultInputsList combinations of asmall setResult
    List the combinations of a small set.

    For small n, listing confirms the count. The handshake problem asks how many handshakes occur among 5 people if each pair shakes once, which is C(5, 2) = 10. QuickCalculators can show the list beside the formula for teaching builds.

    Listing fails for large n, which is why the factorial formula matters. When a list and the formula disagree, recount the list for duplicates or missing pairs.

    Avoid this common misconception

    Concept diagram: Inputs leads to Avoid this common misconception leads to ResultInputsAvoid this commonmisconceptionResult
    Avoid this common misconception.

    A common mix-up is using combinations when order matters, such as ranking first and second place. Those stories need permutations. Using nCr for ordered outcomes undercounts by a factor of r factorial. QuickCalculators keeps both modes labeled so the order question is answered before the formula runs.

    Frequently asked questions

    What is a combination?

    A combination is an unordered selection of r items from n. Notation includes C(n, r) and nCr.

    What is C(5, 2)?

    C(5, 2) equals 10. Entering n = 5 and r = 2 in combination mode returns that fixture.

    How do combinations differ from permutations?

    Combinations ignore order; permutations count order. P(n, r) = C(n, r) · r factorial.

    What is the combinations formula?

    The combinations formula is n factorial / (r factorial × (n - r) factorial) for 0 <= r <= n.

    What are combinations with replacement?

    Combinations with replacement allow repeated items in an unordered selection and use C(n + r − 1, r).

    When should you use nPr instead of nCr?

    Use nPr when different orders count as different outcomes, such as passwords with position mattering or race place rankings.

    Summary

    QuickCalculators evaluates nCr, nPr, and combinations with replacement from n and r. The fixture C(5, 2) equals 10. Permutations count order; combinations do not. With-replacement selections use C(n + r − 1, r). Choose the mode from the story before trusting the number.