Factorial of 336
336! = 388524641391955467495718878170916666621305891157438819129472905667597766666131144165801505933388954769496259624783397188657411187716118284449660299745896227780861532261041792833241011203850815549044799113750776834982024838619342258798555844816877645336192044569330864808919663700874341826454844049139944594365646456393153177957418566003999920551987412600026310089176730284008847695387113189718113368409290115686187637360937411739752753124062879731285086340509805532257835636849892571216312568997644922821860300948036456317796681892579605342800545622507129341341078257850176518880653703246887414049208976864534990702363279360000000000000000000000000000000000000000000000000000000000000000000000000000000000
705 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
336! = 336 × 335 × … × 2 × 1 = 3885246413919554674957188781709166666213…
Facts about 336!
| Digits | 705 |
|---|---|
| Trailing zeros | 82 (one for every factor 5 × 2) |
| Stirling estimate | ≈ Infinity |
| 336! ÷ 335! | 336 |
Nearby factorials
| 334! | 345171145515241175813538… (700 digits) |
| 335! | 115632333747605793897535… (703 digits) |
| 337! | 130932804149088992546057… (708 digits) |
| 338! | 442552878023920794805673… (710 digits) |
What are factorials used for?
Counting arrangements: 336! is the number of different orders in which 336 distinct items can be lined up. Factorials also appear in probability, combinations and series.
Counting with 336!
There are 3.8852 × 10^704 different ways to arrange 336 different books on a shelf: 336 choices for the first place, 335 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 336 runners, there are 336 × 335 × 334 = 37,595,040 possible podiums. If the order does not matter, divide by 3! = 6 to get 6,265,840 ways to choose a group of three. Choosing a pair from 336 people can be done in 56,280 ways.
In probability, if 336 names are drawn out of a hat one at a time, the chance of drawing them in one particular order is 1 in 3.8852 × 10^704. That is why shuffled decks and passwords with many symbols are so hard to guess.
How big is 336!?
336! has 705 digits, so it is larger than the estimated number of atoms in the observable universe (about 10^80). The digits add up to 2907, 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 336!
Every prime up to 336 divides 336!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 336! that gives 2^333 × 3^166 × 5^82 × 7^54 × 11^32 × 13^26 × 17^20 × 19^17 × 23^14 × 29^11 × … (67 primes in all). The 82 trailing zeros come from pairing the 82 factors of 5 with factors of 2.
Shuffles where nothing stays put
A related count is the number of derangements of 336 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 336! ÷ e, so about 36.8% of all 3.8852 × 10^704 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.
Computing 336! yourself
In Excel or Google Sheets, type =FACT(336). 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(336) returns the exact integer with all 705 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 336 factorial?
336! is the product of every whole number from 1 to 336.
How many digits does 336! have?
705. The number of digits of n! is the whole part of log10(n!) plus one.
How many zeros are at the end of 336!?
82. Count the factors of 5 in the numbers 1 to 336: there are always more factors of 2, so every 5 makes one trailing zero.
Is 336! divisible by 337?
No. 337 is prime and bigger than every factor of 336!, so it cannot divide it (Wilson's theorem says 336! leaves a remainder of 336 when divided by 337).
What is the last non-zero digit of 336!?
6. Strip the 82 trailing zeros and look at the digit that is left at the end.
What is 337! in terms of 336!?
337! = 337 × 336!. Each factorial is the previous one multiplied by the next whole number.