Permutation & Combination Calculator

Enter n and r to calculate permutations (nPr), combinations (nCr), and factorials (n!, r!). Permutations/combinations with repetition and the formulas are shown too.

Last updated: 2026/10/16 Calculator Feedback & bug reports
Enter Values

Enter n as an integer of 0 or more, and r as an integer from 0 to n.

Result
Enter n and r, then press "Calculate".

How to Use

1

Enter n and r

Enter integers for "n (total)" and "r (chosen)". To choose 3 from 10, set n=10 and r=3.

2

Calculate

Press "Calculate" to see permutations (nPr), combinations (nCr), factorials, and the repetition variants all at once.

3

Review the Results & Formulas

Check the formula for each result, and copy any value you need with the copy button.

About Permutations and Combinations

A permutation (nPr) is the number of ways to choose r items from n and arrange them in order; a combination (nCr) is the number of ways to choose r items from n without regard to order. A factorial (n!) is the product of all integers from 1 to n. In addition to permutations, combinations, and factorials, this tool also computes permutations with repetition (n^r) and combinations with repetition (nHr). Everything runs in your browser, and BigInt keeps the results accurate even for very large numbers.

Features

  • nPr, nCr & Factorials at OnceShows nPr, nCr, n!, r!, and (n−r)! together — no need to recalculate repeatedly.
  • Repetition VariantsAlso computes permutations with repetition (n^r) and combinations with repetition (nHr).
  • Formulas ShownEach result includes its formula, so you can verify your reasoning, not just the answer.
  • Accurate Large Numbers (BigInt)Powered by BigInt for accurate results without overflow, even for huge factorials.

Use Cases

  • Checking probability and counting homework or exam answers
  • Counting arrangements like seating, lottery, or ordering
  • Counting team splits and group selections
  • Finding the counts used in probability numerators and denominators
  • Verifying combinatorial counts while programming

FAQ

What is the difference between a permutation (nPr) and a combination (nCr)?
A permutation (nPr) counts the ways to choose r items from n and arrange them in order, so order matters. A combination (nCr) counts the ways to simply choose r items from n, ignoring order. For example, choosing 2 from 3 gives 3 combinations, but 6 permutations.
What are permutations and combinations with repetition?
Permutation with repetition (n^r) counts arrangements when the same item can be chosen multiple times (e.g. a multi-digit PIN). Combination with repetition (nHr) counts selections where repeats are allowed but order does not matter, computed as (n+r−1)! / (r! × (n−1)!).
What happens when r is greater than n?
Permutations (nPr) and combinations (nCr) are defined only when r ≤ n, so when r > n those items show "—". However, permutations with repetition (n^r) and combinations with repetition (nHr) can still be computed, so their values are shown.
Can it accurately handle very large numbers?
Yes. Because it uses JavaScript BigInt, large factorials and combination counts beyond the usual numeric limit are computed accurately without overflow. For performance reasons, n is limited to 100000 or less.
Are the numbers I enter sent to a server?
No. All calculations happen entirely within your browser, and the values you enter are never sent to or stored on any external server. You can use the tool with peace of mind.