🔢

Permutation and Combination Calculator

Compute permutations, combinations, factorials and repetition cases with big integers.
Perm & comb 📂 Study 👤 ToolWorld 🏷️ v1.5.0
Inputs
Total items n
Chosen items m
Repetition
Order matters

Results
Permutations P
-
Combinations C
-
Factorial n!
-
Permutations with repetition
-
Combinations with repetition
-
P / C ratio
-

How to Use

Introduction

The arithmetic behind permutations and combinations is simple; the nuisance is overflow, since 20 factorial already exceeds what a floating-point number can hold exactly. This page uses big integers throughout and writes all five results out in full instead of handing back something like 1.2e18.

With n = 10 and m = 4, permutations are 5040, combinations 210, the full factorial 3628800, permutations with repetition 10000, combinations with repetition 715, and P over C is 24, which is exactly 4 factorial. Set m to 0 and permutations, combinations and the repeated arrangement all collapse to 1.

The repetition and order selectors are recorded in the breakdown for reference. All five columns always use their standard formulas, so switching a selector never silently hides a result.

Key features

  • Two switches: Repetition and order change which formula applies, and the breakdown names the one in use.
  • Four results: P, C, repeat-permutation and repeat-combination are listed separately with distinct values.
  • Factorial: n factorial is included as its own result cell.
  • P over C: P divided by C equals m factorial, which is a handy way to check the figures.
  • Input checks: m above n, negatives and fractions are all rejected.
  • Plain combination: With repetition off and order ignored, only the ordinary combination applies.

How to use it

  1. Total items n: Enter how many distinct items are available; it must be a non-negative whole number.
  2. Chosen items m: Enter how many are taken each time. Without repetition, m cannot exceed n.
  3. Repetition: Set this to yes if an item may be picked more than once; the formula switches to the with-repetition version.
  4. Order matters: Yes gives a permutation, no gives a combination. The breakdown names which one this run used.
  5. Read the applicable value: Press Calculate and find the result marked as applicable to your current switches before comparing it with P, C, the factorial and the two repetition rows.

Things to keep in mind

  • n and m: m cannot exceed n.
  • Two switches: The repeat and order switches change which formula applies, and the breakdown names it.
  • Four results: P, C, repeat-permutation and repeat-combination are listed separately.
  • Large numbers: Large results stay as integers rather than scientific notation.
  • Whole numbers: Negative or fractional n and m are rejected.

The repeat and order switches are not cosmetic: four combinations of those two settings lead to four different formulas. The breakdown names the one that applies to the current selection. Results are kept as integers, so a large n will produce a long number rather than a rounded scientific-notation estimate; treat that length as a warning about the size of the search space.

With n at 7 and m at 3, the no-repeat ordered count and the no-repeat unordered count differ by a factor of six, because every group of three can be arranged six ways. Turning repetition on changes both of them again. Read the switch state printed in the breakdown before quoting any of the four values in a report.

Related

⏫︎
💬