Factorial of 322
322! = 2187246741752763751432688247998659781970331487519973618990365568056182572776746332214530169611898714774968475935666336669102539987955078661688533420295368344000662899762143107822269056336889864316617695055290087680024647038917469289811096120843681737342538250622428598745964693629411108388591244428407765720693601335703865415311392741650281355749440221868007591474904882594050118364093953900280428686624849153728770638928338067788461729279437311505935668894152351789417554570989433854271410393758440317881796842419488299811279806328490387997752216847366065780295748221376814304350939568406528000000000000000000000000000000000000000000000000000000000000000000000000000000
670 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
322! = 322 × 321 × … × 2 × 1 = 2187246741752763751432688247998659781970…
Facts about 322!
| Digits | 670 |
|---|---|
| Trailing zeros | 78 (one for every factor 5 × 2) |
| Stirling estimate | ≈ Infinity |
| 322! ÷ 321! | 322 |
Nearby factorials
| 320! | 211610334721925248295571… (665 digits) |
| 321! | 679269174457380047028785… (667 digits) |
| 323! | 706480697586142691712758… (672 digits) |
| 324! | 228899746017910232114933… (675 digits) |
What are factorials used for?
Counting arrangements: 322! is the number of different orders in which 322 distinct items can be lined up. Factorials also appear in probability, combinations and series.
Counting with 322!
There are 2.1872 × 10^669 different ways to arrange 322 different books on a shelf: 322 choices for the first place, 321 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 322 runners, there are 322 × 321 × 320 = 33,075,840 possible podiums. If the order does not matter, divide by 3! = 6 to get 5,512,640 ways to choose a group of three. Choosing a pair from 322 people can be done in 51,681 ways.
In probability, if 322 names are drawn out of a hat one at a time, the chance of drawing them in one particular order is 1 in 2.1872 × 10^669. That is why shuffled decks and passwords with many symbols are so hard to guess.
How big is 322!?
322! has 670 digits, so it is larger than the estimated number of atoms in the observable universe (about 10^80). The digits add up to 2808, 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 322!
Every prime up to 322 divides 322!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 322! that gives 2^319 × 3^157 × 5^78 × 7^52 × 11^31 × 13^25 × 17^19 × 19^16 × 23^14 × 29^11 × … (66 primes in all). The 78 trailing zeros come from pairing the 78 factors of 5 with factors of 2.
Shuffles where nothing stays put
A related count is the number of derangements of 322 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 322! ÷ e, so about 36.8% of all 2.1872 × 10^669 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.
Computing 322! yourself
In Excel or Google Sheets, type =FACT(322). 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(322) returns the exact integer with all 670 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 322 factorial?
322! is the product of every whole number from 1 to 322.
How many digits does 322! have?
670. The number of digits of n! is the whole part of log10(n!) plus one.
How many zeros are at the end of 322!?
78. Count the factors of 5 in the numbers 1 to 322: there are always more factors of 2, so every 5 makes one trailing zero.
Is 322! divisible by 323?
Yes. 323 is not prime, so its factors already appear among the numbers 1 to 322.
What is the last non-zero digit of 322!?
8. Strip the 78 trailing zeros and look at the digit that is left at the end.
What is 323! in terms of 322!?
323! = 323 × 322!. Each factorial is the previous one multiplied by the next whole number.