Skip to content
Tezmy Tools

Permutation and Combination Calculator

Count nCr, nPr and n! exactly, with or without repetition

Calculate

Examples

Enter n and r, or tap an example.

Runs in your browser. Nothing is uploaded.

About the Permutation and Combination Calculator

Permutation and Combination Calculator counts the ways to arrange or choose items. Combinations nCr count selections when order does not matter, permutations nPr count arrangements when order matters, and the factorial n! counts the ways to put n different items in order. Tick Repetition allowed to count choices where an item can be used more than once. Results are exact whole numbers, shown with thousands separators, and long ones also show the number of digits and the scientific form. Under the answer you get the formula filled in with your numbers and a plain sentence that says what was counted. It handles n up to 1,000 with whole numbers, and it counts arrangements only: it does not work out probabilities.

Updated September 2026

How to use the Permutation and Combination Calculator

  1. 1Choose Combinations nCr, Permutations nPr or Factorial n!.
  2. 2Type the total number of items n, and the number chosen r.
  3. 3Tick Repetition allowed if the same item can be chosen again.
  4. 4Read the exact answer, the formula and the sentence.
  5. 5Tap an example such as Poker hands or Lottery to see a familiar case.

Order matters or it does not

Ask one question: would swapping two chosen items give a different outcome? For a race podium, gold, silver and bronze are different places, so order matters and you count permutations. For a lottery ticket or a hand of cards, only the set of items counts, so you count combinations.

Answering that first tells you which mode to pick. Then decide whether an item can be used more than once, which is what the repetition box is for.

The formulas

  • Factorial: n! = n × (n − 1) × … × 1, and 0! = 1.
  • Permutations: nPr = n! ÷ (n − r)!.
  • Combinations: nCr = n! ÷ (r! × (n − r)!).
  • Permutations with repetition: n^r.
  • Combinations with repetition: (n + r − 1)! ÷ (r! × (n − 1)!).

With and without repetition

Without repetition each item can be used once, so r cannot be larger than n. With repetition an item can appear again, as when you choose the digits of a code or the scoops of an ice cream. A 4-digit code from 10 digits has 10 to the power of 4, or 10,000, possibilities.

If you get the message that r cannot be more than n, either lower r or tick the repetition box when repeats are really allowed.

Worked examples: lottery, cards, podium

A lottery that draws 6 numbers from 49 has 13,983,816 combinations, so one ticket has a chance of one in that number. Choosing 5 cards from 52 gives 2,598,960 hands. Ranking 3 runners out of 10 for the podium gives 720 permutations.

This tool only counts. To turn a count into odds or a percentage, divide by the total using Percentage Calculator, and for draws that pick real random numbers use Random Number Generator. For fractions of the count, Fraction Calculator keeps them exact.

Features

  • Combinations, permutations and factorials
  • With and without repetition
  • Exact answers for n up to 1,000
  • Digit count and scientific form for huge results
  • Formula filled in with your numbers
  • Plain-language sentence explaining the count
  • Runs in your browser

Frequently asked questions

What is the difference between a permutation and a combination?

In a permutation the order matters, so picking A then B is different from picking B then A. In a combination the order does not matter, so both are the same choice. There are always at least as many permutations as combinations, and nPr equals nCr times r!.

How do I calculate nCr?

Use n! divided by r! times (n − r)!. To choose 3 items from 5, that is 120 divided by 6 times 2, which is 10. The calculator multiplies and divides step by step, so it never has to build huge factorials, and it stays exact even for n = 1,000.

What is 0 factorial?

Zero factorial is 1. There is exactly one way to arrange nothing, and defining it this way makes formulas such as nCr work for the edge cases, like choosing 0 items or all n items, both of which give 1.

How do I count combinations with repetition?

Use the formula C(n + r − 1, r). Choosing 2 scoops from 3 flavours, where you can take the same one twice, gives C(4, 2) = 6. Tick Repetition allowed with combinations and enter n = 3 and r = 2.

How many 5-card poker hands are there?

There are 2,598,960 different five-card hands from a 52-card deck, because the order of the cards in a hand does not matter. Tap the Poker hands example to see it worked out with the formula 52! / (5! × 47!).

How large a number can it handle?

It handles n up to 1,000 and shows every digit of the exact answer. The biggest results, such as 1,000!, have thousands of digits, so the page shows the digit count and the scientific form along with a scrollable full number.

Related tools