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.

Formulas Used

Let \(n\) be the number of distinct items and \(r\) the number chosen.

  • 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.

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