Skip to content
Math

Factorial Calculator

Last updated: July 11, 2026

Calculate the factorial of any non-negative integer up to 170. See the step-by-step multiplication breakdown, the double factorial, and the scientific notation result for large values.

How to Use This Factorial Calculator

Follow these simple steps to calculate a factorial:

  1. Enter a non-negative integer between 0 and 170 in the input field.
  2. Click the "Calculate" button.
  3. View the factorial result, step-by-step multiplication, and double factorial in the results section.

Factorial Formulas

The factorial of a non-negative integer n is the product of all positive integers less than or equal to n:

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

By convention, 0! = 1.

The double factorial n!! multiplies every other integer:

n!! = n × (n-2) × (n-4) × ... (stopping at 1 or 2)

For example: 7!! = 7 × 5 × 3 × 1 = 105

Examples

Example 1: 5!

5! = 5 × 4 × 3 × 2 × 1 = 120

Example 2: 0!

0! = 1 (by mathematical convention)
This convention ensures formulas like combinations and permutations work correctly.

Example 3: 10!

10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800

Frequently Asked Questions

What is a factorial?

A factorial, denoted by n!, is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials grow extremely fast — 20! is already over 2.4 quintillion. They are fundamental in combinatorics, probability, and series expansions.

Why is 0! equal to 1?

Setting 0! = 1 is a mathematical convention that makes many formulas consistent. For example, the number of ways to arrange 0 objects is exactly 1 (the empty arrangement). It also ensures that the recursive formula n! = n × (n-1)! works when n = 1: 1! = 1 × 0! = 1 × 1 = 1.

What are the applications of factorials?

Factorials are used in permutations (nPr = n!/(n-r)!), combinations (nCr = n!/[r!(n-r)!]), probability calculations, Taylor series expansions in calculus, binomial theorem coefficients, and many areas of computer science including algorithm analysis and dynamic programming.

Why is there a limit of 170?

170! is approximately 7.26 × 10³06, which is the largest factorial that fits within the range of standard 64-bit floating-point (double-precision) numbers. 171! exceeds the maximum representable value (~1.8 × 10³08) and results in infinity.

This calculator is for informational purposes only. Always consult a professional for critical mathematical or engineering applications.

Rate this calculator