Permutation & Combination Calculator (nPr, nCr)

Exact results (BigInt) + scientific approximation. Private by design—everything runs locally in your browser.

Inputs & Options

Non-negative integer
Non-negative integer
Order
Repetition

Results

Enter n and r, pick options, then press Calculate.

Tip: Press Ctrl/Cmd + Enter to calculate.

Permutation & Combination Calculator: what it does

This calculator helps you count possibilities when you’re choosing items from a set. It covers both permutations (order matters) and combinations (order doesn’t matter), with optional repetition when items can be reused. Whether you’re building a password, planning tournament brackets, or figuring out how many different teams can be formed, the tool gives you a fast, reliable answer.

Key ideas in plain language

Think of n as the number of available items and r as how many you want to pick. If you care about the order of the items—like arranging seats or ranking winners—you’re counting permutations. If you only care about the group itself—like choosing a committee or a set of lottery numbers—you’re counting combinations. When repetition is allowed, you can reuse the same item more than once (for example, a PIN code can repeat digits).

How to use the calculator

  1. Enter n, the total number of distinct items.
  2. Enter r, the number of items you want to choose.
  3. Choose whether order matters (permutation) or not (combination).
  4. Toggle repetition if items can be reused.
  5. Click Calculate to see exact results and an approximate scientific notation when numbers are huge.

Real-world examples

  • Passwords or PINs: Order matters and repetition is often allowed.
  • Sports rankings: First, second, and third place are different, so order matters.
  • Committees or teams: Order doesn’t matter; you just need the group.
  • Choosing toppings or menu combos: Often combinations, unless the sequence is important.

Formulas used

For those who want the math behind the results, the calculator uses these standard counting formulas:

  • Permutations, no repetition: \( \displaystyle P(n,r) = \frac{n!}{(n-r)!} \)
  • Combinations, no repetition: \( \displaystyle C(n,r) = \binom{n}{r} = \frac{n!}{r!(n-r)!} \)
  • Permutations with repetition: \( \displaystyle n^r \)
  • Combinations with repetition: \( \displaystyle \binom{n+r-1}{r} \)

Exact values are computed with BigInt. A scientific-notation approximation is also provided for large results.

Frequently Asked Questions

When should I pick permutations vs combinations?

Pick permutations when order matters (e.g., passwords, race rankings). Pick combinations when order does not matter (e.g., lottery tickets, committees).

What if r > n?

Without repetition, that’s invalid (you can’t choose more distinct items than exist). With repetition allowed, it’s fine.

Why do I see huge numbers?

These counts grow very quickly; we show both the exact integer and an approximate scientific notation like \(1.23 \\times 10^{45}\).

Is my data private?

Yes—everything runs entirely in your browser.

5 Fun Facts about Permutations & Combinations

Card shuffles are unique

There are 52! ways to order a deck—about 8×1067. Shuffle well and you likely create an arrangement the universe has never seen.

Astronomical counts

nCr is handshake math

A room of n people has C(n,2) unique handshakes. With 10 people, that’s 45 greetings.

Social graph

Pascal’s triangle hides them

Each row of Pascal’s triangle lists combination counts: row n gives C(n,0)…C(n,n). Adding a row always sums to 2ⁿ.

Binomial DNA

Passwords are permutations

A 6‑character code using 10 digits has 10⁶ possibilities. Add letters/symbols and order sensitivity explodes the search space.

Brute-force size

Stars-and-bars for repeats

Combinations with repetition use the classic “stars and bars” trick: C(n+r-1, r) counts ways to place r identical stars into n bins.

Counting hack

Explore more tools