Permutations & Combinations with Repetition (n^r, nHr)

Compute n^r (ordered sequences with repeats) or nHr (unordered selections with repeats), with Exact BigInt results or fast scientific notation.

All computations run locally in your browser. Use “Copy shareable URL” to share the same inputs, and enable Teacher mode to see common pitfalls.

Other languages: en | ja | zh-CN | es

How to use (3 steps)

  1. Select a mode: n^r for ordered sequences, or nHr for unordered selections (both allow repeats).
  2. Enter n (types) and r (length / picks). Default values show a common PIN example.
  3. Switch to Approx when Exact is too large to display. Copy the URL to share exactly what you see.
Mode

n^r

Precision

Result

Value:
Digits:
Scientific notation:

Digits and scientific notation help you understand scale even when the exact integer is too large to display.

History

    Growth chart (n fixed, r increases)

    Shows how fast counts grow as r increases with n fixed. Blue: n^r. Green: nHr (multichoose).

    Permutation (n^r) Combination (nHr)

    FAQ

    What is the difference between permutations and combinations with repetition?

    Permutations with repetition count ordered sequences (AB ≠ BA). Combinations with repetition count unordered selections (AB = BA), allowing repeats.

    How do you compute nHr?

    nHr can be rewritten as a binomial coefficient: nHr = C(n+r-1, r) = C(n+r-1, n-1).

    Can r be larger than n?

    Yes. With repetition allowed, you can pick the same type multiple times, so r > n is valid.

    When should I use Exact vs Approx?

    Use Exact for manageable sizes when you need the full integer. Use Approx when the integer is huge; you still see the digit count and scientific notation.

    How does this calculator treat 0^0?

    This tool defines n^0 = 1 and treats 0^0 as 1, since the empty sequence is counted as one outcome.

    Related