Updated Combinatorics Tool

Factorial Calculator

Compute \(n!\), permutations \(nP r\) and combinations \(nC r\) with exact integer results, digit counts and small factorial tables in a single, easy-to-use calculator.

n Factorial Permutations \(nP r\) Combinations \(nC r\) Digit Counts & Tables

Factorials, Permutations and Combinations

This Factorial Calculator helps you work with the basic building blocks of combinatorics. You can compute \(n!\) for non-negative integers, evaluate permutations \(nP r\) and combinations \(nC r\), see how many digits the results contain and generate a small factorial table up to a chosen value of \(n\).

The factorial of a non-negative integer \(n\) is defined by \[ n! = n \times (n - 1) \times (n - 2) \times \dots \times 2 \times 1, \] with the special case \[ 0! = 1. \] This tab computes exact integer values using high-precision arithmetic for reasonably large \(n\).

The number of permutations of \(r\) objects chosen from \(n\) distinct objects (order matters) is \[ {}_n P_r = \frac{n!}{(n - r)!} = n \times (n - 1) \times \dots \times (n - r + 1). \] Use this tab when you care about how many ordered arrangements are possible.

The number of combinations of \(r\) objects chosen from \(n\) distinct objects (order does not matter) is \[ {}_n C_r = \binom{n}{r} = \frac{n!}{r!(n - r)!}. \] Use this tab when you care about how many distinct subsets of size \(r\) you can form from \(n\) items.

Factorial Calculator – n!, Permutations and Combinations

The Factorial Calculator on MyTimeCalculator is designed for quick combinatorics work. It computes factorials \(n!\) for non-negative integers, as well as permutations \({}_n P_r\) and combinations \({}_n C_r\). For each calculation, it returns an exact integer result (within sensible limits) and reports how many digits the number contains, which is especially helpful for very large values.

Factorials, permutations and combinations are used in probability, statistics, counting problems, discrete mathematics, computer science and many practical applications such as counting possible passwords or analysing lottery odds.

1. Definition of the Factorial Function

For a non-negative integer \(n\), the factorial of \(n\) is defined as the product of all positive integers up to \(n\):

\[ n! = n \times (n - 1) \times (n - 2) \times \dots \times 2 \times 1. \]

By convention, the empty product is taken to be 1, so the special case is

\[ 0! = 1. \]

Factorials grow very quickly. For example:

  • \(5! = 120\)
  • \(10! = 3\,628\,800\)
  • \(20! = 2\,432\,902\,008\,176\,640\,000\)

Because of this rapid growth, even moderate values of \(n\) lead to factorials with dozens or hundreds of digits. The calculator uses high-precision integer arithmetic so that these values are computed exactly.

2. Permutations – Ordered Arrangements

A permutation counts how many ordered arrangements of a subset of items are possible. If there are \(n\) distinct items in total and you choose \(r\) of them to arrange in order, the number of permutations is

\[ {}_n P_r = \frac{n!}{(n - r)!}, \]

which can also be written as the product

\[ {}_n P_r = n \times (n - 1) \times (n - 2) \times \dots \times (n - r + 1). \]

Typical use cases include:

  • Counting the number of possible orderings of \(r\) people chosen from \(n\) candidates.
  • Counting possible PIN codes or arrangements where order matters.
  • Analysing sequences in which the relative order of items is important.

3. Combinations – Unordered Selections

A combination counts how many ways you can choose a subset of items when order does not matter. If there are \(n\) distinct items and you choose \(r\) of them without regard to order, the number of combinations is

\[ {}_n C_r = \binom{n}{r} = \frac{n!}{r!(n - r)!}. \]

Since

\[ \binom{n}{r} = \binom{n}{n - r}, \]

it is often convenient to evaluate combinations using the smaller of \(r\) and \(n - r\). The calculator uses a multiplicative formula to keep the intermediate numbers as small as possible while still returning an exact integer result.

Combinations are widely used in:

  • Lottery and card game probability calculations.
  • Counting the number of possible teams or committees of size \(r\) from \(n\) people.
  • Binomial probability formulas and many statistical models.

4. How to Use the Factorial Calculator

  1. Factorial tab: Enter a non-negative integer \(n\) between 0 and the specified maximum, and optionally choose how far the factorial table should run. The calculator returns \(n!\), the number of digits and a small table of values from 0 up to your chosen limit.
  2. Permutations tab: Enter \(n\) and \(r\) with \(0 \le r \le n\). The calculator computes \({}_n P_r\), reports how many digits it has and explains what the number represents.
  3. Combinations tab: Enter \(n\) and \(r\) again with \(0 \le r \le n\). The calculator computes \(\binom{n}{r}\) and summarises the interpretation of the result as an unordered selection.
  4. Interpret digit counts: Digit counts help you understand how large the numbers are, even when they are too big to read comfortably in decimal form.

5. Practical Tips and Limitations

Even with efficient algorithms, factorials and related quantities become extremely large very quickly. For this reason, the calculator limits \(n\) to a maximum value so that the computation remains responsive in a web browser. Within these limits, results are computed exactly using integer arithmetic rather than rounded approximations.

For problems that involve probabilities like \(\frac{\binom{n}{r}}{2^n}\), it is often useful to combine factorial, permutation and combination calculations with other tools such as a binomial probability calculator or a normal approximation calculator.

Related Tools from MyTimeCalculator

Factorial Calculator FAQs

Frequently Asked Questions

Quick answers to common questions about factorials, permutations and combinations, and how to use this calculator effectively.

The value \(0! = 1\) is chosen so that factorials are consistent with combinatorics formulas. For example, the number of ways to choose zero objects from \(n\) objects is \(\binom{n}{0} = 1\), and the formula \(\binom{n}{0} = \frac{n!}{0!(n-0)!}\) only works if \(0! = 1\). It also fits the idea of an empty product, which is defined to be 1.

Permutations count the number of ordered arrangements, so changing the order creates a different permutation. Combinations count the number of unordered selections, so only the set of chosen items matters, not the order. As a rule of thumb: if order matters, use permutations; if order does not matter, use combinations.

Factorials grow extraordinarily quickly. Very large values of \(n\) lead to numbers with thousands of digits, which can be slow to compute and display in a web browser. The calculator therefore sets a maximum value for \(n\) that balances exactness, performance and usability for most practical problems encountered in coursework and applied work.

No. This calculator is designed specifically for factorials of non-negative integers and for discrete permutations and combinations. There is a continuous extension of the factorial function called the gamma function, denoted \(\Gamma(x)\), which applies to many non-integer values, but that requires a different numerical approach and is not covered here.

Many discrete probability formulas involve factorials, permutations and combinations. For example, the binomial coefficient \(\binom{n}{r}\) appears in binomial probabilities, and permutations are used when counting the number of possible orderings. You can compute the needed factorial, permutation or combination here and then plug the result into larger probability or statistics calculations.