Factorial of 402
402! = 10322493151921465164081017511444523549144957788957729070658850054871632028467255601190963314928373192348001901396930189622367360453148777593779130493841936873495349332423413459470518031076600468677681086479354644916620480632630350145970538235260826120203515476630017152557002993632050731959317164706296917171625287200618560036028326143938282329483693985566225033103398611546364400484246579470387915281737632989645795534475998050620039413447425490893877731061666015468384131920640823824733578473025588407103553854530737735183050931478983505845362197959913863770041359352031682005647007823330600995250982455385703739491695583970372977196372367980241040180516191489137558020294105537577853569647066137370488100581103217089054291400441697731894590238418118698720784367447615471616000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
875 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
402! = 402 × 401 × … × 2 × 1 = 1032249315192146516408101751144452354914…
Facts about 402!
| Digits | 875 |
|---|---|
| Trailing zeros | 99 (one for every factor 5 × 2) |
| Stirling estimate | ≈ Infinity |
| 402! ÷ 401! | 402 |
Nearby factorials
| 400! | 640345228466238952623479… (869 digits) |
| 401! | 256778436614961820002015… (872 digits) |
| 403! | 415996474022435046112465… (877 digits) |
| 404! | 168062575505063758629435… (880 digits) |
What are factorials used for?
Counting arrangements: 402! is the number of different orders in which 402 distinct items can be lined up. Factorials also appear in probability, combinations and series.
Counting with 402!
There are 1.0322 × 10^874 different ways to arrange 402 different books on a shelf: 402 choices for the first place, 401 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 402 runners, there are 402 × 401 × 400 = 64,480,800 possible podiums. If the order does not matter, divide by 3! = 6 to get 10,746,800 ways to choose a group of three. Choosing a pair from 402 people can be done in 80,601 ways.
In probability, if 402 names are drawn out of a hat one at a time, the chance of drawing them in one particular order is 1 in 1.0322 × 10^874. That is why shuffled decks and passwords with many symbols are so hard to guess.
How big is 402!?
402! has 875 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 402!
Every prime up to 402 divides 402!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 402! that gives 2^398 × 3^197 × 5^99 × 7^66 × 11^39 × 13^32 × 17^24 × 19^22 × 23^17 × 29^13 × … (79 primes in all). The 99 trailing zeros come from pairing the 99 factors of 5 with factors of 2.
Shuffles where nothing stays put
A related count is the number of derangements of 402 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 402! ÷ e, so about 36.8% of all 1.0322 × 10^874 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.
Computing 402! yourself
In Excel or Google Sheets, type =FACT(402). 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(402) returns the exact integer with all 875 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 402 factorial?
402! is the product of every whole number from 1 to 402.
How many digits does 402! have?
875. The number of digits of n! is the whole part of log10(n!) plus one.
How many zeros are at the end of 402!?
99. Count the factors of 5 in the numbers 1 to 402: there are always more factors of 2, so every 5 makes one trailing zero.
Is 402! divisible by 403?
Yes. 403 is not prime, so its factors already appear among the numbers 1 to 402.
What is the last non-zero digit of 402!?
6. Strip the 99 trailing zeros and look at the digit that is left at the end.
What is 403! in terms of 402!?
403! = 403 × 402!. Each factorial is the previous one multiplied by the next whole number.