🌐 EN

Advanced Permutation & Combination Calculator

Enter total items and items selected to compare permutations, combinations, and repeated-selection counts.

Results
Permutation (nPr) - Order matters
—
Combination (nCr) - Order doesn't matter
—
Permutation with repetition (n^r)
—
Combination with repetition H(n,r)
—
Derangement !n
—
n! (Factorial)
—
Permutation probability — Combination probability —

Formulas

nPr = n! / (n-r)!
nCr = n! / (r! × (n-r)!)
n^r (repetition allowed)
H(n,r) = C(n+r-1, r)
!n = n! × Σ((-1)^k / k!)

Visual Example

Selecting 3 from 5 items

Visual Example Selecting 3 from 5 items 1 2 3 4 5 Total items (n): 5, Items to select (r): 3

Inputs and checks

  • Enter whole-number Total items (n) and Items to select (r); defaults are 5 and 3.
  • Use 0≤r≤n≤170. The page rejects r greater than n even for repeated-selection calculations.
  • Use Calculate or change a value to refresh the counts. Enter integers because decimal inputs can be truncated.
  • Keep values moderate; factorial-based results may overflow or lose precision even within the visible n limit.

Reading the result

  • Outputs cover nPr, nCr, n^r, repeated combinations, derangements !n, and n!. Here n! means multiplying the integers from 1 to n (0! = 1), while !n counts arrangements of all n items in which no item stays in its original position.
  • The two percentages divide nPr and nCr by n^r; they are comparison ratios, not universal event probabilities.
  • The small selection picture always illustrates choosing 3 out of 5 and does not follow changed inputs.

Examples

Choose 3 from 5

Input
Total items (n): 5; selected (r): 3
Result
Permutations: 60; combinations: 10; repeated permutations: 125; repeated combinations: 35; derangements: 44; factorial: 120; permutation ratio: 48.0000%; combination ratio: 8.0000%
How to check it
5P3 = 5!/2! = 60; 5C3 = 60/3! = 10; 5³ = 125; C(7,3) = 35; !5 = 44; 60/125×100 = 48.0000%; 10/125×100 = 8.0000%.

Choose 2 from 4

Input
Total items (n): 4; selected (r): 2
Result
Permutations: 12; combinations: 6; repeated permutations: 16; repeated combinations: 10; derangements: 9; factorial: 24; permutation ratio: 75.0000%; combination ratio: 37.5000%
How to check it
4P2 = 4×3 = 12; 4C2 = 6; 4² = 16; C(5,2) = 10; !4 = 9; 12/16×100 = 75.0000%; 6/16×100 = 37.5000%.

Frequently asked questions

When should I use permutation rather than combination?
Use permutation when order matters, such as assigning first and second positions.
Why does the page reject r greater than n?
That is a shared input rule on this page, including its repeated-selection outputs.
Do the percentages represent any lottery odds?
No. They specifically compare nPr or nCr with n^r, the number of ordered draws with replacement.