Factorial Calculator tool

Factorial Calculator

The factorial n!

What is a factorial calculator?

A factorial calculator multiplies every positive integer up to n to return n!. Zero factorial is defined as 1. The tool shows the full product for moderate n and warns when n exceeds floating-point limits near 170. Use it for permutations and counting problems. Factorials grow faster than exponentials, so digit counts rise quickly above n = 15.

How to use the Factorial Calculator

  1. Enter a non-negative integer n.
  2. Stay at or below 170 unless using big integers elsewhere.
  3. Read n! and the digit count if shown.
  4. Remember 0! = 1 by convention.
  5. Pair results with permutation formulas C(n,r) or nPr.
  6. Stop at n = 170 if the tool warns about float limits.

About this calculator

The factorial n! is the product of every positive integer up to n. It appears wherever you count arrangements — password permutations, deck shuffles, and the n! terms in Taylor series.

Enter n and the calculator multiplies 1 through n. Zero factorial returns 1 by convention, which keeps combinatorics formulas consistent.

Values beyond 170 exceed IEEE double range; the tool warns when that happens. For choosing r items from n without caring about order, use the [[permutation-combination]] calculator. For Pascal row entries try the [[pascals-triangle]] calculator. For large products use the [[big-number]] calculator.

Formula for factorials

n! = 1 × 2 × 3 × … × n
0! = 1 by definition
  • n must be a non-negative integer
  • n! counts permutations of n distinct items
  • Values grow faster than exponential curves

Factorial example: 10! and 5!

Enter n = 5. Multiply 1×2×3×4×5 = 120. That is the number of ways to order five distinct books on a shelf.

Enter n = 10 to get 3,628,800. Enter n = 0 to see 1, which keeps combination formulas like C(n,0) equal to 1. Compare growth: 20! already has 19 digits.

Check 0! = 1 and 6! = 720. Six distinct tokens have 720 orders; enter n = 6 to match before comparing with 7! = 5040.

Enter n = 8. Multiply 1×2×…×8 = 40320. That counts line permutations of eight distinct exam papers on a shelf.

Enter n = 4 to get 24. For n = 3 you get 6, so 4! is exactly four times 3! because the new slot multiplies all older orders by 4.

Enter n = 12 to see 479001600. Digit count jumps fast; use the panel digit field before writing n! by hand in a test.

Cricket lineup: 11 players in a fixed batting order is 11! = 39916800 lineups, far above circular (11 − 1)! = 3628800 seatings around a strategy table where rotation repeats.

Permutation link: 8P3 = 8!/5! = 40320/120 = 336 ordered triples from eight items. Compute 8! here, then divide by 5! mentally when a question removes the last three factors.

Zero factorial reminder: 0! = 1 keeps empty-product definitions consistent. Enter n = 0 after larger values to see 1 on the main result line.

Common uses

  • Compute n! for probability homework
  • Verify permutation formulas manually
  • Explore how fast factorials grow
  • Check 0! and small n values quickly

Frequently asked questions

What is 10!?

3,628,800. That is 1 × 2 × … × 10 — the number of ways to order 10 distinct objects.

Why is 0! equal to 1?

There is exactly one way to arrange zero objects — the empty arrangement. Defining 0! = 1 keeps C(n,0) = n!/0!/(n−0)! = 1.

Can factorials be negative?

No. Factorial is defined only for non-negative integers. Fractions and negatives have generalized gamma extensions, but n! for negative integers is undefined here.

How is factorial related to permutations?

n! counts ordered arrangements of n distinct items. Choosing r from n without order divides by r! — see the permutation-combination calculator.

Related calculators

Maintained by J Jaya Prakash · Last updated: October 2026