Combination and Permutation Calculator (nCr & nPr)

Compute combinations and permutations for any valid n and r, with or without repetition. Review exact integer results, digit counts, and optional factorial breakdowns tailored to counting problems.

Input parameters

n is the total number of distinct objects. Recommended range: 0–500. For factorial steps keep n ≤ 50.

r is how many items you select or arrange. Without repetition, r cannot exceed n.

Type of counting
Repetition

Permutations with repetition use n^r; combinations with repetition use C(n + r − 1, r).

How to Use This Calculator

Enter the total number of distinct objects (n), how many you want to select or arrange (r), the counting mode, and whether repetition is allowed. Click Calculate to compute the exact integers and view metadata such as digit counts and the factorial breakdown.

Methodology

The calculator uses big integer math to evaluate factorials, binomial coefficients, and exponentiation so the results remain exact. The factorial expansion is provided for n and r ≤ 50 to keep the walkthrough readable. No floating-point rounding occurs, and intermediate values are formatted consistently for easy verification.

Definitions

  • Permutation: Ordered arrangement of r objects chosen from n, so swapping order produces a new permutation.
  • Combination: Unordered selection of r objects from n; the same elements count once regardless of order.

Typical use cases

  • Combinations: Lottery tickets, committees, subsets of features, portfolios where order is irrelevant.
  • Permutations: Seating arrangements, order-sensitive codes, rankings, or priority-sensitive assignments.

Worked example

Suppose n = 10 books and r = 3 are chosen.

  1. Permutations: \( {}_{10}P_3 = \frac{10!}{(10-3)!} = \frac{10!}{7!} = 10 \cdot 9 \cdot 8 = 720 \)

    There are 720 ordered arrangements of three books.

  2. Combinations: \( {}_{10}C_3 = \frac{10!}{3! \cdot 7!} = \frac{10 \cdot 9 \cdot 8}{3 \cdot 2 \cdot 1} = 120 \)

    There are 120 groups of three books ignoring order.

FAQ – Combinations & permutations

What is the difference between a permutation and a combination?
A permutation counts ordered arrangements; swapping order yields a different permutation. A combination counts unordered selections, so permutations that differ only by order collapse into the same combination.
When should I use permutations instead of combinations?
Use permutations when order matters: rankings, seats, sequences, or codes where position is important. Use combinations when you only care which items are included—committee selection, card hands, or subsets.
How large can n and r be?
The calculator accepts values up to n = 500 and r = 500, using big integers for exactness. Factorial walkthroughs remain readable for n, r ≤ 50; larger values still compute precise totals but omit step-by-step terms.
Why are combinations smaller than permutations for the same n and r?
Each combination of r objects can be arranged in r! different ways. Permutations count each arrangement separately, while combinations collapse those r! permutations into one outcome. Hence \( {}_nP_r = {}_nC_r \cdot r! \).

Full original guide (expanded)

Related Core Math & Algebra tools

Quick reminders

  • Permutation = order matters.
  • Combination = order does not matter.
  • \( {}_nP_r = {}_nC_r \cdot r! \).
  • With repetition: permutations \( n^r \ ), combinations \( \binom{n + r - 1}{r} \ ).
Formulas

Permutations (no repetition)

\( {}_nP_r = \frac{n!}{(n-r)!} \)

Combinations (no repetition)

\( {}_nC_r = \frac{n!}{r!(n-r)!} \)

Permutations with repetition

\( P_{\text{rep}}(n,r) = n^r \)

Combinations with repetition

\( C_{\text{rep}}(n,r) = \binom{n + r - 1}{r} = \frac{(n + r - 1)!}{r!(n - 1)!} \)

Worked example

\( {}_{10}P_3 = \frac{10!}{7!} = 10 \cdot 9 \cdot 8 = 720 \)
\( {}_{10}C_3 = \frac{10 \cdot 9 \cdot 8}{3 \cdot 2 \cdot 1} = 120 \)

Citations

NIST — Weights and measures — nist.gov · Accessed 2026-01-19
https://www.nist.gov/pml/weights-and-measures

FTC — Consumer advice — consumer.ftc.gov · Accessed 2026-01-19
https://consumer.ftc.gov/

Changelog

Version: 0.1.0-draft · Last code update: 2026-01-19

  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido Last Updated: 2026-01-19 Version 0.1.0-draft
Version 1.5.0