GALAXY OF TOOLS

MATH SECTOR

Permutation and Combination Calculator

Count arrangements and selections — nPr, nCr, with or without repetition — exactly, with factorial steps.

Does the order matter?
Can an item be chosen more than once?
Examples:
Step by step
All four ways to count

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Permutation and combination calculator with exact answers

This permutation and combination calculator counts how many ways you can arrange or select r items from n. Answer two questions — does the order matter, and can items repeat? — and it gives the right count: permutations nPr, combinations nCr, permutations with repetition nʳ, or combinations with repetition.

Results are calculated exactly with big-integer arithmetic, so even C(1000, 500), a number with about 300 digits, is shown in full rather than rounded. Every answer includes the factorial working step by step, all four counts side by side for comparison, and the odds of one particular outcome — handy for lottery odds, card hands, passwords, seating plans and probability homework.

How to use the Permutation and Combination Calculator

  1. Enter n, the total number of items to choose from, and r, how many you choose.
  2. Say whether order matters. If “ABC” and “CBA” are different results (rankings, codes, seating), it is a permutation; if they are the same (teams, hands, toppings), it is a combination.
  3. Say whether repetition is allowed — can the same item be picked more than once, like digits in a PIN?
  4. Read the count in the result panel, the odds of one specific outcome, and the factorial steps.
  5. Compare all four counting methods in the table, or try an example such as lottery odds or seating arrangements.

Permutation and Combination Calculator features

All four counting rules

Permutations and combinations, each with and without repetition, chosen by two plain-English questions.

Exact big numbers

BigInt arithmetic gives every digit for n and r up to 10,000, with a scientific-notation summary.

Factorial steps

Shows n!, the cancelled factorials and the shortcut C(n, r) = P(n, r) / r!.

Odds of an outcome

Turns the count into “1 in N” odds, as for a lottery jackpot.

Real-world examples

One-tap examples for lotteries, seating, podium places, PIN codes, pizza toppings and ice-cream scoops.

Clear validation

Explains why r cannot exceed n without repetition, and rejects fractional or negative inputs.

Permutations vs combinations

A permutation is an arrangement where order matters: awarding gold, silver and bronze to three of ten runners gives P(10, 3) = 10 × 9 × 8 = 720 possibilities. A combination is a selection where order does not matter: choosing any three of ten people for a committee gives C(10, 3) = 720 / 3! = 120, because each group of three can be ordered in 3! = 6 ways and those all count as one committee.

With repetition, items can be reused. A 4-digit PIN allows any digit in each place, so there are 10⁴ = 10,000 codes. Picking 3 scoops from 5 ice-cream flavours, where two scoops can be the same flavour and the order in the bowl does not matter, gives C(5 + 3 − 1, 3) = C(7, 3) = 35 choices — the “stars and bars” method.

Order matters?Repeats allowed?FormulaExample (n = 5, r = 3)
YesNoP(n, r) = n! / (n − r)!60
NoNoC(n, r) = n! / (r!(n − r)!)10
YesYesnʳ125
NoYesC(n + r − 1, r)35

Worked examples: lottery odds and seating plans

Lottery: a 6-from-49 lottery draws 6 different numbers and the order does not matter, so the number of possible tickets is C(49, 6) = 49! / (6! × 43!) = (49 × 48 × 47 × 46 × 45 × 44) / 720 = 13,983,816. The chance of one ticket matching all six is 1 in 13,983,816 — about 0.000007%.

Seating: eight guests can sit in eight chairs in 8! = 40,320 different orders, because order matters and nobody can sit in two chairs at once. If only 3 of the 8 sit in a front row of 3 seats, that is P(8, 3) = 8 × 7 × 6 = 336 arrangements.

For a standalone factorial, use the factorial calculator; to actually draw lottery numbers at random, try the lottery number generator. Very large counts are easier to read in scientific notation.

Common mistakes

  • Using a permutation when order doesn’t matter. A poker hand of 5 cards is a combination: C(52, 5) = 2,598,960, not P(52, 5) = 311,875,200.
  • Calling a PIN a “combination”. In everyday speech a lock code is a combination, but mathematically order matters and digits repeat, so it is nʳ.
  • Forgetting that 0! = 1. This is why C(n, n) = C(n, 0) = 1: there is exactly one way to choose everything, or nothing.
  • Computing huge factorials separately. 49! has 63 digits; cancel first. C(49, 6) only needs the top six terms of 49! divided by 6!.
  • Choosing more than you have. Without repetition, r must be at most n. With repetition, r can be larger, as in 3 dice showing 5 values each.

Permutation and Combination Calculator FAQ

How does the permutation and combination calculator work?

Enter n and r, then say whether order matters and whether repetition is allowed. The calculator picks the right formula — nPr, nCr, nʳ or C(n + r − 1, r) — and shows the exact count, the factorial steps and all four counts for comparison.

What is the difference between a permutation and a combination?

In a permutation the order of the chosen items matters (ABC is different from CBA); in a combination it does not. For the same n and r, there are r! times as many permutations as combinations.

What is the formula for nCr?

nCr = n! / (r! × (n − r)!). For example, 5C3 = 120 / (6 × 2) = 10. It is also called the binomial coefficient and written as “n choose r”.

What are the odds of winning a 6/49 lottery?

There are C(49, 6) = 13,983,816 possible combinations, so a single ticket has a 1 in 13,983,816 chance of matching all six numbers.

Can r be bigger than n?

Only when repetition is allowed. Without repetition you cannot choose more distinct items than exist, so the calculator asks you to lower r or allow repeats.

How big can the numbers be?

n and r can each be up to 10,000. Results are exact, so they can run to tens of thousands of digits; the full value is shown in a scrollable box with a scientific-notation summary on top.

You might also need