Skip to content

§ I · Arithmetic

Combinations and Permutations Calculator

Choose or arrange, in exact integers, repeats included.

  • Updated 2026-11-25
  • Free · no sign-up
  • Runs in your browser
Combinations and permutationsexact integers

order does not matter

C(10, 3)

120

The same numbers read the other way: P(10, 3) = 720

Working

  1. 01

    Ordered selections

    10 × 9 × 8 = 720

  2. 02

    Remove the repeats

    Each group of 3 was counted 3! = 3 × 2 × 1 = 6 times.

  3. 03

    Divide

    720 ÷ 6 = 120

  4. 04

    Equivalent form

    n! ÷ (r!·(n−r)!) = 3,628,800 ÷ (6 × 5,040) = 120

Try one

“Choose” counts groups, so ABC and CBA are one answer. “Arrange” counts sequences, so they are two. Adding repeats to “choose” is what lets a shop sell two of the same item.

Compared with a basic calculator

TaskBasic calculatorThis page
CountingCalculate factorials manuallyChoose, arrange or choose with repetition
IntegersLimited decimal digitsBigInt counts within the stated input limits
WorkingFinal quotientProducts, factorials and duplicate-count correction

How to use it

§ How to use
  1. 01

    Choose the kind of question: order ignored, order counted, or repeats allowed.

  2. 02

    Enter n — how many things are available — and r — how many you are choosing.

  3. 03

    Read the answer, then the other reading of the same numbers underneath: the calculator shows both C and P so you can see which one your question wanted.

  4. 04

    Follow the working to check by hand: the product of the descending terms, divided by r!.

The same three from ten, counted three ways

§ 02

The numbers differ by exactly the factor that accounts for order.

QuestionCountWritten as
3 from 10, order ignored120C(10, 3)
3 from 10, order counted720P(10, 3)
3 from 10, repeats allowed220C(12, 3)
6 numbers from 4913,983,816C(49, 6)

120 groups of three, each of which can be arranged in 3! = 6 ways: 120 × 6 = 720.

Two formulas, one division apart

§ 03

Arranging r of n items in order is a product of descending terms — the first place has n candidates, the second has n − 1, and so on:

P(n, r) = n × (n−1) × … × (n−r+1) = n! / (n−r)!

Choosing without order is the same product with the orderings divided out, because each group of r was counted r! times:

C(n, r) = P(n, r) / r! = n! / (r! (n−r)!)

For three from ten: 10 × 9 × 8 = 720, and 3! = 6, so 720 ÷ 6 = 120. The working panel shows both, and the division, because the two numbers are easy to confuse and the factor between them is the clearest way to tell which one a question is asking for.

With repetition

Allowing repeats turns the problem into choosing from a larger pool: r choices from n types with repeats is r choices from n + r − 1 distinct positions. Three scoops from five flavours, repeats allowed, is C(7, 3) = 35.

Why the integer survives

The product is divided by i at every step rather than by r! at the end, and each of those divisions is exact: the product of i consecutive integers is always divisible by i!. Doing it in that order keeps every intermediate an integer, so 100C50 comes out complete — thirty digits, not the fifteen significant figures a double could hold.

Questions

§ 04
What is the difference between a combination and a permutation?
A combination counts groups; a permutation counts sequences. Picking three people from ten gives 120 possible groups, and each group can be lined up in 6 different orders, so arranging them gives 720. The only difference between the formulas is that one divides by r!.
When does repetition apply?
When the same item can be chosen twice — three scoops where you can have chocolate twice, or a four-digit PIN where 1-1-1-1 is allowed. Choosing r items from n with repeats is the same as choosing r items from n + r − 1 without repeats, which is why that case has its own entry.
Why is C(49, 6) so large?
Because there are 49 choices for the first ball, 48 for the second, and so on — 10,068,347,520 ordered draws — and then the order is divided out, since the six balls come out in any sequence. 10,068,347,520 ÷ 720 = 13,983,816. That is the number of distinct lottery lines, and it is also the reason a single ticket is not a plan.
How large can n be?
Five thousand. Beyond that the factorials are thousands of digits long and the answer stops being readable, even though the integer is still exact. For very large values what you normally want is the logarithm of the count, which is a different calculation.
Does C(n, r) equal C(n, n − r)?
Yes, always. Choosing three from ten leaves seven behind, so the number of groups of three equals the number of groups of seven. The calculator uses that when it works, which is why C(10, 7) does the same three multiplications as C(10, 3).
How do I turn a count into a probability?
Divide the number of favourable outcomes by the number of possible ones, both counted the same way. The chance of holding the winning lottery line is 1 ÷ C(49, 6), about one in fourteen million. Mixing a combination on top with a permutation underneath gives a wrong answer that looks plausible.
Why divide at every step rather than at the end?
Because the intermediate product is divisible at every step, and dividing early keeps the numbers small. Computing 10! then dividing by 3! and 7! also works, but by the time n reaches a few hundred the factorials are hundreds of digits long and the division is doing work that cancelling would have avoided.
Is the answer exact?
Yes. Every value here is an integer computed with arbitrary precision — no floating point, no rounding. 100C50 comes out with all 29 digits, and the last one is not a zero that appeared because a float ran out of room.

ShowSteps

Free calculators with exact fractions, simplified surds and recorded working, so you can check supported calculations.

© 2026 ShowSteps ·