Math

Permutation & Combination Calculator – Exact Counts

Compare ordered and unordered selections, with or without repetition. Get exact BigInt counts, factorials and substituted formulas for n and r up to 500.

Free to useNo sign-upCalculated in your browser

Inputs

Ordered means positions matter. Repeats allow reusing a type.

Whole number from 0 to 500.

Whole number from 0 to 500. Repetition allows r to exceed n.

Inputs and results stay in this browser.

Results

Check the inputs and calculate. Editing clears the previous result.

Does order change the outcome?

Choose a permutation when different positions create different outcomes. Choose a combination when only the selected membership matters. Allow repetition when the same available type can appear more than once. These choices answer different questions, so the result compares all four methods and identifies the selected one.

Four worked examples

  • Committee: Choose two members from five distinct volunteers. Position does not matter and nobody appears twice: C(5,2) = 5! / (2! × 3!) = 10 committees.
  • Finishing positions: Assign first, second and third place among ten finalists, with no ties. Positions matter: P(10,3) = 10 × 9 × 8 = 720 arrangements.
  • PIN codes: A three-digit code using five allowed digits, including leading zero if zero is allowed, has 5³ = 125 possibilities. Positions matter and repetition is allowed. This is a counting example, not a security recommendation.
  • Ice-cream flavors: Choose three scoops from five flavors, with repeats allowed and scoop order ignored. C(5 + 3 − 1,3) = C(7,3) = 35 flavor multisets. This assumes every flavor can be reused without a stock limit.

Formulas and factorials

Without repetition, nPr = n! / (n−r)! and nCr = n! / (r!(n−r)!). Each unordered selection has r! possible orders, so nPr = nCr × r! when 0 ≤ r ≤ n. The factorial panels show the complete n! and r!, including 0! = 1.

With repetition, ordered choices give n^r. Unordered choices give C(n+r−1,r) for n ≥ 1. One way to understand this is to distribute r identical selections among n distinct types, using n−1 dividers between the type counts.

Large exact counts

C(52,5) = 2,598,960. C(100,50) = 100,891,344,545,564,193,334,812,497,256. Floating-point integers cannot represent every digit of the latter, so all count arithmetic uses BigInt. Symmetry reduces binomial work: C(n,r) = C(n,n−r).

The software accepts whole n and r from 0 to 500. No signs, exponents, decimals or thousands separators are accepted. Every result is complete and unrounded; long numbers wrap inside the comparison area and remain selectable for copying.

Frequently asked questions

What happens when r is larger than n?

Without repetition, there are zero possible selections or arrangements. The calculator does not evaluate factorials at negative arguments. Repetition permits r > n when at least one type is available.

Why does selecting nothing give one?

There is one empty selection and one empty arrangement. This applies to r = 0 even when n = 0. When n = 0 and r > 0, all four methods give zero because there are no available types.

Can I count repeated objects with limited stock?

Not here. The four modes assume distinct available types and either no reuse or unlimited reuse within the requested selection. Mixed stock restrictions need a different model.

Sources & review

Last reviewed: . The formula is reproduced above so you can check the math independently.

How we check calculations and describe their limits

Accessibility and student privacy

Our accessibility target is WCAG 2.1 AA. We use automated checks for keyboard operation, narrow layouts and readable alternatives to charts. Keyboard and screen reader behavior can vary by device and browser.Report an accessibility issue.

These tools have no ads, affiliate offers or sponsored content. No account is needed. Calculations run in your browser; your inputs and results are not sent to us or to analytics. Google Analytics may be used to measure site usage. See Privacy & analytics for details and how to turn it off.