Number Theory & Precision · Formula v1.0

Factorial Calculator

Calculate n factorial for a whole number up to 170 and count its trailing zeros.

LAST REVIEWEDSeptember 24, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
n factorial3,628,800
Trailing zeros2
Sensitivity check

What if whole number n changes?

-10% input362,880
0% input3,628,800
+10% input39,916,800

Answer first

What this calculator tells you

Calculate n factorial for a whole number up to 170 and count its trailing zeros. Use it to size a permutation count before you commit to listing the arrangements. Formula: n! = n × (n−1) × … × 2 × 1; trailing zeros = ⌊n÷5⌋ + ⌊n÷25⌋ + ⌊n÷125⌋ + …. At the worked-example inputs, the n factorial is 3,628,800. Holding every other input steady, moving whole number n from 8 to 12 moves the result from 40,320 to 479,001,600.

FreeNo sign-upInputs stay in-browserCSV exportReviewed September 24, 2026

Transparent method

The formula

n! = n × (n−1) × … × 2 × 1; trailing zeros = ⌊n÷5⌋ + ⌊n÷25⌋ + ⌊n÷125⌋ + …At the worked-example inputs the n factorial is 3,628,800. It rises with whole number n.

Use it to size a permutation count before you commit to listing the arrangements.

Worked example

n factorial3,628,800
Trailing zeros2

Example inputs

Whole number n10

How to interpret the result

Factorials outrun intuition fast. Ten factorial is 3,628,800. Twenty is past two quintillion. The number counts the ways to order a set of items, so it tells you when listing every arrangement stops being an option and a formula or a sample is the only route. The trailing-zero count is a quick way to see how many times the product picks up a factor of ten.

At the worked-example inputs the n factorial is 3,628,800. It rises with whole number n.

Interpretation boundary

These are exact arithmetic operations; results are limited only by floating-point precision.

Before you rely on it

What to check

Confirm the item count is whole and small enough. Above 170 the true answer exceeds what a computer number can hold, so the page stops there.

The common error

Where people go wrong with factorial calculator

Using n factorial when order does not matter. Choosing three people from ten as a group is a combination, which divides the factorial down; ten factorial itself counts every seating order.

Sensitivity evidence

How whole number n changes the n factorial

Holding every other input at the worked-example value, moving whole number n from 8 to 12 moves the n factorial from 40,320 to 479,001,600: a spread of 478,961,280, or 13199% of the worked-example result.

Factorial Calculator: n factorial and trailing zeros across a range of whole number n, every other input held at the worked-example value.
Whole number nn factorialTrailing zeros
840,3201
9362,8801
10worked example3,628,8002
1139,916,8002
12479,001,6002

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the factorial calculator.
InputValue usedWhat it means
Whole number n10A whole number from 0 to 170. Beyond 170 the answer no longer fits in a computer's number format.
n factorial3,628,800
Trailing zeros2

Inputs, definitions and assumptions

Whole number n

A whole number from 0 to 170. Beyond 170 the answer no longer fits in a computer's number format. The prefilled worked-example value is 10.

How to use this calculator

  1. 1Verify the inputs. Gather whole number n from your own documents; the prefilled values are examples.
  2. 2Save a baseline. The worked example puts the n factorial at 3,628,800. Store your own version of it as Scenario A.
  3. 3Test one change. Start with whole number n, the input with the biggest effect here: moving whole number n from 9 to 11 takes the n factorial from 362,880 to 39,916,800, a swing of 1090% of the worked-example figure.
  4. 4Check the extremes. At half the example whole number n (5) the n factorial is 120; at double (20) it is 2,432,902,008,176,640,000.

People also ask

Frequently asked questions

How do you calculate factorial?

n! = n × (n−1) × … × 2 × 1; trailing zeros = ⌊n÷5⌋ + ⌊n÷25⌋ + ⌊n÷125⌋ + …. At the worked-example inputs the n factorial is 3,628,800.

What does the factorial result mean?

Use it to size a permutation count before you commit to listing the arrangements. At the worked-example inputs the n factorial is 3,628,800. It rises with whole number n.

How much does whole number n change the n factorial?

Holding every other input at the worked-example value, moving whole number n from 8 to 12 moves the n factorial from 40,320 to 479,001,600, a spread of 478,961,280.

What are the limits of this factorial calculator?

These are exact arithmetic operations; results are limited only by floating-point precision. The tables on this page test whole number n only from 8 to 12; a value outside that range is not tabulated here.

If I double whole number n in the factorial calculator, does the n factorial double?

Doubling it from 10 to 20 takes the n factorial from 3,628,800 to 2,432,902,008,176,640,000, which is 670442572800.00 times the worked-example figure. So the result grows faster than the input does. Halving it to 5 gives 120.

Which inputs change the trailing zeros in the factorial calculator?

At the worked-example inputs it is 2. Whole number n takes it from 1 to 2.

Why does every whole number have a unique prime factorization?

This is the Fundamental Theorem of Arithmetic: any integer greater than 1 breaks down into prime factors in exactly one way (ignoring order). It's why prime numbers are called the 'building blocks' of the integers: there is only ever one valid blueprint.

What is special about the Fibonacci sequence?

Each term is the sum of the two before it, and the ratio of neighboring terms approaches the golden ratio, about 1.618. The sequence shows up in counting problems and in some natural growth patterns.

How can I check whether a number is prime by hand?

Divide it by every prime up to its square root. If none divides evenly, it is prime. For 97 you only need to test 2, 3, 5 and 7, since 11 squared is already 121.

All number theory & precision questions answered

Sources and evidence

Free Calculators Online is independent and is not affiliated with or endorsed by the source organizations. Educational estimates only.

Definitions

Terms used on this page

Greatest common factor (GCF) : glossary term
The largest number that divides two or more numbers evenly. It reduces fractions and ratios to their smallest whole-number form.
Prime factorization : glossary term
Breaking a number down into the prime numbers that multiply together to produce it. Every whole number greater than 1 has exactly one such breakdown.
Least common multiple (LCM) : glossary term
The smallest number that two or more numbers all divide into evenly. Used for common denominators and for aligning repeating cycles.
Percent error : glossary term
How far a measured value sits from the known or theoretical one. Expressed as a percentage of the theoretical value.