Permutation & Combination Calculator

The permutation and combination calculator gives the number of ways to choose or arrange r items from n: combinations (order doesn't matter), permutations (order matters), both with and without repetition, plus n factorial. Results are exact, even for huge numbers like 100 choose 50. Enter n and r and the answers appear instantly in your browser.

Formulas

CountFormulan = 5, r = 2
Combinationsn! / (r!(n − r)!)10
Permutationsn! / (n − r)!20
Combinations with repetition(n + r − 1)! / (r!(n − 1)!)15
Permutations with repetitionnʳ25

When to use it

  1. Count lottery combinations or poker hands.
  2. Work out how many PINs or passwords are possible.
  3. Solve probability homework.
  4. Count the ways to arrange a team or seating plan.

How to Use

  1. Enter n, the number of items.
  2. Enter r, how many you choose or arrange.
  3. Read combinations, permutations and factorial.

Features

  1. nCr and nPr
  2. With and without repetition
  3. Factorial
  4. Exact big-integer results
  5. Formulas shown
  6. 100% client-side

FAQs

What's the difference between a permutation and a combination?

A combination is a selection where order doesn't matter (a team); a permutation is an arrangement where it does (a podium or PIN).

How many ways can you choose 6 numbers from 49?

49C6 = 13,983,816.

What is a combination with repetition?

Choosing where the same item can be picked more than once, like scoops of ice cream from a set of flavors: C(n + r − 1, r).

How big can n be?

Up to 5,000. Results are exact big integers, shown in scientific form when very long.

Is anything uploaded?

No. It's calculated in your browser.

Technical Details

Results are exact because they're computed with JavaScript's arbitrary-precision BigInt rather than floating point. Combinations C(n, r) = n! ÷ (r!(n − r)!) are computed multiplicatively with r replaced by min(r, n − r), dividing at each step so intermediate values stay as small as possible. Permutations P(n, r) = n! ÷ (n − r)! multiply the top r factors. Combinations with repetition (multisets) are C(n + r − 1, r), and permutations with repetition are nʳ. The factorial n! is shown too. Values up to 60 digits are displayed in full with separators; longer ones are shown as d.dddddd × 10^k with the exact exponent. If r is larger than n there are no ways to choose without repetition, and the result is 0.

Calculators & Converters

Calculators & Converters

  • Equation Solver
  • Quadratic Equation Solver
  • Exponent & Logarithm Calculator
  • Fraction Calculator
  • GCD & LCM Calculator
  • Matrix Calculator
  • Prime Number Checker
  • Ratio & Proportion Calculator