Skip to main content
WizTools123
WizTools123
Free Online Tools

Tool Categories


Math Tools New Tool

Free Online Factorial Calculator With Every Digit

Work out a factorial with every digit correct. Ordinary calculators stop being exact at 23 factorial and give up entirely at 171, where the answer overflows to infinity. This one multiplies whole numbers, so a thousand factorial comes out in full, with its digit count, its trailing zeros and the multiplication written out.

Free Forever Nothing Uploaded Every Digit Exact Past 171!
Free Online Factorial Calculator With Every Digit
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
❗ Factorial Calculator Every digit exact · far past where a calculator gives up

The sum runs in your browser. Nothing you type is sent anywhere.

Which factorial
Reading —

❗ The number

A factorial is every whole number from one up to n, multiplied together. It has to be a whole number and it cannot be negative.

Up to four thousand. Past about 1500 digits only the ends are printed, because the whole thing stops being readable.
Try one of these
The third is where an ordinary calculator quietly gets the last digits wrong.
The answer
—
How many digits—
Zeros on the end—
Scientific notation—
What a calculator would say—

The multiplication written out, and where the running total passes the point at which an ordinary calculator stops being exact.

Step Multiply by Running total
Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

How to Work Out a Factorial

Three steps, and the third is where the interesting part is.

1
Type the number A whole number, not negative. The factorial of n is every whole number from one up to n multiplied together, so five factorial is one times two times three times four times five.
2
Read the answer and the two counts beside it How many digits it has, and how many zeros it ends in. On a large factorial those two numbers are usually what you actually wanted.
3
Compare it with what a calculator would say The last row shows the same factorial worked out the ordinary way. From 23 upwards the two disagree, and from 171 the ordinary way gives up and returns infinity.

What to Know About Factorials

Where calculators stop being right, which is not where you would guess.

An ordinary calculator stops being exact at 23 factorial, and the number is 23 rather than 21. The format calculators and browsers use keeps about sixteen significant digits, so you would expect twenty one factorial, with its twenty digits, to be the first casualty. It is not. That format stores a whole number together with a power of two, and factorials are full of factors of two: twenty one factorial contains two to the eighteenth, which leaves a small enough remainder to be held exactly. So does twenty two. Twenty three factorial is the first one that is wrong, by 1,572,864, with no warning at all, and the preset button shows it.
And it gives up completely at 171. A hundred and seventy factorial is about 7.26 times ten to the 306, which still fits. A hundred and seventy one factorial overflows and comes back as infinity, which is at least honest about having failed. Here the arithmetic is done on whole numbers rather than on floating point, so there is no ceiling until the answer stops being printable.
Zero factorial is one, and that is not a special case. A factorial counts the orderings of n things. There is exactly one way to arrange nothing, which is to do nothing, so the answer is one. It also follows from the rule that n factorial is n times the factorial below it: for that to work at one, zero factorial has to be one. People often expect zero.
The trailing zeros are counted properly, not divided by five. Each zero at the end comes from a factor of ten, which needs a two and a five, and fives are rarer. So you count the multiples of five, then the multiples of twenty five, which contribute a second five each, then of a hundred and twenty five, and so on. A hundred factorial ends in 24 zeros, not the 20 that dividing by five suggests.
There is no factorial of a negative number or a fraction here. The gamma function extends factorials to fractions, which is how a half factorial comes to involve the square root of pi, and to negative numbers except the negative whole ones. That is a different calculation from the one on this page, and claiming to do it with a factorial routine would be wrong, so it is refused rather than approximated.
The double factorial skips every other number. Nine double factorial is nine times seven times five times three times one, not the factorial of a factorial. It turns up in counting problems about pairings and in some integrals. The switch at the top chooses it, and the reading line always shows which multiplication is being done so the two cannot be confused.

Key Features & Capabilities

What it does, and what it deliberately does not.

Every digit, exactly Whole number multiplication rather than floating point, so there is no quiet rounding at 21 and no overflow at 171.
The wrong answer shown too What an ordinary calculator would give, side by side, so the point at which they part company is visible.
Digits and trailing zeros Both counted from the real answer, and the zeros by counting factors of five rather than by a rule of thumb.
The multiplication written out Step by step, with the point marked where the running total outgrows an ordinary number.
Double factorial as well Every other number multiplied, which is a different thing from a factorial of a factorial and is often confused with it.
Nothing is uploaded Your browser does the big number arithmetic itself, so a four thousand digit answer never leaves the tab.

About Factorials

A factorial is the simplest possible piece of arithmetic to describe and one of the easiest to get quietly wrong. Multiply every whole number from one up to n. Five factorial is a hundred and twenty. That is the whole definition, and it is the reason factorials appear everywhere that counting arrangements appears: how many orders a deck of cards can be in, how many ways a team can be picked, how many terms a series needs.

The problem is size. Factorials grow faster than almost anything else you meet, and they outgrow ordinary number formats early. Where exactly is a more interesting question than it looks. The format a calculator uses keeps about sixteen significant digits, so twenty one factorial, which has twenty, ought to be the first one it gets wrong. It is not, because that format holds a whole number multiplied by a power of two, and factorials are stuffed with factors of two. Twenty one and twenty two factorial both survive. Twenty three factorial is the first one that comes back wrong, and it is wrong by 1,572,864 with nothing at all to say so.

That is the dangerous failure, because the answer still looks like a precise whole number ending in a tidy run of zeros. If you are using the factorial to count something, or inside a combination, the missing digits are the answer. By a hundred and seventy one it stops pretending and returns infinity, which at least tells you something went wrong. This page avoids both by multiplying whole numbers rather than decimals, using the big integer support browsers have had for years, so a thousand factorial comes out in full, all 2,568 digits, every one of them right.

Two numbers beside the answer are usually more useful than the answer itself. The digit count tells you the scale at a glance. The number of trailing zeros is a question in its own right, and the way to get it is not to divide by five: you count the multiples of five, then of twenty five, then of a hundred and twenty five, because each of those contributes an extra factor of five and it is the fives that are scarce. A hundred factorial ends in twenty four zeros, and the quick guess of twenty is wrong.

Frequently Asked Questions

Zero, negatives, fractions, and how big it can go.

At 23 factorial, which is later than the digit count suggests. 21 and 22 factorial have twenty and twenty two digits, more than the sixteen a calculator holds, and they still come out exact because the format stores a power of two alongside the digits and factorials contain many factors of two. 23 factorial is the first that is wrong, by 1,572,864.

One. A factorial counts the number of orderings, and there is exactly one way to arrange nothing. It also has to be one for the rule that n factorial equals n times the previous factorial to work at n equals one.

Not here. The gamma function extends the idea to fractions and to negative numbers other than the negative whole ones, and that is a genuinely different calculation. Doing it with a factorial routine and calling it a factorial would be misleading, so it is refused instead.

Up to four thousand factorial, which has over twelve thousand digits. Beyond about fifteen hundred digits only the beginning and end are printed along with the total count, because the full number stops being something anyone reads.

Every other number multiplied together, so nine double factorial is nine times seven times five times three times one. It is not the factorial of a factorial, which is a much larger number, and the two are easy to confuse when written with two exclamation marks.

By counting factors of five. Each trailing zero needs a factor of ten, which needs a two and a five, and in a factorial the twos are plentiful so the fives are the limit. You count multiples of five, then of twenty five, then of a hundred and twenty five, and add them up.

No. The big number multiplication happens in your own browser, so even a twelve thousand digit answer is produced and displayed without anything leaving the page.

Every Other Math Tool

35 more tools in this set. All free, all in your browser.

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner