Sumwise

Factorial of 311

311! = 673726476002044345946066167346016453932833040769231306207553983104516911425865613064162284936119502246052246916468785580685773810963431950800235236363302017201605543984036018419899800402636944691286319926850635629200637593268079974829933284444106459725059552809975029374134103265098112634607719731030503570999929738877082294090380377887737038336821719842205728990984491547180202588160518875899797007611612839267851111322158554331448691477659164556931128797196496124262577129334137076196395314896405209565891557308643714709489988628151253854891331784246079584185876480000000000000000000000000000000000000000000000000000000000000000000000000000

642 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

311! = 311 × 310 × … × 2 × 1 = 6737264760020443459460661673460164539328…

Facts about 311!

Digits642
Trailing zeros76 (one for every factor 5 × 2)
Stirling estimate≈ Infinity
311! ÷ 310!311

Nearby factorials

309!698813894826308833052656… (637 digits)
310!216632307396155738246323… (640 digits)
312!210202660512637835935172… (645 digits)
313!657934327404556426477090… (647 digits)

What are factorials used for?

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

Counting with 311!

There are 6.7372 × 10^641 different ways to arrange 311 different books on a shelf: 311 choices for the first place, 310 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 311 runners, there are 311 × 310 × 309 = 29,790,690 possible podiums. If the order does not matter, divide by 3! = 6 to get 4,965,115 ways to choose a group of three. Choosing a pair from 311 people can be done in 48,205 ways.

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

How big is 311!?

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

Every prime up to 311 divides 311!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 311! that gives 2^305 × 3^152 × 5^76 × 7^50 × 11^30 × 13^24 × 17^19 × 19^16 × 23^13 × 29^10 × … (64 primes in all). The 76 trailing zeros come from pairing the 76 factors of 5 with factors of 2.

Shuffles where nothing stays put

A related count is the number of derangements of 311 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 311! ÷ e, so about 36.8% of all 6.7372 × 10^641 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.

Computing 311! yourself

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

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

How many digits does 311! have?

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

How many zeros are at the end of 311!?

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

Is 311! divisible by 312?

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

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

8. Strip the 76 trailing zeros and look at the digit that is left at the end.

What is 312! in terms of 311!?

312! = 312 × 311!. Each factorial is the previous one multiplied by the next whole number.