Online Factorial Calculator
The PikaConverter Factorial Calculator is a free online math tool for calculating factorials, double factorials, permutations, and combinations. It helps you evaluate factorial expressions and solve common counting problems without performing lengthy multiplications manually.
The calculator offers four calculation modes: Factorial, Double, Permutation, and Combination. You can calculate the factorial of a nonnegative integer, evaluate a double factorial, count ordered arrangements, or determine the number of possible combinations.
This online factorial calculator is useful for students, teachers, programmers, mathematicians, and anyone studying algebra, combinatorics, probability, or statistics.
How to Use the Factorial Calculator
Follow these steps to calculate factorials and related expressions using PikaConverter:
Select a calculation mode: Choose Factorial, Double, Permutation, or Combination.
Enter your values: Provide the numerical inputs required for the selected calculation.
View the result: Check the calculated value in the Result section.
Review the formula: Refer to the mathematical formula displayed below the result.
Copy or share: Use the available options to copy or share your result.
In standard Factorial mode, the input field accepts values from 0 to 170.
Calculation Mode | Purpose | Example |
Factorial | Calculates the factorial of a number | 5! = 120 |
Double | Calculates the double factorial | 7!! = 105 |
Permutation | Counts ordered selections of distinct items | P(5, 2) = 20 |
Combination | Counts unordered selections of distinct items | C(5, 2) = 10 |
The appropriate calculation mode depends on whether you need a factorial value or want to count possible arrangements or selections.
What Is a Factorial?
A factorial is the product of all positive integers from 1 up to a given nonnegative integer.
Factorials are represented by an exclamation mark (!) placed after a number.
For example:
5! = 5 × 4 × 3 × 2 × 1 = 120
The factorial of 5 is 120.
Factorials are widely used in mathematics, especially in counting problems, probability theory, combinatorics, and statistical calculations.
Factorial Formula
The general factorial formula is:
n! = n × (n − 1) × (n − 2) × ... × 2 × 1
Where n is a nonnegative integer.
For n ≥ 1, factorials can also be calculated recursively:
n! = n × (n − 1)!
The initial condition is:
0! = 1
For example:
6! = 6 × 5!
6! = 6 × 120
6! = 720
This recursive relationship is useful for mathematical proofs and computer programming.
How to Calculate a Factorial
To calculate the factorial of a number manually, multiply the number by every positive integer smaller than it until you reach 1.
For example, calculate 7!:
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1
7! = 5040
Result: 7! = 5040
Using PikaConverter, select Factorial mode and enter 7 in the input field.
Why Is 0! Equal to 1?
By mathematical definition:
0! = 1
This convention ensures that factorial formulas remain consistent.
Factorials can be interpreted as the number of ways to arrange distinct objects. There is exactly one way to arrange zero objects: the empty arrangement.
The recursive factorial relationship also supports this definition:
1! = 1 × 0!
Since 1! = 1, it follows that 0! = 1.
The value of 0! is particularly important in combinations, permutations, binomial coefficients, and mathematical series.
Factorial Table
The following table lists the factorial values of integers from 0 to 20.
Number (n) | Factorial (n!) |
0 | 1 |
1 | 1 |
2 | 2 |
3 | 6 |
4 | 24 |
5 | 120 |
6 | 720 |
7 | 5,040 |
8 | 40,320 |
9 | 362,880 |
10 | 3,628,800 |
11 | 39,916,800 |
12 | 479,001,600 |
13 | 6,227,020,800 |
14 | 87,178,291,200 |
15 | 1,307,674,368,000 |
16 | 20,922,789,888,000 |
17 | 355,687,428,096,000 |
18 | 6,402,373,705,728,000 |
19 | 121,645,100,408,832,000 |
20 | 2,432,902,008,176,640,000 |
Factorial values grow rapidly as n increases.
For example, 5! equals 120, but 10! equals 3,628,800, and 20! contains 19 digits.
Double Factorial Calculator
A double factorial calculator evaluates the product of integers that decrease by 2 rather than 1.
The double factorial is represented by two exclamation marks:
n!!
Despite its name, a double factorial is not the factorial of a factorial.
For example:
5!! = 5 × 3 × 1 = 15
This is different from:
5! = 120
Double factorials are used in combinatorics, probability, mathematical analysis, and formulas involving products of odd or even integers.
Double Factorial Formula
For a positive integer n:
n!! = n × (n − 2) × (n − 4) × ...
The multiplication continues until it reaches 1 for odd numbers or 2 for even numbers.
The initial values are:
0!! = 1
1!! = 1
The recursive formula is:
n!! = n × (n − 2)!!
For example:
8!! = 8 × 6 × 4 × 2
8!! = 384
Odd and Even Double Factorials
Double factorials follow different multiplication patterns depending on whether n is odd or even.
For odd numbers:
7!! = 7 × 5 × 3 × 1
7!! = 105
For even numbers:
10!! = 10 × 8 × 6 × 4 × 2
10!! = 3840
The following table compares factorials and double factorials.
Number | Factorial (n!) | Double Factorial (n!!) |
0 | 1 | 1 |
1 | 1 | 1 |
2 | 2 | 2 |
3 | 6 | 3 |
4 | 24 | 8 |
5 | 120 | 15 |
6 | 720 | 48 |
7 | 5,040 | 105 |
8 | 40,320 | 384 |
9 | 362,880 | 945 |
10 | 3,628,800 | 3,840 |
Permutation Calculator
A permutation calculator determines the number of ways to select and arrange items when their order matters.
Permutations are commonly used in mathematics, probability, scheduling, rankings, and counting problems.
For example, selecting a president and vice president from five different people is a permutation problem because assigning the same two people to different positions produces a different arrangement.
Permutation Formula
For a selection of r distinct items from n distinct items without repetition, the formula is:
P(n, r) = n! / (n − r)!
This notation is also written as:
nPr
Where:
n is the total number of available items.
r is the number of items selected and arranged.
0 ≤ r ≤ n.
The formula assumes that each item can be selected only once.
How to Calculate Permutations
Suppose five students are competing for first and second place.
How many different ordered results are possible?
Use:
P(5, 2) = 5! / (5 − 2)!
P(5, 2) = 5! / 3!
P(5, 2) = 120 / 6
Result: P(5, 2) = 20
There are 20 possible ways to assign first and second place to two of the five students.
Permutations of All Items
When every distinct item is included in the arrangement, the number of permutations equals n!.
For example, the number of ways to arrange four distinct books on a shelf is:
P(4, 4) = 4!
Result: 24 arrangements
This illustrates the relationship between ordinary factorials and permutations.
Combination Calculator
A combination calculator determines the number of ways to select items from a group when the order of selection does not matter.
Unlike permutations, combinations count a group of selected items only once, regardless of their arrangement.
For example, selecting three students to form a committee is a combination problem if the members have no distinct assigned positions.
Combination Formula
The combination formula is:
C(n, r) = n! / [r! × (n − r)!]
This is also written as:
nCr
or:
(n choose r)
Where:
n is the total number of distinct items.
r is the number of items selected.
0 ≤ r ≤ n.
The formula assumes selection without repetition and that order is irrelevant.
How to Calculate Combinations
Suppose a group contains five students, and you want to select two of them.
The number of possible pairs is:
C(5, 2) = 5! / [2! × (5 − 2)!]
C(5, 2) = 120 / (2 × 6)
C(5, 2) = 120 / 12
Result: C(5, 2) = 10
There are 10 different pairs of students.
Reversing the order of the two selected students does not create a new combination.
Properties of Combinations
Combinations follow several useful identities.
C(n, 0) = 1
There is exactly one way to choose no items.
C(n, n) = 1
There is exactly one way to choose all available items.
C(n, r) = C(n, n − r)
Choosing r items is equivalent, in counting terms, to choosing the n − r items that remain.
For example:
C(6, 2) = 15
C(6, 4) = 15
Both calculations produce the same result.
Difference Between Permutations and Combinations
The main difference between permutations and combinations is whether the order of selected items matters.
Feature | Permutation | Combination |
Order matters | Yes | No |
Standard notation | nPr or P(n, r) | nCr or C(n, r) |
Formula | n! / (n − r)! | n! / [r!(n − r)!] |
Typical application | Rankings and ordered assignments | Groups and selections |
Example with n = 5, r = 2 | 20 | 10 |
For example, selecting two people for first and second place requires permutations.
Selecting two people to form an equal-status team requires combinations.
For standard selections of distinct items without repetition:
P(n, r) = C(n, r) × r!
This relationship exists because every combination of r distinct items can be arranged in r! different orders.
Factorial and Combinatorics Formulas
The following table summarizes common factorial and counting formulas.
Calculation | Formula | Example |
Factorial | n! = n × (n − 1) × ... × 1 | 5! = 120 |
Zero factorial | 0! = 1 | 0! = 1 |
Double factorial | n!! = n × (n − 2) × ... | 7!! = 105 |
Permutation | P(n, r) = n! / (n − r)! | P(5, 2) = 20 |
Combination | C(n, r) = n! / [r!(n − r)!] | C(5, 2) = 10 |
All-item permutation | P(n, n) = n! | P(4, 4) = 24 |
Combination symmetry | C(n, r) = C(n, n − r) | C(6, 2) = C(6, 4) = 15 |
These formulas apply to nonnegative integer inputs under the relevant mathematical conditions.
For permutations and combinations, the standard formulas shown assume distinct objects selected without replacement.
Why Do Factorials Grow So Quickly?
Factorials increase much faster than ordinary linear or polynomial expressions.
For every positive integer n:
(n + 1)! = (n + 1) × n!
This means that each new factorial multiplies the previous factorial by an increasingly large number.
For example:
5! = 120
6! = 720
7! = 5040
8! = 40320
9! = 362880
10! = 3628800
By the time n reaches 100, the factorial contains 158 decimal digits.
Stirling's Approximation
For large positive integers, factorials can be estimated using Stirling's approximation:
n! ≈ √(2πn) × (n/e)ⁿ
Where e is Euler's number and π is the mathematical constant pi.
The approximation becomes increasingly accurate in relative terms as n grows.
It is useful in probability, statistics, and mathematical analysis when exact factorial values are extremely large.
Stirling's formula provides an approximation, not an exact integer result.
Applications of Factorials
Factorials are important in mathematics, computer science, probability, and statistics.
Probability and Statistics
Factorials appear in formulas for probability distributions and counting possible outcomes.
For example, the binomial probability formula is:
P(X = k) = C(n, k) × pᵏ × (1 − p)^(n − k)
Where:
n is the number of independent trials.
k is the number of successes.
p is the probability of success in each trial.
The combination term counts the number of ways to obtain k successes in n trials.
Combinatorics
Combinatorics studies how objects can be selected, grouped, and arranged.
Factorials are fundamental to counting arrangements of distinct objects.
For example, six distinct books can be arranged on a shelf in:
6! = 720
different orders.
Computer Science
Factorials appear in algorithms, recursive programming exercises, and problems involving permutations.
They are commonly used to demonstrate recursion and iteration.
For example, the recursive factorial rule is:
n! = n × (n − 1)!
This relationship provides a simple example of a recursive mathematical function.
Mathematics and Calculus
Factorials occur in Taylor series and other mathematical expansions.
For example, the exponential function can be written as:
eˣ = Σ(n = 0 to ∞) xⁿ / n!
This infinite series connects factorials with exponential functions and calculus.
Scheduling and Arrangements
Permutations can help count the possible orders of tasks, assignments, or schedules.
For example, arranging five different presentations in a sequence gives:
5! = 120
possible orders.
The calculation assumes that every presentation is distinct and that each appears exactly once.
Common Factorial Calculation Mistakes
Understanding common mistakes can help prevent incorrect results.
Confusing factorials with powers: 5! = 120, while 5⁵ = 3125.
Assuming 0! equals zero: By definition, 0! = 1.
Confusing factorial and double factorial: 6! = 720, while 6!! = 48.
Using negative integers: Ordinary factorials are not defined for negative integers.
Entering decimal numbers: The elementary factorial function applies to nonnegative integers.
Confusing permutations and combinations: Permutations count ordered arrangements; combinations count unordered selections.
Using r greater than n: In standard selection without replacement, r cannot exceed n.
Ignoring numerical precision: Large factorials may be displayed approximately depending on the calculator's numerical implementation.
Assuming repetition is allowed: The standard nPr and nCr formulas shown here count selections without repetition.
Choosing the appropriate mode and checking the input values can help avoid these mistakes.
Frequently Asked Questions
What is a factorial calculator?
A factorial calculator is a mathematical tool that calculates the product of positive integers up to a given nonnegative integer. For example, 5! = 120.
How do I calculate factorials online?
Select Factorial mode in PikaConverter, enter a nonnegative integer within the displayed input range, and check the result.
What is the factorial formula?
The formula is n! = n × (n − 1) × ... × 2 × 1, with 0! = 1.
What is 0 factorial?
The value of 0! is 1 by mathematical definition.
What is 5 factorial?
5! = 5 × 4 × 3 × 2 × 1 = 120.
What is 10 factorial?
10! = 3,628,800.
What is 20 factorial?
20! = 2,432,902,008,176,640,000.
What is a double factorial?
A double factorial multiplies integers decreasing by 2. For example, 7!! = 7 × 5 × 3 × 1 = 105.
Is double factorial the same as factorial squared?
No. For example, 4!! = 8, while (4!)² = 576. These are different mathematical operations.
What is a permutation?
A permutation is an ordered arrangement or selection of distinct objects. The standard formula is P(n, r) = n! / (n − r)!.
What is a combination?
A combination is an unordered selection of distinct objects. The standard formula is C(n, r) = n! / [r!(n − r)!].
What is the difference between nPr and nCr?
nPr counts selections where order matters, while nCr counts selections where order does not matter.
What is 5P2?
5P2 = 5! / 3! = 20.
What is 5C2?
5C2 = 5! / (2! × 3!) = 10.
Can you calculate the factorial of a negative number?
The ordinary factorial operation is not defined for negative integers. The gamma function extends factorial-related mathematics to many non-integer values but has poles at nonpositive integers.
Can factorials be calculated for decimal numbers?
The ordinary factorial of a nonnegative integer is defined using multiplication. A related continuous extension uses the gamma function, but this is not the same as evaluating an ordinary integer factorial.
Why is the factorial calculator limited to 170?
The Factorial mode displays an input range of 0 to 170. This is a common limit in calculators using standard double-precision floating-point numbers because 170! remains finite, while 171! exceeds the largest finite value representable in that format.
The precise numerical precision and output formatting depend on the calculator's implementation.
Is the PikaConverter Factorial Calculator free?
Yes. PikaConverter provides a free online calculator with Factorial, Double, Permutation, and Combination modes.