← Math & statistics

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 日本語 | English | 简体中文 | 繁體中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

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

Results

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)

    Choose this page when repeats are allowed during the pick

    Use this calculator when the same item can be chosen again while building a sequence or multichoose result. Open nCr & nPr when repetition is not allowed, Stars and Bars when you want the multichoose identity directly, and Circular Permutation when order is cyclic rather than linear.

    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