Counting & Number Theory
Selections, Permutations & Repetition Count Calculator
Count r choices from n distinct available types under explicit ordering and replacement rules.
How the calculation works
Unordered without repetition: C(n,r). Ordered without repetition: n!/(n−r)!. Ordered with repetition: n^r. Unordered with repetition: C(n+r−1,r), with empty/zero-type cases handled explicitly. Integer multiplicative recurrences avoid floating-point factorial division.
Worked example
Example inputs — Distinct available types n: 5; Selections / positions r: 3; Counting convention: unordered_no. Expected results — Number of possible outcomes: 10.
Assumptions and limits
Exact integer arithmetic is used for counts and integer results. Computation limits keep this browser tool responsive. Specify whether objects/groups are distinguishable and whether order matters; different conventions count different outcomes. Empty choice r=0 counts as one outcome, including n=0. Impossible no-repetition choices return zero. These modes share one calculator instead of separate factorial/permutation/combination clones. Exact large counts may contain many digits.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- Modular Power, Inverse & Bezout Calculator
- Chinese Remainder & Compatible Congruences Calculator
- Prime Factorization, Divisors & Totient Calculator
- Exact Integer Base 2–36 Converter
- Decimal to Best Bounded-Denominator Fraction Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.