tooldeb Online Tools
Categories
Finance & Investing Interest, savings, returns, and inflation. Loans & Property Mortgages, repayment, DSR/DTI/LTV, and jeonse. Tax & Payroll Take-home pay, severance, insurance, and taxes. Shopping & Pricing Discounts, tips, unit price, and margins. Health & Fitness Body metrics, nutrition, and training. Math Percentages, fractions, algebra, and sequences. Geometry Area, volume, and surface of plane and solid shapes. Statistics & Probability Averages, spread, combinations, and odds. Unit Conversion Length, weight, temperature, pressure, and more. IT & Digital Data size, screens, color, and network speed. Engineering & Electronics Circuits, resistance, PCB, and signals. Date & Time Ages, D-day, date math, and time zones. Home & Interior Paint, tile, wallpaper, flooring, and concrete. Automotive Fuel cost, economy, tires, and vehicle tax. Everyday Bills, delivery, photos, and odds and ends.
EN
한국어 English

Factorial Calculator

Calculate n! — the product of every whole number from 1 up to n — for any n from 0 to 170.

Inputs
n!
120
5! = 5 × 4 × 3 × 2 × 1
Above 170! the result exceeds the range of double-precision numbers and is reported as too large. Values above 18! are shown to 6 significant figures, so they are approximate.

How a factorial works

The factorial of n, written n!, is the product of all whole numbers from 1 to n. It counts the number of ways n distinct items can be arranged in order.

n! = n × (n−1) × (n−2) × … × 2 × 1 0! = 1 (empty product)
  • n — a whole number from 0 to 170
  • n! — the factorial — product of 1 through n

More detail

Why 0! = 1

0! is defined as 1, not 0. A factorial counts arrangements (permutations), and there is exactly one way to arrange nothing — the empty arrangement. This convention also keeps formulas like the binomial coefficient n! / (k!(n−k)!) working when k = 0 or k = n.

How fast it grows. Factorials explode: 10! is already 3.6 million, 13! passes a billion, and 170! is about 7.3 × 10³⁰⁶ — near the largest number a computer's double-precision float can hold. That's why this tool caps at 170.

Frequently asked questions

What is 5 factorial (5!)?

5! = 5 × 4 × 3 × 2 × 1 = 120. Enter 5 above to see the expansion and result.

What is 0 factorial (0!)?

0! = 1 by definition — there is exactly one way to arrange an empty set (the empty product). It is not 0.

What is 10 factorial?

10! = 3,628,800 — the product of every whole number from 1 to 10. Enter 10 above to confirm.

Why can't I calculate factorials above 170?

171! is larger than about 1.8 × 10³⁰⁸, the maximum a standard double-precision floating-point number can represent, so it overflows to infinity. The input box does not block larger numbers — enter 171 or more and the calculator shows a "too large" notice in place of a result.

Related calculators

Browse all Statistics calculators