How to Use a Factorial Calculator
The Factorial Calculator calculates factorials, permutations, and combinations. It accepts optional n and r inputs, with factorial mode and 0 as the defaults.
What this calculator can do
The Factorial Calculator helps you work with three related counting operations: factorials, permutations, and combinations. It is useful when you need a numerical result from values such as n and r without working through the calculation by hand.
The tool uses two optional numeric inputs. n is the main value, while r is used with permutations and combinations. If you leave an input blank, it defaults to 0. The operation mode is also optional and starts in factorial mode, so you can use the tool for a basic factorial calculation with minimal setup.
How to use the Factorial Calculator
-
Choose the operation mode. Select factorial for n!, permutation for ordered selections, or combination for unordered selections.
-
Enter a non-negative number in the n field. For factorial calculations, n is the value whose factorial you want. For permutations and combinations, n is the total number of items or choices.
-
If you selected permutation or combination, enter a non-negative value in r. This represents the number of items selected from n. Keep r no greater than n.
-
Submit the calculation using the available control. If you do not provide n or r, the tool uses 0 for that input. If you do not choose a mode, it uses factorial mode.
-
Read the returned result and check that the selected mode matches your intended operation. For example, a permutation counts ordered arrangements, while a combination counts selections without order. A factorial applies to one non-negative value rather than a pair of values.
Before submitting, review the mode and inputs together. A value can be suitable for one operation but not another. In factorial mode, n must be no greater than 170. In permutation and combination modes, both n and r must be non-negative, and r must not exceed n. Values outside those conditions lead to a failed calculation rather than a valid result.
How to read the result
The result represents the operation you selected. In factorial mode, the calculator returns the factorial of n. In permutation mode, it returns the count of ordered arrangements based on n and r. In combination mode, it returns the count of selections based on those inputs.
Use the mode name and the values you entered to interpret the number. The same n and r pair can produce different results in permutation and combination modes because order is treated differently. For a factorial, r does not change the calculation.
A successful result is a calculated number. A failed calculation indicates that the inputs do not satisfy the conditions for the selected mode, such as a negative value or an r value greater than n. An unrecognized operation mode is rejected rather than interpreted as one of the supported calculations.
Worked example
A user needs the number of ordered arrangements made by choosing 2 items from a group of 5.
Select permutation, enter n as 5 and r as 2, then submit the calculation.
The calculator returns 20 for the selected permutation calculation.
Limitations
- Factorial mode rejects n greater than 170. Negative inputs, r greater than n in permutation or combination mode, and unsupported operation modes do not produce a valid calculation.
Common errors
- Cause: entering an r value greater than n for a permutation or combination. Correction: reduce r or increase n so that r is no greater than n before submitting.
FAQ
What happens when I leave an input blank?
If you leave n or r blank, that input defaults to 0. If you do not select an operation mode, the calculator uses factorial mode.
What values can I use for a factorial?
Factorial mode accepts non-negative n values up to 170. A factorial with n equal to 0 returns 1, and a factorial with n equal to 5 returns 120.
Can I calculate permutations and combinations?
Select permutation or combination, enter non-negative n and r values, and keep r no greater than n. With n equal to 5 and r equal to 2, permutation returns 20 and combination returns 10.