Factorial of 365
365! = 25104128675558732292929443748812027705165520269876079766872595193901106138220937419666018009000254169376172314360982328660708071123369979853445367910653872383599704355532740937678091491429440864316046925074510134847025546014098005907965541041195496105311886173373435145517193282760847755882291690213539123479186274701519396808504940722607033001246328398800550487427999876690416973437861078185344667966871511049653888130136836199010529180056125844549488648617682915826347564148990984138067809999604687488146734837340699359838791124995957584538873616661533093253551256845056046388738129702951381151861413688922986510005440943943014699244112555755279140760492764253740250410391056421979003289600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
779 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
365! = 365 × 364 × … × 2 × 1 = 2510412867555873229292944374881202770516…
Facts about 365!
| Digits | 779 |
|---|---|
| Trailing zeros | 89 (one for every factor 5 × 2) |
| Stirling estimate | ≈ Infinity |
| 365! ÷ 364! | 365 |
Nearby factorials
| 363! | 188951743757027941388901… (774 digits) |
| 364! | 687784347275581706655601… (776 digits) |
| 366! | 918811109525449601921217… (781 digits) |
| 367! | 337203677195840003905086… (784 digits) |
What are factorials used for?
Counting arrangements: 365! is the number of different orders in which 365 distinct items can be lined up. Factorials also appear in probability, combinations and series.
Counting with 365!
There are 2.5104 × 10^778 different ways to arrange 365 different books on a shelf: 365 choices for the first place, 364 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 365 runners, there are 365 × 364 × 363 = 48,228,180 possible podiums. If the order does not matter, divide by 3! = 6 to get 8,038,030 ways to choose a group of three. Choosing a pair from 365 people can be done in 66,430 ways.
In probability, if 365 names are drawn out of a hat one at a time, the chance of drawing them in one particular order is 1 in 2.5104 × 10^778. That is why shuffled decks and passwords with many symbols are so hard to guess.
How big is 365!?
365! has 779 digits, so it is larger than the estimated number of atoms in the observable universe (about 10^80). The digits add up to 3114, 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 365!
Every prime up to 365 divides 365!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 365! that gives 2^359 × 3^179 × 5^89 × 7^60 × 11^36 × 13^30 × 17^22 × 19^20 × 23^15 × 29^12 × … (72 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 365 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 365! ÷ e, so about 36.8% of all 2.5104 × 10^778 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.
Computing 365! yourself
In Excel or Google Sheets, type =FACT(365). 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(365) returns the exact integer with all 779 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.
How answers are calculated and checked: methodology.
Questions
What is 365 factorial?
365! is the product of every whole number from 1 to 365.
How many digits does 365! have?
779. The number of digits of n! is the whole part of log10(n!) plus one.
How many zeros are at the end of 365!?
89. Count the factors of 5 in the numbers 1 to 365: there are always more factors of 2, so every 5 makes one trailing zero.
Is 365! divisible by 366?
Yes. 366 is not prime, so its factors already appear among the numbers 1 to 365.
What is the last non-zero digit of 365!?
6. Strip the 89 trailing zeros and look at the digit that is left at the end.
What is 366! in terms of 365!?
366! = 366 × 365!. Each factorial is the previous one multiplied by the next whole number.