Sumwise

Factorial of 368

368! = 1240909532080691214370719697507877940232073429038028481412076749241747851360905494239051424529815027718332208080331279552933815666831455295665811844726104596242035651747343728788933150754737010925810900265707872922515356864147687424641667044574649805451634768245390892466747040494736953953748595863933584788981423234888355737865216238369064054339974630931597015666607798192746149443852298273796366868557770359453872318601176361187845166592647608334500120447541780900022609964276442245472824329914219506464087223790230090343713925348948181398718454152893444919937292387274515520794334565329219434221561001904652928990877908557811412318927308710811102546244974541473450432949833472902407434190559641600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

787 digits

Sumwise · Maintained by Theo Abbott (pen name) · automated checks · Data: exact arithmetic; unit definitions from NIST SP 811 · Updated · How the checks work

How it is calculated

368! = 368 × 367 × … × 2 × 1 = 1240909532080691214370719697507877940232…

Facts about 368!

Digits787
Trailing zeros89 (one for every factor 5 × 2)
Stirling estimate≈ Infinity
368! ÷ 367!368

Nearby factorials

366!918811109525449601921217… (781 digits)
367!337203677195840003905086… (784 digits)
369!457895617337775058102795… (789 digits)
370!169421378414976771498034… (792 digits)

What are factorials used for?

Counting arrangements: 368! is the number of different orders in which 368 distinct items can be lined up. Factorials also appear in probability, combinations and series.

Counting with 368!

There are 1.2409 × 10^786 different ways to arrange 368 different books on a shelf: 368 choices for the first place, 367 for the second, and so on down to one choice for the last. If you only fill the first three places, as with gold, silver and bronze among 368 runners, there are 368 × 367 × 366 = 49,430,496 possible podiums. If the order does not matter, divide by 3! = 6 to get 8,238,416 ways to choose a group of three. Choosing a pair from 368 people can be done in 67,528 ways.

In probability, if 368 names are drawn out of a hat one at a time, the chance of drawing them in one particular order is 1 in 1.2409 × 10^786. That is why shuffled decks and passwords with many symbols are so hard to guess.

How big is 368!?

368! has 787 digits, so it is larger than the estimated number of atoms in the observable universe (about 10^80). The digits add up to 3132, a multiple of 9, as they are for every factorial from 6! on. Stirling's formula, √(2πn) × (n/e)^n, gives a close estimate without multiplying everything out, and gets more accurate as n grows.

Prime factors of 368!

Every prime up to 368 divides 368!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 368! that gives 2^364 × 3^180 × 5^89 × 7^60 × 11^36 × 13^30 × 17^22 × 19^20 × 23^16 × 29^12 × … (73 primes in all). The 89 trailing zeros come from pairing the 89 factors of 5 with factors of 2.

Shuffles where nothing stays put

A related count is the number of derangements of 368 items: orders in which no item ends up in its original place, as in a Secret Santa where nobody draws their own name. The count is the whole number nearest to 368! ÷ e, so about 36.8% of all 1.2409 × 10^786 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.

Computing 368! yourself

In Excel or Google Sheets, type =FACT(368). Spreadsheets keep only 15 significant digits, so from 18! on the result is rounded, and FACT stops at 170!, the largest factorial that fits in a standard floating-point number. In Python, math.factorial(368) returns the exact integer with all 787 digits, because Python integers have no size limit. The gamma function extends factorials to fractions: Γ(n + 1) = n!, so (1/2)! = √π ÷ 2 ≈ 0.8862.

Why is 0! equal to 1?

There is exactly one way to arrange nothing, and the rule n! = n × (n − 1)! only works for n = 1 if 0! = 1. Defining it this way keeps formulas for combinations and series correct at the edges.

Calculate another factorial

How answers are calculated and checked: methodology.

Questions

What is 368 factorial?

368! is the product of every whole number from 1 to 368.

How many digits does 368! have?

787. The number of digits of n! is the whole part of log10(n!) plus one.

How many zeros are at the end of 368!?

89. Count the factors of 5 in the numbers 1 to 368: there are always more factors of 2, so every 5 makes one trailing zero.

Is 368! divisible by 369?

Yes. 369 is not prime, so its factors already appear among the numbers 1 to 368.

What is the last non-zero digit of 368!?

6. Strip the 89 trailing zeros and look at the digit that is left at the end.

What is 369! in terms of 368!?

369! = 369 × 368!. Each factorial is the previous one multiplied by the next whole number.