Sumwise

Factorial of 335

335! = 1156323337476057938975353804080109126849124676063806009313907457344040972220628405255361624801752841575881725073760110680528009487250352037052560415910405439823992655538814859622741104773365522467395235457591597723160788210176613865471892395288326325405333465980151383359879951490697445912067988241487930340373947786884384458206602875011904525452343489881030684789216459178597760998175932112256289786932411058589844158812313725415930812869234761105015137918183945036481653681100870747667596931540609889350774705202489453326775838966010730186906385781271218277800828148363620591906707450139545875146455288287306519947509760000000000000000000000000000000000000000000000000000000000000000000000000000000000

703 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

335! = 335 × 334 × … × 2 × 1 = 1156323337476057938975353804080109126849…

Facts about 335!

Digits703
Trailing zeros82 (one for every factor 5 × 2)
Stirling estimate≈ Infinity
335! ÷ 334!335

Nearby factorials

333!103344654345880591560939… (698 digits)
334!345171145515241175813538… (700 digits)
336!388524641391955467495718… (705 digits)
337!130932804149088992546057… (708 digits)

What are factorials used for?

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

Counting with 335!

There are 1.1563 × 10^702 different ways to arrange 335 different books on a shelf: 335 choices for the first place, 334 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 335 runners, there are 335 × 334 × 333 = 37,259,370 possible podiums. If the order does not matter, divide by 3! = 6 to get 6,209,895 ways to choose a group of three. Choosing a pair from 335 people can be done in 55,945 ways.

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

How big is 335!?

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

Every prime up to 335 divides 335!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 335! that gives 2^329 × 3^165 × 5^82 × 7^53 × 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 335 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 335! ÷ e, so about 36.8% of all 1.1563 × 10^702 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.

Computing 335! yourself

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

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

How many digits does 335! have?

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

How many zeros are at the end of 335!?

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

Is 335! divisible by 336?

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

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

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

What is 336! in terms of 335!?

336! = 336 × 335!. Each factorial is the previous one multiplied by the next whole number.