Elecmetric

Permutations and Combinations Calculator

Enter n items and a selection of r and get the number of permutations (order matters) and combinations (order does not matter), with and without repetition

Number of items to choose from (n) 10, number chosen (r) 3 gives
n!: 3,628,800 · Permutations nPr, order matters, no repeats: 720 · Combinations nCr, order does not matter, no repeats: 120

Estimate only. Not engineering or safety advice. Check the result against the applicable standard and the equipment data, and have a competent engineer review it before it is relied on. Terms of use.

Open in the calculator with these values

About this calculator

This page calculates n!, permutations nPr, order matters, no repeats, combinations nCr, order does not matter, no repeats and 2 more results from number of items to choose from and number chosen. Change any value or its unit and the result updates. The steps below show the working for the default values, so you can check each line against your own method.

Limits of this calculator

Use this to count how many test sequences, switching orders or ways of selecting spare units there are, or how many keypad or breaker-label codes exist. For the chance of an outcome use the probability calculator, and for the chance of exactly k failures in n units use the binomial distribution calculator.

Cross-check: 32 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review.

Verification status: Engineering reference

Engineering reference. Formula and method documented and tested against separately coded reference calculations. Not yet Verified: the evidence listed on this page is still needed.

What this calculator checks

What remains unverified

Verification register entry

Calculation authorRahul Sharma (author)
Technical reviewNo independent technical review has been carried out
Individual professional approvalNot recorded
Formula referencenot recorded
Standard and editionNot applicable: Pure mathematics or statistics; no electrical standard governs the method
Standard review stateNot applicable
Scope-screening notenot recorded
Cross-check test cases32 reference vectors (tests/reference_vectors.json)
Review datenot recorded
Next review datenot recorded
StatusEngineering reference

Needed before this calculator can be marked Verified: reviewer name, qualification and review date; exact formula reference; formula source (textbook or standard); next review date.

Formula

n! = n × (n − 1) × … × 1 nPr = n! / (n − r)! nCr = n! / (r! (n − r)!) with repetition: permutations = nʳ, combinations = (n + r − 1)! / (r! (n − 1)!)

Worked example

InputValue
Number of items to choose from (n)10
Number chosen (r)3
  1. n! = 10! = 3628800
  2. nPr = n! / (n − r)! = 720 nCr = n! / (r! (n − r)!) = 120
  3. With repetition: nʳ = 1000 C(n + r − 1, r) = 220

Assumptions

Use this to count how many test sequences, switching orders or ways of selecting spare units there are, or how many keypad or breaker-label codes exist. For the chance of an outcome use the probability calculator, and for the chance of exactly k failures in n units use the binomial distribution calculator.

Inputs and results

InputUnitAllowed or shownNote
Number of items to choose from (n)(number)1 or more, up to 100A whole number from 1 to 100.
Number chosen (r)(number)0 or more, up to 100A whole number from 0 to 100. Without repetition r above n gives 0 ways, because you cannot pick more distinct items than there are.
ResultUnitAllowed or shownNote
n! (n factorial)(number)Shown to 10 decimal places
Permutations nPr, order matters, no repeats(number)Shown to 10 decimal places
Combinations nCr, order does not matter, no repeats(number)Shown to 10 decimal places
Permutations with repetition (nʳ)(number)Shown to 10 decimal places
Combinations with repetition, C(n + r − 1, r)(number)Shown to 10 decimal places

How it is calculated

Each input is converted to the base unit of its quantity, the formula above is applied in the order shown in the worked example, and each result is shown in the unit you choose. Results are held at full precision and rounded only for display, except where a step selects a standard size, as the worked example shows. A value outside its allowed range is refused with a message instead of giving a result.

How the result changes with number of items to choose from (n)

Number of items to choose from (n)n!Permutations nPr, order matters, no repeatsCombinations nCr, order does not matter, no repeats
1100
51206010
103,628,800720120
202.433e186,8401,140
408.159e4759,2809,880
1009.333e157970,200161,700

Other inputs are the same as in the worked example above.

Standards and further reading

Complex numbers, rectangular and polar form and angle conversion are standard mathematics, not the subject of a standard. Standards apply when the result feeds an electrical design, and they set the method there.

Frequently asked questions

What do I need to enter?

Enter number of items to choose from (n) and number chosen (r). Change the unit of a value with its selector and the result stays the same.

What does this calculator assume?

n and r are whole numbers; n is from 1 to 100 so that every result fits in a number (100! is about 9.3e157). Permutations count different orders as different (ABC and CBA are two); combinations count them as one. Without repetition each item can be used once, so r above n gives 0 permutations and 0 combinations. With repetition an item may be chosen again; r may then be larger than n. Results are counted exactly with whole-number arithmetic and shown to 10 significant figures; the steps show every digit up to 40 digits. 0! is 1, and choosing 0 items can be done in exactly one way.

Which calculators should I use next?

Common next steps are Binomial Distribution Calculator (Exactly k, At Most, At Least), Probability Calculator (Two Events, A and B, and Repeated Trials), Mean, Median and Mode and Fraction Calculator. The related links at the bottom of this page open them.

How accurate are the results?

Every figure comes from the same tested engine as the Elecmetric calculators and is meant for estimating. 32 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review. Check design values against the standard and the equipment data you work to.

Formula guides and reference

Longer explanations with worked examples and tables, written for the same topic.

More Engineering Mathematics calculatorsAll engineering calculatorsPermutations and Combinations Calculator (nPr, nCr) in Elecmetric

Tell us how to improve this page

This opens your email app. Nothing is sent until you press send.