Sumwise

Factorial of 386

386! = 30026653665208755582903334500006309331840963550392751166414718204997347258296126846525251605997303977136252641384570566954515779260131893735727406559429548661955500233594014175502079728445819877971506520886644560635298125105856946586322272180841211925215135767764368616636585036488965559254328399642834973493480491331159927087502486865275790593419975694001255882170029110362048989780498530347368509644603348329817463220632398077453006125177810243802152444512160666763938734987722477127049135501839059825828720981927085860291680960180685756876542658947974099940060041482693703970709106242919910269436629178729350146346432168104587855898538767917170874046952370631500453487874232848718422839042185815648481526066812229385926165797365455257600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

833 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

386! = 386 × 385 × … × 2 × 1 = 3002665366520875558290333450000630933184…

Facts about 386!

Digits833
Trailing zeros95 (one for every factor 5 × 2)
Stirling estimate≈ Infinity
386! ÷ 385!386

Nearby factorials

384!202050021298760215213668… (828 digits)
385!777892582000226828572625… (830 digits)
387!116203149684357884105835… (836 digits)
388!450868220775308590330643… (838 digits)

What are factorials used for?

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

Counting with 386!

There are 3.0026 × 10^832 different ways to arrange 386 different books on a shelf: 386 choices for the first place, 385 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 386 runners, there are 386 × 385 × 384 = 57,066,240 possible podiums. If the order does not matter, divide by 3! = 6 to get 9,511,040 ways to choose a group of three. Choosing a pair from 386 people can be done in 74,305 ways.

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

How big is 386!?

386! has 833 digits, so it is larger than the estimated number of atoms in the observable universe (about 10^80). The digits add up to 3366, 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 386!

Every prime up to 386 divides 386!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 386! that gives 2^383 × 3^189 × 5^95 × 7^63 × 11^38 × 13^31 × 17^23 × 19^21 × 23^16 × 29^13 × … (76 primes in all). The 95 trailing zeros come from pairing the 95 factors of 5 with factors of 2.

Shuffles where nothing stays put

A related count is the number of derangements of 386 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 386! ÷ e, so about 36.8% of all 3.0026 × 10^832 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.

Computing 386! yourself

In Excel or Google Sheets, type =FACT(386). 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(386) returns the exact integer with all 833 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 386 factorial?

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

How many digits does 386! have?

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

How many zeros are at the end of 386!?

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

Is 386! divisible by 387?

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

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

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

What is 387! in terms of 386!?

387! = 387 × 386!. Each factorial is the previous one multiplied by the next whole number.