Permutation and Combination Calculator

Total number of items, an integer from 0 to 1000.
Number of items chosen, an integer from 0 to n.
Result
—
Steps
—
Everything is calculated in your browser. Your input is never uploaded to the server and no account is required.

Permutations, combinations, and factorials

How to calculate permutations and combinations: nPr, nCr, and factorials

Permutations, combinations, and factorials are fundamental concepts in combinatorics. The key difference between permutations and combinations is whether order matters. This calculator shows both the formula and calculation process.

Choose one of the three modes, enter n and r when required, and the result and calculation steps will be displayed. The process expands products or quotients so you can compare them with textbook formulas. Everything is calculated locally in the browser.

What is the difference between permutations and combinations?

Permutations care about order, while combinations do not. Choosing 3 people from 10 and arranging them in a line gives 720 permutations because different orders count separately. Choosing 3 people from 10 for a group gives 120 combinations because order does not matter. The difference is the factorial of 3, which is 6.

How is nPr calculated?

A permutation is the product of r consecutive numbers starting from n. The permutation of 10 items taken 3 at a time is 10 × 9 × 8 = 720. It can also be written as 10! divided by 7!. Because the common part cancels, only r factors need to be multiplied.

How is nCr calculated?

A combination equals the corresponding permutation divided by r factorial. For 10 choose 3, the calculation is 10 × 9 × 8 ÷ (3 × 2 × 1) = 120. Common factors can be cancelled before multiplication, keeping intermediate values smaller.

What is special about factorial?

Zero factorial is defined as 1, which makes combination formulas work consistently when r is 0 or r equals n. Factorials grow extremely quickly, so the calculator uses exact integer arithmetic and limits n to 1000.

What if the result is too large to read?

Results are displayed with thousands separators, while large integers also show their digit count. For example, 100! has 158 digits. The copy button returns the plain integer without separators, so it can be pasted into code or a spreadsheet without commas being interpreted as text.

Where are these calculations useful?

Common applications include lottery combinations, the number of possible passwords and codes, tournament matchups, scheduling arrangements, and sampling problems. Use the average calculator for statistical summaries and the percentage calculator for percentage relationships.

What is the difference between permutations and combinations? How to use nPr and nCr

Permutations consider order, while combinations do not. This calculator provides permutation, combination, and factorial modes and shows both the result and the calculation process.
  • Permutation nPr equals n! divided by (n-r)!; choosing 3 from 10 in order gives 720, shown as 10 × 9 × 8
  • Combination nCr equals n! divided by r! and (n-r)!; choosing 3 from 10 gives 120
  • Factorial n! multiplies all integers from 1 through n, with 0! defined as 1, so 5! equals 120
  • Exact integer arithmetic prevents precision loss for large results such as C(100,50)
  • n supports integers from 0 to 1000 and r cannot exceed n; invalid values produce a clear error
  • All calculations run locally in the browser, input is never uploaded, and results can be copied with one click
Use the average calculator for mean and median statistics, or the percentage calculator for percentage and proportion calculations.
Comments 0
No comments yet. Be the first to comment!
avatar
Comment content cannot be empty
0/255