How many ways can things be picked or arranged
This article explains the combinations and permutations calculator, walks through every control, shows worked examples for lottery odds and PIN codes, and clears up the confusion between order mattering and not mattering that trips up most people the first time they meet these formulas.

The four questions hiding behind one
How many ways can you choose things from a set? The answer depends on two decisions. First, does the order matter? Second, can you pick the same item more than once? Those two yes-or-no choices give four different formulas, and using the wrong one gives an answer that can be off by a factor of thousands or millions.
When order does not matter and repeats are not allowed, the result is a combination, written nCr. This is the lottery question: how many different groups of six balls can be drawn from forty-nine?
When order matters and repeats are not allowed, the result is a permutation, written nPr. This is the medal question: how many ways can three runners finish first, second, and third out of ten?
When order matters and repeats are allowed, the answer is a simple power. This is the PIN question: how many four-digit codes are there when each digit can be anything from 0 to 9?
When order does not matter and repeats are allowed, the formula uses what mathematicians call a multiset coefficient. This is the ice cream question: how many ways can you pick three scoops from five flavours if you can repeat a flavour?
The controls on the input panel
The panel on the right is headed The numbers. It holds four controls and a checkbox.
How many to choose from is the total pool. For a lottery with 49 balls, enter 49. For a deck of cards, enter 52. For the digits 0 through 9, enter 10. The default is 49.
How many you pick is the size of the selection. For a six-ball draw, enter 6. For a three-medal podium, enter 3. For a four-digit PIN, enter 4. The default is 6.
Does the order matter is a dropdown with two choices: No, a group is a group, and Yes, first and second are different. The first gives combinations, the second gives permutations.
Can you repeat an item is also a dropdown. No means each item is used once. Yes means you can pick the same thing again. Drawing balls from a bag is no-repeat. Rolling a die is yes-repeat.
Show it as odds and probability is a checkbox. When ticked, the result includes the chance of one specific outcome expressed both as a probability and as odds. This is the line that tells you your lottery ticket has a one in fourteen million chance.
What the output tells you
The main figure is the total number of possible outcomes. For 6 from 49 with no order and no repeats, that number is 13,983,816. That is how many different groups of six can be pulled from the drum.
If the odds checkbox is ticked, a second line shows the probability of matching one specific outcome. For the lottery example that is roughly one in 13,983,816, or about 0.0000072 percent. The odds version of the same fact is approximately 13,983,815 to 1 against.
When the numbers get very large, the tool switches to scientific notation. This happens past about 170 factorial, where the result exceeds what a standard floating-point number can hold. The answer is still correct to the precision your browser allows, but it is written in a compact form rather than as a string of hundreds of digits.
Worked example: lottery odds
A national lottery draws 6 balls from 49. No ball can appear twice and the order they come out does not matter. Set How many to choose from to 49, How many you pick to 6, Does the order matter to No, and Can you repeat an item to No. Tick the odds checkbox.
The result is 13,983,816 combinations. The probability of matching all six is about one in fourteen million. If you bought one ticket a week, on average you would wait about 269,000 years for a win. That number is not a misprint. It is the honest arithmetic that lottery advertising is not required to show.
Now change Does the order matter to Yes. The count jumps to over ten billion. That is how many ways six balls could be drawn if the sequence mattered. Lottery odds are quoted using the smaller figure precisely because the draw order is ignored. That single detail, order not mattering, is what keeps the odds in the millions rather than the billions.
Worked example: PIN codes and passwords
A four-digit PIN uses the digits 0 through 9. Each position can hold any digit, and digits can repeat. Set How many to choose from to 10, How many you pick to 4, Does the order matter to Yes, and Can you repeat an item to Yes.
The result is 10,000. That is ten to the power of four. Order matters because 1234 is a different code from 4321. Repeats are allowed because 1111 is a valid PIN.
Change the pick to 6 and the pool to 26 to model a six-letter password using only lowercase letters. The result jumps to over 308 million. Add digits by setting the pool to 36 and it rises above two billion. Add uppercase letters by setting it to 62 and the total climbs past 56 billion. Each extra character or each wider pool multiplies the count, which is why password advice always says to make them longer rather than merely more complex.
Symmetry and factorials
One surprising property of combinations is symmetry. Choosing 3 items from 10 gives the same count as choosing 7 from 10. Every group you pick defines a group you leave behind, and the two groups are just two views of the same split. When you need to do the arithmetic by hand, pick the smaller number and the multiplication is shorter.
Factorials grow with extraordinary speed. Ten factorial is 3,628,800. Twenty factorial is over two quintillion, a number larger than the count of seconds since the universe began. By 170 factorial the result is close to the largest number a browser can represent without rounding. The tool handles this smoothly, but it is worth knowing why the numbers get so large so fast. Each new item multiplies every arrangement that existed before it, which makes the growth explosive rather than gradual.
The combination formula divides out the factorial of the pick size, which is why combinations are always smaller than or equal to permutations for the same inputs. Dividing by that factorial removes all the rearrangements within each group, collapsing many permutations into one combination.
Common mistakes
The most frequent error is getting the order question wrong. If you are counting how many different committees of five can be formed from twelve people, order does not matter because a committee is a group, not a ranking. If you are counting how many ways to assign president, treasurer, and secretary from twelve people, order matters because the roles are distinct. Mixing the two up gives an answer that is off by a factor of the factorial of the pick size.
Another mistake is forgetting whether repeats are possible. Drawing cards from a deck is without replacement. Rolling a die three times is with replacement. Confusing the two changes the formula and the result.
A subtler trap is comparing odds with probability. A one in fourteen million probability is not the same as fourteen million to one odds. The odds figure is the ratio of losing outcomes to winning outcomes, which is one less than the total. Both are shown when the checkbox is ticked, so that you can quote whichever one your audience expects without accidentally using the wrong one.
Finally, be careful with the size of the pool. If a problem says the letters A through Z, the pool is 26. If it says the digits 0 through 9, the pool is 10, not 9, because zero counts. Off-by-one errors in the pool are easy to make and they quietly shift every result.
Privacy
Every calculation runs in your browser. No inputs and no results are sent to any server. There is no account, no login, and nothing stored between visits. Close the tab and everything is gone. The page works fully offline once it has loaded. Whether you are a student checking homework or a security analyst sizing up a password space, your numbers stay entirely on your own device.
