Factorial Calculator

Calculate the factorial of a number (n!).

Math

Calculate Factorials Quickly

The factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. It's a fundamental operation in many areas of mathematics, particularly in combinatorics and probability.

The Factorial Formula Explained

n! = n * (n-1) * (n-2) * ... * 1

  • By definition, the factorial of 0 (0!) is 1.

How to Use the Calculator

  1. Number (n): Enter the non-negative integer for which you want to calculate the factorial.
  2. Calculate: The calculator will display the result.

Real-World Example

You want to calculate 5!.

  • Calculation: 5! = 5 * 4 * 3 * 2 * 1 = 120

Frequently Asked Questions (FAQ)

  • Why is 0! equal to 1? This is a convention that makes many mathematical formulas, especially in combinatorics, work correctly. One way to think about it is that there is exactly one way to arrange zero objects (by doing nothing).
  • What are factorials used for? They are used to count the number of ways a set of items can be arranged. For example, if you have 5 books, there are 5! (120) different ways to arrange them on a shelf. This is a basic permutation.
  • Why does the calculator show 'Infinity' for large numbers? Factorial values grow extremely quickly. Standard computer data types have a limit to the size of the number they can store. For numbers larger than about 170, the result of the factorial is too large to be represented and is effectively infinite for standard calculations.