Permutations and Combinations Calculator: nPr, nCr and Binomial Probability
Count the ways to arrange or choose r things from n, and find the chance of exactly k successes in n tries.
Engineering student calculators
Free textbook calculators with every step shown, so you can check your own working. Pick one, type in your numbers and see the formulas worked out. Or switch to Ask a question for an explained answer. No account needed.
Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.
How this calculator works
Enter n, the number of things to choose from, and r, the number you pick. Permutations (nPr) count the ordered arrangements, so ABC and CBA are different. Combinations (nCr) count the selections where order does not matter, so ABC and CBA are the same group. The calculator also gives the counts when repeats are allowed.
For a chance problem, enter the chance p of success on each try and the number of successes k. The binomial chance of exactly k successes in n independent tries is C(n,k) p^k (1-p)^(n-k). It also gives the chance of k or fewer, k or more, the average and the spread, and a chart of every outcome.
Use it for the number of PIN or password combinations, the number of ways to pick a team or a sample, the number of test samples that fail in a batch, or the chance that a given number of fuses, welds or parts are defective.
Formulas used
- {}^{n}P_{r} = \frac{n!}{(n-r)!}
- \binom{n}{r} = \frac{n!}{r!\,(n-r)!}
- P(X=k) = \binom{n}{k}p^{k}(1-p)^{n-k}
Worked example
With the default numbers in the calculator above:
- Factorials: n! = 3628800
- Number of ordered arrangements (permutations): 720
- Number of selections (combinations): 120
- Ordered arrangements when repeats are allowed: 1000
- Selections when repeats are allowed: 220
- Chance of exactly k successes: 0.11719 (11.719 %)
- Chance of k or fewer successes: 0.17188 (17.188 %)
- Chance of k or more successes: 0.94531 (94.531 %)
- Average number of successes and the spread: 5.00 average, 1.58 standard deviation
Change the numbers in the calculator to see the full working, every step, for your own case.
A second worked example
A different case, with these numbers: n (how many things, or tries) 52; r (how many you pick or arrange) 5.
- Factorials: n! = 8.06582 x 10^67
- Number of ordered arrangements (permutations): 311875200
- Number of selections (combinations): 2598960
- Ordered arrangements when repeats are allowed: 380204032
- Selections when repeats are allowed: 3819816
- Chance of exactly k successes: 4.9072e-12 (4.9072e-10 %)
- Chance of k or fewer successes: 5.2134e-12 (5.2134e-10 %)
- Chance of k or more successes: 1 (100 %)
- Average number of successes and the spread: 26.00 average, 3.61 standard deviation
Common questions
What is the difference between a permutation and a combination?
A permutation counts different orders as different outcomes. A combination does not. There are always r! times as many permutations as combinations.
When can I use the binomial chance?
When there are a fixed number of tries, each one has only two outcomes, the chance of success is the same each time, and the tries do not affect each other.
Why are large answers shown in powers of ten?
Counts above about 10 to the power 15 cannot be stored exactly by a computer, so they are shown to 6 figures.
Related calculators
Got a question about this? Ask an engineering question and get a plain-language answer with references.
Further reading: Any probability and statistics text (counting principles and the binomial distribution); Montgomery and Runger, Applied Statistics and Probability for Engineers.
Need a calculator we do not have?
Embed this calculator on your own page
Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.
Need this drawn, designed or checked?
Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.
Need help with a real project?
Talk to Drafting Central →