Skip to main contentSkip to secondary navigation
HomemathPermutations & Combos

Permutation and Combination Calculator

Calculate permutations (nPr) and combinations (nCr) with step-by-step factorial breakdown. Toggle between order matters vs. does not matter to see the correct formula.

✓ Formula verified: January 2026
📐

Permutations & Combos

Results update instantly as you type

Enter Values

Permutation: 5P3
60
↑ Gain
TypePermutation
FormulaP(5,3) = 5! / (5 − 3)!
Formula Applied5! / 2! = 120 / 2 = 60
n!120

r!

6

(n−r)!

2

http://127.0.0.1:54963/math/permutation-combination-calculator
Formula & Step-by-Step

Type

Permutation — Order Matters

Each different ordering counts as a unique arrangement.

Permutations for n = 5

012345r (items chosen)0306090120

The highlighted bar (at r = 3) shows the current selection. Other bars show nPr for all possible r values.

Formula

P(n,r) = n! / (n−r)!

Step-by-Step

5! / 2! = 120 / 2 = 60

n!

120

r!

6

(n−r)!

2

Quick Comparison

Permutations count arrangements where order matters (like passwords or race results).
Combinations count selections where order does not matter (like lottery tickets or committee members).
The combination formula divides by r! to remove duplicate orderings.

The Formula

P(n,r) = n!/(n−r)! | C(n,r) = n!/(r!(n−r)!)

Permutations count arrangements where order matters. Combinations count selections where order does not matter. The key difference is dividing by r! in combinations to eliminate counting different orders as distinct outcomes.

Variable Definitions

n

Total Items

The total number of distinct items available to choose from. Must be a non-negative integer up to 170.

r

Items Chosen

How many items you are selecting at a time. Must be between 0 and n.

n!

n Factorial

The product of all positive integers from 1 to n: n × (n−1) × ... × 1. By convention, 0! = 1.

P(n,r)

Permutation

Number of ways to arrange r items from n when order matters: n!/(n−r)!

C(n,r)

Combination

Number of ways to select r items from n when order does not matter: n!/(r!(n−r)!)

How to Use This Calculator

  1. 1

    Enter the total number of items (n) and how many to choose (r). Both must be non-negative integers with r ≤ n.

  2. 2

    Toggle "Does Order Matter?" to switch between permutations (order matters) and combinations (order does not matter).

  3. 3

    View the result, formula, and detailed step-by-step calculation showing each factorial value.

  4. 4

    Compare permutation vs. combination results — notice that combinations are always smaller because order no longer contributes distinct arrangements.

  5. 5

    The maximum value of n is 170 due to JavaScript factorial overflow limits. For larger values, use the big-number calculator.

Permutations count ordered arrangements; combinations count unordered selections

Understanding the Concept

Permutations and combinations are fundamental counting techniques in combinatorics and probability. Permutations (order matters) count arrangements like passwords ("123" differs from "321"), race rankings (1st, 2nd, 3rd place), and seating arrangements. Combinations (order does not matter) count selections like lottery numbers (the same set of numbers wins regardless of draw order), committee members, and poker hands. The key mathematical insight is that the combination formula is the permutation formula divided by r! — dividing by r! removes the count of different orderings for the same set of items. The factorial function grows extremely fast: 10! = 3,628,800, and 20! is about 2.43 quintillion. This rapid growth is why the calculator caps n at 170 — beyond this, JavaScript's number type can no longer represent the factorial exactly. For larger values, you would need the big-number calculator with arbitrary-precision integers. Real-world applications include password security analysis (how many possible 8-character passwords?), tournament bracket design, genetics (gene combinations), and quality control sampling plans.

Frequently Asked Questions

Related Calculators

Reviews

No reviews yet. Be the first to share your experience with Permutation and Combination Calculator.

Write a Review

Your Rating *

0/1000

0/50

Related Calculators

Medical Disclaimer: The health and fitness calculators on this site are for informational and educational purposes only. They are not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider with any questions about your health.

Financial Disclaimer: The finance calculators on this site are for informational purposes only and do not constitute financial advice. Results are estimates based on the inputs provided and may vary. Consult a qualified financial advisor before making investment or financial decisions.

© 2026 TheCalcUniverse. All results are for informational purposes only.

Fast, free, and privacy-first.