Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Factorial Calculator

Factorial Calculator

Calculate the factorial (n!) of any whole number from 0 to 170, with step-by-step multiplication for small values and scientific notation for large ones.

Factorial Calculator

The factorial of a non-negative integer n, written n!, is the product of every positive integer from 1 up to n. This calculator returns n! the moment you type a value, shows the step-by-step multiplication for small numbers, and switches to scientific notation once results grow astronomically large.

Formula: n! = n × (n − 1) × (n − 2) × … × 2 × 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1.

Why Factorials Matter

Permutations

The number of ways to arrange n distinct items in order is exactly n!.

Probability

Combinations and the odds of specific arrangements are built directly from factorials.

Series & Analysis

Factorials appear in Taylor series, exponential expansions, and many calculus formulas.

How to Calculate a Factorial

1

Enter a Non-Negative Integer

Type any whole number from 0 to 170. The upper limit exists because 171! exceeds the largest number standard double-precision arithmetic can represent.

2

Read n! Instantly

The result appears immediately on the formula line — there is no submit button. Smaller results use thousands separators; results above 10¹⁵ are shown in scientific notation so they stay readable.

3

Follow the Steps

For inputs from 2 to 10, the calculator lists the full multiplication chain so you can see how the product is built term by term.

Whole numbers only: the standard factorial is defined for non-negative integers. Decimals and negative numbers have no ordinary factorial.

Features

Range 0 to 170

Compute very large factorials, all the way to the maximum supported by standard double precision.

Step-by-Step Display

See the full multiplication breakdown for inputs from 2 to 10 to understand each result.

Scientific Notation

Enormous results are formatted compactly, e.g. 100! ≈ 9.33 × 10¹⁵⁷.

Live Results

n! recalculates on every keystroke — no submit button and no page reload.

Private by design: every factorial is computed in your browser — nothing you enter is uploaded to a server.

Common Factorial Values

ExpressionValue
0!1
1!1
5!120
10!3,628,800
20!2.43 × 10¹⁸
100!9.33 × 10¹⁵⁷

Frequently Asked Questions

What is a factorial?

The factorial of n (written n!) is the product of all positive integers up to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. It counts how many ways n distinct objects can be arranged in order.

How do you calculate a factorial by hand?

Multiply the number by every whole number below it down to 1: n! = n × (n − 1) × … × 2 × 1. So 4! = 4 × 3 × 2 × 1 = 24. This calculator does the same multiplication for you and lists each step for inputs from 2 to 10.

Why is 0! equal to 1?

By convention, 0! = 1. There is exactly one way to arrange an empty set — do nothing — and this definition keeps the formulas in combinatorics and series consistent.

Why is the maximum input 170?

171! is larger than the maximum value standard double-precision floating-point numbers can hold, so it would overflow to infinity. The calculator caps the input at 170 to keep every result meaningful.

Can I take the factorial of a decimal or negative number?

The ordinary factorial is defined only for non-negative integers. Fractional and negative values require the gamma function, a more advanced extension that this calculator does not compute.

What are factorials used for?

Factorials count arrangements, so they are central to permutations, combinations, and probability. They also appear in Taylor and exponential series throughout calculus and physics.

log₁₀(x) = ?
-
n! = ?
-
Calculation Steps
|x| = ?
-
0
round()
Nearest
-
floor()
Round Down
-
ceil()
Round Up
-
trunc()
Truncate
-
mod
a mod b = ?
-
Explanation
Enter any whole number from 0 to 170
0! = 1 by definition
Step-by-step multiplication is shown for n from 2 to 10
Results above 10¹⁵ switch to scientific notation
All calculations run locally in your browser
Want to learn more? Read documentation →
1/6
Start typing to search...
Searching...
No results found
Try searching with different keywords