How many ways can you choose 3 from 15?

    How many ways can you choose or arrange items from a set? Enter n and r to get combinations C(n,r), permutations P(n,r), and variations with repetition instantly.

    Picking 3 items out of 15, counted both ways. Combinations answer how many distinct groups exist when the order inside a group is irrelevant, which is the question behind committees, hands of cards and lottery lines. Permutations answer the same thing when order matters, which is the question behind podium places and passwords, and the figure is always larger. Both formulas are shown worked through rather than just applied, and you can change either number below.

    Parameters

    Enter data for calculations

    Total number of elements in the set

    How many elements to choose

    Form progress0 / 2 fields

    💡 Fill in all required fields to unlock the calculate button

    What does this calculator compute?

    Enter two numbers - n (the total elements in a set) and r (the number you want to choose) - and this calculator returns three results at once. Combinations C(n,r) tells you how many ways you can select r items when order does not matter. Permutations P(n,r) tells you how many ways you can arrange r items when order counts. Variations with repetition (n^r) tells you how many sequences are possible if the same element can appear more than once. All three formulas use the same inputs but answer fundamentally different counting questions.

    Quick start example
    A committee of 12 people needs to choose 4 members for a task force. Enter n = 12, r = 4 and click Calculate.
    Combinations: 495 (how many different groups of 4 can be formed)
    Permutations: 11,880 (how many ordered arrangements of 4 from 12)
    Variations with repetition: 20,736 (if the same person could fill multiple slots)

    The three formulas explained

    Type Formula Order matters? Repetition? Example
    Combinations C(n,r) n! / (r!(n-r)!) No No Lottery picks, team selection
    Permutations P(n,r) n! / (n-r)! Yes No Race results, officer election
    Variations with rep. n^r Yes Yes PIN codes, passwords, dice

    The relationship between them is simple: permutations = combinations x r!. When order does not matter, you divide by the number of ways to rearrange the selected elements (which is r!). When repetition is allowed, every position has n independent choices, giving n^r total sequences.

    Reference table - common values

    Scenario n r C(n,r) P(n,r) n^r
    Lottery 6 from 49 49 6 13,983,816 10,068,347,520 13,841,287,201
    Poker hand (5 from 52) 52 5 2,598,960 311,875,200 380,204,032
    Team of 3 from 10 10 3 120 720 1,000
    Committee of 4 from 20 20 4 4,845 116,280 160,000
    Ice cream 2 scoops from 8 flavours 8 2 28 56 64
    PIN code 4 digits from 10 10 4 210 5,040 10,000

    Practical examples

    Example 1 - lottery ticket
    A national lottery draws 6 numbers from 49. Since only which numbers are drawn matters (not the order they come out), this is a combinations problem. C(49, 6) = 49! / (6! x 43!) = 13,983,816. Your chance of winning the jackpot with one ticket is roughly 1 in 14 million. Enter n = 49, r = 6 to verify.
    Example 2 - electing a board
    A club with 15 members needs to elect a president, vice-president, and treasurer. The roles are distinct so order matters: P(15, 3) = 15 x 14 x 13 = 2,730. If the three positions were interchangeable (just "pick any three for the board"), the answer would be C(15, 3) = 455. The permutation count is exactly 3! = 6 times larger.
    Example 3 - pizza toppings
    A pizza menu has 12 toppings. You choose 3. Since the order in which you add toppings does not change the pizza, this is a combination: C(12, 3) = 220 possible three-topping pizzas. If each topping slot were ordered (first, second, third), permutations would give P(12, 3) = 1,320 - but pizza toppings do not have positions.
    Example 4 - poker hands
    A standard deck has 52 cards. A poker hand is 5 cards where the order of dealing does not matter. C(52, 5) = 2,598,960 distinct hands. This is the base number used to calculate poker hand probabilities: there are 4 royal flushes out of 2,598,960 possible hands, giving a probability of about 0.000154%.
    Example 5 - assigning students to desks
    A classroom has 30 students and 30 desks. The number of seating arrangements is P(30, 30) = 30! = 2.65 x 10^32 - an astronomical number. If you only seat 5 students in a row of 5 desks, P(30, 5) = 30 x 29 x 28 x 27 x 26 = 17,100,720. Each position is distinct (desk 1 vs desk 2), so permutations apply.
    Example 6 - combinations vs variations with repetition
    An ice cream shop has 8 flavours and you pick 2 scoops. If you cannot repeat the same flavour: C(8, 2) = 28 combinations. If you can order two scoops of the same flavour (repetition allowed) and order matters (first scoop vs second scoop): 8^2 = 64 variations. The ratio 64/28 = 2.29x shows how repetition and ordering expand the count. Enter n = 8, r = 2 to see all three values.

    When to use which formula

    Choosing the right formula comes down to two questions:

    • Does order matter? If {A, B, C} and {C, B, A} are different, use permutations. If they are the same, use combinations.
    • Can elements repeat? If the same item can appear twice, you need the repetition formula (n^r). If each item can appear at most once, use the non-repetition versions.
    • Combinations: lottery draws, team selection, pizza toppings, committee formation, card hands.
    • Permutations: race finishing orders, password characters without reuse, ranked lists, officer elections.
    • Variations with repetition: PIN codes, passwords with character reuse, dice rolls, multiple-choice test answers.

    The relationship between C(n,r) and P(n,r)

    Permutations count every ordered arrangement. Combinations ignore order. Since r selected items can be rearranged in r! ways, dividing the number of permutations by r! gives the number of combinations: C(n,r) = P(n,r) / r!. Equivalently, P(n,r) = C(n,r) x r!. For n = 10 and r = 3: P(10, 3) = 720, C(10, 3) = 120, and 720 / 6 = 120. This ratio (r! = 3! = 6) holds for all valid n and r.

    When r = n (choosing all elements), the formula simplifies: C(n, n) = 1 (there is only one way to choose all items) and P(n, n) = n! (the number of ways to arrange all n items in a line).

    FAQ

    What is the difference between combinations and permutations?
    Both select r elements from a set of n. Combinations count unordered groups: choosing Alice, Bob, Carol is the same as choosing Carol, Alice, Bob. Permutations count ordered sequences: president=Alice, VP=Bob, treasurer=Carol is different from president=Carol, VP=Alice, treasurer=Bob. For the same n and r, permutations always outnumber combinations by a factor of r! because each combination can be internally rearranged in r! ways.
    What happens when r equals n?
    When r = n, you are choosing all elements from the set. C(n, n) = 1 because there is exactly one way to select the entire set (you pick everything). P(n, n) = n! because while the selection is fixed, the order still varies. For 5 books on a shelf: C(5, 5) = 1 selection (all books), but P(5, 5) = 120 arrangements.
    What if r is greater than n?
    Without repetition, it is impossible to choose more elements than exist. Both C(n,r) and P(n,r) are 0 when r > n (the factorial of a negative number is undefined in this context). The calculator returns 0 for both values. With repetition, r can exceed n because elements can be reused - this is why the variations with repetition (n^r) still returns a positive number even when r > n.
    What is the binomial coefficient?
    The binomial coefficient "n choose r" is another name for C(n,r). It appears in the binomial theorem: (a + b)^n = sum of C(n,r) x a^(n-r) x b^r for r from 0 to n. The coefficients of Pascal's triangle are exactly the values of C(n,r) for each row n and position r. So C(5,2) = 10 means the third entry in the fifth row of Pascal's triangle is 10.
    How large can n be before the calculator loses precision?
    JavaScript uses 64-bit floating-point numbers, which represent integers exactly up to 2^53 (about 9 quadrillion). For combinations, C(n,r) stays within this limit for most practical inputs (e.g. C(100, 50) is about 10^29, which exceeds exact precision). For n up to about 170, n! itself overflows to Infinity. The calculator handles typical textbook problems (n up to 50-60) with exact results. For very large n, results may be approximate.
    Why is variations with repetition always the largest number?
    Variations with repetition (n^r) counts the maximum possible sequences because it imposes the fewest restrictions: every position can use any element, including ones already used. Removing repetition (permutations) reduces the count because each subsequent position has fewer available elements. Removing order (combinations) reduces it further because multiple sequences collapse into one group. So for any given n and r where r is at most n: n^r >= P(n,r) >= C(n,r).

    Related tools

    Variations with Repetition Calculator

    Dedicated calculator for n^k with brute-force time estimate and security classification - Open calculator

    Probability Calculator

    Calculate event probability as fraction, percentage and odds in four modes - Open calculator

    Factorial Calculator

    Compute n! for any non-negative integer - the building block of all combinatorics formulas - Open calculator

    Percentage Calculator

    Calculate X% of a number, find what percent X is of Y, or compute percentage change - Open calculator

    Powers & Roots Calculator

    Compute any base raised to any exponent or extract any root - the core of n^r - Open calculator

    Calculator verified by the LiczGrupa.pl team

    Content, formulas and results have been reviewed for accuracy and relevance by our team of specialists.

    Krystian Szyszka

    Reviewed by: Krystian Szyszka