Factorial Calculator: What n! Means and How to Use It

Math September 2, 2026

What the exclamation mark really counts, worked through with 4!, 20! and a 49-ball lottery draw.

Quick answer: A factorial multiplies every whole number from 1 up to the number you chose, and it is written with an exclamation mark. 5! means 5 × 4 × 3 × 2 × 1, which equals 120. Factorials count how many ways a set of items can be arranged in order, and they grow fast: 10! is already 3,628,800.

Factorials turn up in two places for most people: a maths class working through permutations, and a probability problem that needs to know how many orderings exist. The notation is simple. The arithmetic gets out of hand within about eight steps.

What a factorial actually counts

Put four books on a shelf. The first slot has four candidates, the second has three left, the third has two, and the last has one. Multiply those together and you get 4 × 3 × 2 × 1 = 24 possible arrangements. That is 4!, and it is not a coincidence. Every factorial answers the same question: in how many distinct orders can n different things be lined up?

Seen that way, the growth stops looking mysterious. A fifth book does not add a handful of arrangements, it multiplies the existing 24 by five, giving 120. A sixth takes it to 720. Ten books can be shelved 3,628,800 ways, which is exactly the number of seconds in six weeks: 42 days × 24 × 60 × 60 lands on the same figure.

Why 0! equals 1

This looks like a fudge and it is not. There is exactly one way to arrange nothing, namely the empty arrangement, so 0! = 1. The definition also keeps the combination and permutation formulas working at their edges, which is the practical reason mathematicians insist on it rather than leaving the value undefined.

Run your own numbers

It is free, there is no sign-up, and it works on your phone.

Open the Factorial Calculator

How quickly the numbers get away from you

13! is where a surprising amount of software quietly gives up. 12! is 479,001,600, which fits inside a standard 32-bit signed integer with its ceiling of 2,147,483,647. 13! is 6,227,020,800, which does not. Older spreadsheets and some phone calculators either overflow or switch to scientific notation without warning at that point.

Keep going and 20! is 2,432,902,008,176,640,000. By 70! you are past a googol. That is why results are normally shown in scientific notation beyond about 20, and why a tool built for long integers matters when you need every digit.

Try it with your figures

No sign-up, no ads. Your inputs stay in your browser.

Use the Factorial Calculator

How to use the factorial calculator

There is a single input box, and it wants the number you want the factorial of. Type a non-negative whole number and the answer appears underneath, usually with the expanded product shown so you can check the working. Decimals and negative numbers are rejected, because the plain factorial is only defined for 0, 1, 2 and upwards.

Two habits save time. If the result runs to dozens of digits, copy it rather than retyping. And if you are heading for a permutations problem, note the factorials you need before you start dividing, since most errors here are transcription slips rather than maths errors. Our round-up of free maths calculators lists the tools that pair with this one.

The combination formula, worked

Combinations use three factorials at once: n! divided by r! times (n minus r)!. Take a six-ball draw from 49 numbers. That is 49! over 6! × 43!, which comes to 13,983,816 possible tickets, so a single line has roughly a one in fourteen million chance. You do not need to compute 49! itself, since almost all of it cancels, but the calculator will happily show you the monster if you ask. For the probability side of that same sum, see the guide to probability calculations.

Check your own case

Free to use, and it takes less than a minute.

Open the Factorial Calculator

Common questions

Why does my phone calculator error on 200!? 200! has 375 digits. Most handheld and phone calculators store numbers with about 15 significant figures and a maximum exponent near 10^99, so anything past 69! overflows. A browser tool that uses arbitrary precision arithmetic can return the exact value instead of an error.

Is there a factorial of a negative number? Not with the ordinary definition. The gamma function extends factorials to fractions and to negative non-integers, and it gives 0.5! a value of about 0.8862. Negative whole numbers stay undefined even there, so a calculator returning an error for minus 3 is behaving correctly.

What is the difference between 5! and 5 to the power of 5? 5! counts down, giving 120. 5^5 keeps multiplying by five and gives 3,125. They diverge quickly in the other direction too: 10! is 3,628,800 while 10^10 is 10,000,000,000.

Do I still need factorials when the items repeat? You do, but you divide out the repeats. The word BANANA has 6 letters, so 6! = 720 orderings if every letter were distinct. With three As and two Ns you divide by 3! and by 2!, which leaves 60 genuinely different spellings.

Have a question, a correction, or a calculator request? Contact our editorial team — we usually reply within a day.