# Factorial Calculator

URL: https://speedycalculator.com/calculators/math/factorial/
Last updated: 2026-10-30

> The factorial calculator computes n! = 1 × 2 × … × n exactly for any n up to 3,000, with the number of digits, trailing zeros and scientific notation.

## Inputs

- Number n

## Results

- n!
- Scientific notation
- Number of digits
- Trailing zeros

## Formula

```
n! = n × (n − 1) × … × 2 × 1,  0! = 1
```

## Explanation

Factorials count arrangements: there are 5! = 120 ways to line up five people and 52! ≈ 8 × 10⁶⁷ ways to shuffle a deck of cards. They grow faster than any exponential function, which is why exact calculation needs big-integer arithmetic.

### How to use the Factorial Calculator

- **Number n**

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

The calculator multiplies with exact whole numbers (BigInt) in your browser. Trailing zeros come from factors of 10 = 2 × 5; there are ⌊n/5⌋ + ⌊n/25⌋ + … of them.

## Worked example

Inputs — Number n: 25.

Results — **n! = 15,511,210,043,330,985,984,000,000 (≈ 1.551121 × 10²⁵, 26 digits)**; Scientific notation = 1.551121004 × 10²⁵; Number of digits = 26; Trailing zeros = 6.

## Key terms

- **Factorial**: The product of all positive integers up to n.

## FAQ

**Why is 0! = 1?**
There is exactly one way to arrange nothing, and it keeps formulas such as n! = n × (n − 1)! consistent.

**What is 10!?**
3,628,800.

**Can factorials be defined for fractions?**
Yes, through the gamma function: x! = Γ(x + 1).

**How many trailing zeros does 100! have?**
24.


## Sources

- [OpenStax – Contemporary Mathematics](https://openstax.org/details/books/contemporary-mathematics)
- [Wolfram MathWorld – Factorial](https://mathworld.wolfram.com/Factorial.html)
