Skip to content

Permutation & Combination Calculator

Calculate permutations nPr, combinations nCr, arrangements with repetition nʳ and combinations with repetition (n+r−1)Cr exactly. Shows each formula with your values and the full exact result using whole-number BigInt arithmetic.

Calculators Runs client-side Free to use
Jump to the tool
Share: X WhatsApp
Loading Permutation & Combination Calculator…

About the Permutation & Combination Calculator

Permutation & Combination Calculator counts the ways to choose r items from n. Permutations nPr count ordered arrangements without repeats, combinations nCr count unordered selections without repeats, nʳ counts ordered arrangements where items can repeat, and (n+r−1)Cr counts unordered selections where items can repeat.

All four use exact whole-number arithmetic with JavaScript BigInt, so results are never rounded, however many digits they have. Each result shows the formula, your values substituted and the exact answer with its digit count. n and r can each be from 0 to 1,000,000, and results are limited to 10,000 digits: if a result would be larger, the tool says so before calculating instead of freezing the page.

How to use

  1. Choose All four, or one counting method.
  2. Enter n, the number of items or types available.
  3. Enter r, the number chosen.
  4. Press Calculate to see each formula, substitution and exact result.
  5. Copy or download the summary, or press Reset.

Key features

  • nPr, nCr, nʳ and (n+r−1)Cr, singly or all together.
  • Exact BigInt results with no rounding.
  • Formula and substituted values for each method.
  • Digit count and a scientific-notation approximation for long results.
  • Checks r ≤ n where it is required.
  • Documented limits with a clear message before oversized results.
  • Copy and download the full exact results.

Best practices

  • Ask whether order matters: if yes use a permutation, if not a combination.
  • Ask whether items can repeat: if yes use nʳ or (n+r−1)Cr.
  • Remember that nCr = nC(n−r), so choosing 3 of 10 equals leaving out 7.
  • Check small cases by listing them to confirm you chose the right method.
  • Use exact results for counting; probabilities need a separate division.

Benefits

  • Exact answers for probability and statistics work.
  • Clear formulas help you pick the right counting rule.
  • Handles very large results without rounding.
  • Private: runs entirely in your browser.

Frequently asked questions

What is the difference between a permutation and a combination?

A permutation counts arrangements where order matters (ABC and CBA are different). A combination counts selections where order does not matter (ABC and CBA are the same).

What formulas are used?

nPr = n! ÷ (n − r)!, nCr = n! ÷ (r! × (n − r)!), arrangements with repetition = nʳ, and combinations with repetition = (n + r − 1)! ÷ (r! × (n − 1)!).

Why must r be at most n for nPr and nCr?

Without repetition you cannot pick more items than exist. The calculator rejects r > n for those two methods; nʳ and combinations with repetition allow r to exceed n.

Are the results exact?

Yes. The calculator uses BigInt whole-number arithmetic, so every digit is exact. A short scientific-notation approximation is added for results longer than 15 digits.

What are the limits?

n and r can each be from 0 to 1,000,000, and a result can have up to 10,000 digits. A result that would be longer is refused with a message before the calculation runs.

How are zero values handled?

0! = 1, so nP0 = nC0 = 1 and 0⁰ is taken as 1 (one empty arrangement). With repetition and n = 0, there is 1 way to choose nothing and 0 ways to choose one or more items.

What values are accepted?

Whole numbers of 0 or more. Decimals, negatives, empty fields and malformed values are rejected.

Is anything I enter saved or sent anywhere?

No. Every calculation runs in your browser on your device. Inputs, settings and results are not uploaded and are not saved in browser storage. Reset clears them from the page.