Permutations and combinations: arrange, choose and count every case, with nPr and nCr side by side

Seat people in a row, pick a team or shuffle the letters of a word and see every arrangement listed for small cases. nPr and nCr are worked side by side with your numbers, and repeated letters (BANANA, MISSISSIPPI) are handled with n!/(p! q!).

Keep it one tap away for everyday use.

Bookmark Counting machine?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Set n and r
  2. See them all
  3. nPr and nCr
  4. Practise
Nothing is uploadedWorks offline once open

What are we counting?

n
r

The count, with your numbers

Every one of them

Try this

  • Set n = 4 and r = 2. Arrange gives 12, Choose gives 6: each pair, such as AB, appears twice in the Arrange list (AB and BA).
  • Keep n = 5 and slide r from 0 to 5 in Choose mode. The counts 1, 5, 10, 10, 5, 1 are a row of Pascal's triangle, and nCr = nC(n − r).
  • Set r = n in Arrange mode: the count is n!. Why is 0! taken as 1? Look at r = n in the formula n!/(n − r)!.
  • Type your own name as the word. Repeated letters cut the count: swapping two identical letters makes no new word.

Check yourself

Fresh questions every time. Type a whole number. Nothing is saved.

What it does

Counting problems are hard because it is easy to count something twice or miss a case. This page lets you see every case while the numbers are small, so the formulas stop being magic:

  • Arrange (order matters). Seat r of n friends on r chairs in a row. The boxes show how many choices each chair has: n, then n − 1, and so on. Multiplying them gives nPr = n!/(n − r)!, and the page lists every seating in dictionary order.
  • Choose (order does not matter). Pick a team of r from n players. AB and BA are now the same team, and every team turns up r! times in the Arrange list, so nCr = nPr / r!. Every team is listed.
  • Letters of a word. Type any word. If letters repeat, swapping two identical letters makes no new word, so the count is n!/(p! q! …), where p, q, … are how many times each repeated letter appears. BANANA gives 60, MISSISSIPPI gives 34,650.

The page always shows nPr, nCr and r! together, with the link nPr = nCr × r! filled in. It follows the Class 11 chapter permutations and combinations and is handy for Class 12 probability, where counting outcomes comes first.

The same nCr numbers build Pascal’s triangle in binomial expansion, and counting outcomes is the first step of a probability in sample space builder and probability tree.

How to use it

  1. Pick Arrange, Choose or Letters of a word at the top.
  2. For Arrange and Choose, set n (how many different things) and r (how many are used) with the sliders. The number boxes take n up to 30; the list then shows the first 240 cases and the formula does the rest.
  3. For words, type a word or tap one of the examples. Only letters count; spaces are ignored.
  4. Read the boxes picture, the three facts and the formulas with your numbers, then scroll through the list.

A worked example

The page starts on Arrange with n = 5 and r = 3: five friends A to E and three chairs.

  • Chair 1 has 5 choices, chair 2 has 4, chair 3 has 3: 5P3 = 5 × 4 × 3 = 60. The list starts ABC, ABD, ABE, ACB, …
  • Switch to Choose: the team {A, B, C} was counted 3! = 6 times above (ABC, ACB, BAC, BCA, CAB, CBA), so 5C3 = 60 / 6 = 10.
  • Switch to Letters of a word with BANANA: 6 letters, A three times and N twice. 6! = 720, and 720 / (3! × 2!) = 720 / 12 = 60 different words, all listed.

Tips

  • Ask “does swapping two of them make something new?” If yes, use permutations; if no, use combinations.
  • nCr = nC(n − r): choosing 3 players to play is the same as choosing the 2 who sit out.
  • 0! = 1, so nP0 = nC0 = 1: there is exactly one way to do nothing.

Check yourself

Four fresh questions each time: a race finish (permutation), choosing books (combination), arranging the letters of a word with repeats, and a committee made of two groups. Type a whole number and press Check. Nothing is saved.

FAQ

Why stop listing at 240? Lists grow very fast: 10P5 is already 30,240. Seeing the first few is enough to see the pattern; the formula counts the rest exactly.

Can I count bigger cases? Yes, up to n = 30 here. For big numbers, Stirling numbers, partitions and more, use the combinatorics calculator.

Is this from the NCERT book? It covers the same topics with fibub’s own examples. fibub is not part of NCERT.

Where the numbers come from

  • Standard counting results: the fundamental principle of counting, n!, nPr = n!/(n − r)!, nCr = n!/(r!(n − r)!) and arrangements of n objects with repeats, n!/(p! q! …). Written for fibub.
  • Checked against Python's math.perm, math.comb and itertools (every n up to 8 listed and counted) and the known count 34,650 for MISSISSIPPI.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Change log for Counting machine

  1. Add #1376 Counting machine Details on GitHub

Every change to fibub

Related tools

Combinatorics calculator #T385 Count exactly, with every digit: permutations and combinations with or without repetition, multinomial coefficients (arrangements of a word), Stirling numbers of both kinds, Lah numbers, Bell and Catalan numbers, integer partitions and derangements, with tables you can download. Sample space builder #L82 See every outcome of two dice, a few coins or a deck of cards, shade an event and get its probability as a fraction. Then run the experiment thousands of times and watch the share of hits settle near it. Probability tree #L94 Set P(A), P(B | A) and P(B | A′) with sliders and see the tree, the four path probabilities, P(B) by total probability, P(A | B) by Bayes' theorem and an independence check. 1000 dots show the same numbers as people, which makes it clear why a positive result on a test for something rare is often a false alarm. Binomial expansion #L95 Expand (ax + b)ⁿ with exact coefficients, read them off Pascal's triangle, find the general term T(r+1) and the middle term(s), and drop balls through a Galton board to watch the same numbers turn into chances. Quadratic explorer #L68 Slide a, b and c and watch the parabola move: vertex, roots and the discriminant update live, completing the square is drawn with tiles, and the middle term is split for you. With fresh practice questions. Pythagoras proof playground #L69 Drag a right triangle and watch the squares on its sides add up. Slide through four visual proofs (rearrangement, Bhaskara, similar triangles, Baudhayana) with your own side lengths, and list Pythagorean triples.