Trailing zeros in 40 factorial = 9

Quick Answer: 9 trailing zeros in 40!
Legendre's Formula: Count factors of 5 in 40! ⌊40/5⌋ = 8 + ⌊40/25⌋ = 1 = 9

Factorial Calculator Until 10,000

Trailing Zeros in 40!
Trailing zeros in 40! = 9

How 40! is calculated

  • The number of trailing zeros in 40! is 9.
  • The number of digits in 40 factorial is 48.
  • The factorial of 40 is calculated, through its definition, this way:
  • 40! = 40 • 39 • 38 • 37 • 36 ... 3 • 2 • 1

Exact value of 40!

  • 40! = 815915283247897734345611269596115894272000000000

Nearby Factorials

n n! Digits Trailing Zeros
35! 10333147...0000 41 8
36! 37199332...0000 42 8
37! 13763753...0000 44 8
38! 52302261...0000 45 8
39! 20397882...0000 47 8
40! 81591528...0000 48 9
41! 33452526...0000 50 9
42! 14050061...0000 52 9
43! 60415263...0000 53 9
44! 26582715...0000 55 9
45! 11962222...0000 57 10

More factorial calculations

Here you can find answers to questions like: What is the number of zeros on the end of 40 factorial What is the factorial of 40? What is the last digits of factorial of 40? How many trailing zeros in 40 factorial? How many digits are there in 40 factorial? Use the factorial calculator above to find the factorial of any natural between 0 and 10,000.

What is factorial?

Definition of factorial

The factorial is a quantity defined for any integer n greater than or equal to 0.

The factorial is the product of all integers less than or equal to n but greater than or equal to 1. The factorial value of 0 is, by definition, equal to 1. For negative integers, factorials are not defined. The factorial can be seen as the result of multiplying a sequence of descending natural numbers (such as 3 × 2 × 1).

The factorial symbol is the exclamation mark (!).

The factorial formula

If n is a natural number greater than or equal to 1, then

n! = n x (n - 1) x (n - 2) x (n - 3) ... 3 x 2 x 1

If n = 0, then n! = 1, by convention.

Example: 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720

Shortcut to find trailing zeros in a factorial

Trailing zeros are a sequence of zeros in the decimal representation of a number, after which no other digits follow. This video shows how to find the trailing zeros of a factorial easily.

Table of factorials until 30

n n!
1! 1 #
2! 2 #
3! 6 #
4! 24 #
5! 120 #
6! 720 #
7! 5040 #
8! 40320 #
9! 362880 #
10! 3628800 #
11! 39916800 #
12! 479001600 #
13! 6227020800 #
14! 87178291200 #
15! 1307674368000 #
16! 20922789888000 #
17! 355687428096000 #
18! 6402373705728000 #
19! 121645100408832000 #
20! 2432902008176640000 #
21! 51090942171709440000 #
22! 1124000727777607680000 #
23! 25852016738884976640000 #
24! 620448401733239439360000 #
25! 15511210043330985984000000 #
26! 403291461126605635584000000 #
27! 10888869450418352160768000000 #
28! 304888344611713860501504000000 #
29! 8841761993739701954543616000000 #
30! 265252859812191058636308480000000 #

Frequently Asked Questions

How many trailing zeros are in 40 factorial?

There are 9 trailing zeros in 40!. This is calculated using Legendre's formula: count how many times 5 divides into 40, then 25, then 125, and so on, adding up all the quotients.

What is Legendre's formula?

Legendre's formula calculates the number of trailing zeros in n! by summing ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + ... until the quotient becomes 0. Each trailing zero comes from a factor of 10, which requires one factor of 2 and one factor of 5.

Factorial Calculator

Factorial Calculator

Please link to this page! Just right click on the above image, choose copy link address, then past it in your HTML.

Popular Factorial Calculations

Top factorial calculations based on search data:

Trailing Zeros in Factorials

Find how many trailing zeros are in n! using Legendre's formula:

Digits in Factorials

Find how many digits are in n! using Stirling's approximation: