Factorial Calculator
Factorial Calculator
Calculate the factorial of a whole number from 0 to 170. Find n! instantly and learn the factorial formula, examples, and applications.
Enter your values
Enter a whole number and select Calculate.
Factorial Calculator – Calculate n! for Any Whole Number
Use this free Factorial Calculator to find the factorial of a non-negative integer quickly. Enter a whole number from 0 to 170 to calculate its factorial, written as n!. The calculator multiplies the number by every positive integer below it, with the special rule that zero factorial equals one. It is useful for mathematics homework, permutations, combinations, probability, and counting problems.
To calculate a factorial, enter the number in the input field and select Calculate. The result is displayed instantly. Select Clear to remove the input and start another calculation.
What Is a Factorial?
A factorial is the product of all positive whole numbers from a given non-negative integer down to 1. The symbol for factorial is an exclamation mark (!), placed after the number. For example, 5! means 5 multiplied by 4, 3, 2, and 1. Factorials grow very quickly as the input increases and are commonly used in counting, arrangements, probability, and combinatorics.
Example: 5! = 5 × 4 × 3 × 2 × 1 = 120.
Special case: 0! = 1. This is a standard mathematical definition used in factorial formulas, permutations, and combinations.
Factorial Formula
n! = n × (n − 1) × (n − 2) × … × 2 × 1, for n ≥ 1.
0! = 1
The recursive relationship is n! = n × (n − 1)! for n ≥ 1. In this relationship, the factorial of a number is the number multiplied by the factorial of the previous whole number.
How to Use This Factorial Calculator
- Enter a non-negative whole number in the input field.
- Make sure the value is an integer between 0 and 170.
- Select Calculate to find the factorial.
- Read the result displayed below the calculator buttons.
- Select Clear to reset the calculator and enter another number.
Factorials are defined for non-negative integers in this calculator. Negative numbers and decimal values are not accepted. The maximum input is 170 because 171! is larger than the finite range of standard JavaScript numbers.
Factorial Examples with Step-by-Step Working
Example 1: Find 3 factorial (3!)
3! = 3 × 2 × 1 = 6.
Answer: 3! = 6.
Example 2: Find 5 factorial (5!)
5! = 5 × 4 × 3 × 2 × 1 = 120.
Answer: 5! = 120.
Example 3: Find 0 factorial (0!)
By the standard mathematical definition, 0! = 1.
Answer: 0! = 1.
Example 4: Find 6 factorial (6!)
6! = 6 × 5 × 4 × 3 × 2 × 1 = 720.
Answer: 6! = 720.
Factorial Values Table
These common factorial values can help you check calculations and understand how quickly factorial results increase.
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
What Are Factorials Used For?
- Permutations: counting the number of ways to arrange distinct objects in a particular order.
- Combinations: calculating the number of ways to select items when order does not matter.
- Probability: working out possible arrangements and outcomes in probability problems.
- Algebra: evaluating expressions and formulas that contain factorial notation.
- Computer science: understanding counting problems and the growth of algorithms.
Factorial vs Permutation vs Combination
A factorial gives the product of consecutive positive integers. A permutation counts arrangements where order matters, while a combination counts selections where order does not matter. Factorials are used in both formulas: the number of permutations of n distinct objects is n!, and the number of ways to choose r objects from n is n! ÷ (r! × (n − r)!).
Frequently Asked Questions About Factorials
1. What is a factorial in mathematics?
A factorial is the product of all positive integers from a given non-negative integer down to 1. It is written using an exclamation mark, such as 5! = 120.
2. How do you calculate a factorial?
Multiply the input number by each positive whole number below it until you reach 1. For example, 4! = 4 × 3 × 2 × 1 = 24.
3. What is 0 factorial?
Zero factorial is 1. This is a standard mathematical definition that makes factorial formulas for combinations and permutations work consistently.
4. Why is 0! equal to 1?
It is defined as 1 to keep important counting identities and factorial formulas consistent. For example, the combination formula gives one way to choose zero items from a set.
5. What is the factorial symbol?
The factorial symbol is an exclamation mark (!). It is written after the number, so the factorial of 6 is written as 6!.
6. Can you calculate the factorial of a negative number?
This calculator accepts only non-negative integers. The ordinary factorial definition used here does not provide a factorial value for negative whole numbers.
7. Can you calculate the factorial of a decimal number?
This calculator is designed for whole-number inputs. Decimal factorials require an extension of the factorial function, such as the gamma function, and are not supported here.
8. Why does the calculator accept numbers only up to 170?
Factorials grow rapidly. In standard JavaScript number arithmetic, 170! is finite, while 171! exceeds the largest finite number that can be represented.
9. What is the difference between permutation and combination?
A permutation counts arrangements where order matters. A combination counts selections where order does not matter. Both formulas use factorials.
10. Is this Factorial Calculator free to use?
Yes. You can use the SRIKAMI Factorial Calculator online without paying a fee.
Explore Related Calculators
Use these related SRIKAMI tools for permutations, combinations, factors, and other mathematical calculations.
