Sumwise

Factorial of 313

313! = 65793432740455642647709037638342582825264743429360052439004891774054703502204332309393832097721686111340478224874675724667449927283444910587347772242294621791839991003305021414813734908119913470772256858776525673005217464808187618021991964825673660430910415689210921468560439988456421287445251478053514856729569138579780348511690186183004848215820661872910442670343581506531429863949403631344870576575319663431541268127276715781791953414942283373971666313819021025510986232142254490313035180871523347145366705920532910603669954329470738846453267896722335147873255953530880000000000000000000000000000000000000000000000000000000000000000000000000000

647 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

313! = 313 × 312 × … × 2 × 1 = 6579343274045564264770903763834258282526…

Facts about 313!

Digits647
Trailing zeros76 (one for every factor 5 × 2)
Stirling estimate≈ Infinity
313! ÷ 312!313

Nearby factorials

311!673726476002044345946066… (642 digits)
312!210202660512637835935172… (645 digits)
314!206591378805030717913806… (650 digits)
315!650762843235846761428490… (652 digits)

What are factorials used for?

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

Counting with 313!

There are 6.5793 × 10^646 different ways to arrange 313 different books on a shelf: 313 choices for the first place, 312 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 313 runners, there are 313 × 312 × 311 = 30,371,016 possible podiums. If the order does not matter, divide by 3! = 6 to get 5,061,836 ways to choose a group of three. Choosing a pair from 313 people can be done in 48,828 ways.

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

How big is 313!?

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

Every prime up to 313 divides 313!. Legendre's formula counts how often: add ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + … for each prime p. For 313! that gives 2^308 × 3^153 × 5^76 × 7^50 × 11^30 × 13^25 × 17^19 × 19^16 × 23^13 × 29^10 × … (65 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 313 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 313! ÷ e, so about 36.8% of all 6.5793 × 10^646 orders are derangements. From about four items on, that share stays close to 1 ÷ e, roughly 37%, however many items there are.

Computing 313! yourself

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

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

How many digits does 313! have?

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

How many zeros are at the end of 313!?

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

Is 313! divisible by 314?

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

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

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

What is 314! in terms of 313!?

314! = 314 × 313!. Each factorial is the previous one multiplied by the next whole number.