Skip to content
Contania

Factorial Calculator

The factorial of n, written n!, is the product of every whole number from 1 up to n. It counts how many ways you can arrange n items and is the building block of permutations and combinations.

Your numbers

A whole number from 0 to 170.

Result

n!
120
Number of digits
3
Calculation
StepDetail
5!5 x 4 x 3 x 2 x 1
Result120
Number of digits3
Advertisement

How factorials work

n! multiplies all whole numbers from 1 to n: 5! = 5 x 4 x 3 x 2 x 1 = 120. By definition 0! = 1 (there is exactly one way to arrange nothing). Factorials grow extremely fast — 10! is already over 3.6 million, and 20! passes 2 quintillion.

Where factorials appear

Factorials count arrangements. The number of ways to order n distinct items is n!. They power permutations and combinations, and appear throughout probability, algebra (the binomial theorem) and calculus (Taylor series).

Frequently asked questions

Sources

  • Factorial (product of integers from 1 to n)

Embed this calculator

Copy the code and paste it into your site or blog. Credit with a link back to Contania is included, and the height adjusts itself.

<iframe src="https://contania.app/embed/math/factorial" title="Factorial Calculator (n!)" width="100%" height="720" loading="lazy" style="border:1px solid #e5e0d8;border-radius:12px;max-width:640px"></iframe>
<script>window.addEventListener("message",function(e){if(e.data&&e.data.type==="contania:embed-height"){var f=document.querySelector('iframe[src="https://contania.app/embed/math/factorial"]');if(f){f.style.height=e.data.height+"px"}}});</script>

Related calculators