Permutation & Combination Calculator
How many ways can you choose k items from n? This calculator answers both versions at once: combinations C(n, k) = n! / (k!(n−k)!) when the order of selection does not matter, and permutations P(n, k) = n! / (n−k)! when it does. The factorials n! and k! are shown alongside. Values are computed via log-gamma, so large inputs neither overflow nor lose the answer: results below 10¹⁵ are exact integers, larger ones switch to scientific notation. Classic uses: lottery odds (C(49, 6)), passwords and rankings (permutations), committee selections, card hands like C(52, 5) = 2,598,960.
Frequently asked questions
What is the difference between a permutation and a combination?
Combinations count selections where order is irrelevant (a committee of 3 people); permutations count arrangements where order matters (gold-silver-bronze among 3 winners). Choosing 3 from 10 gives C(10,3) = 120 combinations but P(10,3) = 720 permutations — exactly 3! = 6 times more.
What are the formulas for nCr and nPr?
C(n, k) = n! / (k! (n−k)!) and P(n, k) = n! / (n−k)!. They are linked by P(n, k) = C(n, k) · k!: first choose the k items, then arrange them in every possible order. By convention C(n, 0) = P(n, 0) = 1 and 0! = 1.
How do I know whether order matters in my problem?
Ask whether swapping two selected items produces a different outcome. Lottery numbers, pizza toppings and committees: no → combinations. PIN codes, race podiums, seating arrangements: yes → permutations. If items can also repeat, you need the "with repetition" formulas instead (nᵏ for ordered draws).