VastCalc
Math
Factorial Calculator
Calculate the factorial of any non-negative integer (n!). Also computes permutations, combinations, and double factorials.

Factorial Calculator

Calculate the factorial of any integer from 0 to 170, along with permutations and combinations. Essential for probability, combinatorics, and statistical calculations.

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n. By definition, 0! = 1.

Factorial Formula:

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

For example: 5! = 5 x 4 x 3 x 2 x 1 = 120.

Permutations and Combinations:

  • Permutations (nPr): The number of ways to arrange r items from n distinct items, where order matters: nPr = n! / (n-r)!
  • Combinations (nCr): The number of ways to choose r items from n distinct items, where order does not matter: nCr = n! / (r!(n-r)!)

Growth Rate:

Factorials grow extremely fast. 10! = 3,628,800; 20! = 2,432,902,008,176,640,000. This rapid growth is why factorials are central to Big O analysis in computer science and why brute-force algorithms become infeasible quickly.

Frequently Asked Questions

Search Calculators

Search across all calculator categories