Factorial Calculator

Written by:
PK

Calculate factorials (n!) instantly - the product of all positive integers from 1 to n.

Factorial Calculator

What is a factorial?

The factorial of n (written n!) is the product of all positive integers from 1 to n.

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

By definition, 0! = 1. Factorials grow extremely fast - 20! already exceeds 2 quintillion.

Using the calculator

Enter any non-negative integer to calculate its factorial. The calculator handles values up to 170! (beyond that, results exceed JavaScript number limits).

Large results display in scientific notation for readability.

Factorial applications

Factorials are fundamental to combinatorics:

  • Permutations - n! gives arrangements of n distinct items
  • Combinations - C(n,r) = n! / (r!(n-r)!)
  • Probability - counting outcomes in sample spaces

Related calculators

      

PK

PK started DQYDJ in 2009 to research and discuss finance and investing and help answer financial questions. He's expanded DQYDJ to build visualizations, calculators, and interactive tools.

PK lives in New Hampshire with his wife, kids, and dog.

Don't Quit Your Day Job...

DQYDJ may be compensated by our partners if you make purchases through links. See our disclosures page. As an Amazon Associate we earn from qualifying purchases.
Sign Up For Emails
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram