NathanTools
NathanTools
Text Tools 13
SEO Tools 7
Image Tools 19
YouTube Tools 38
Device Tests 4
PDF Tools 10
Calculators 52
Electrical Calculators 10
Time Tools 7
Random Tools 9
Converters 14
Developer Tools 11
Hash Generators 5
Password & Security 2
Network & DNS 3
Website Tools 9

Factorial Calculator

Type a number to get its exact factorial, its digit count and trailing zeros. Decimals use the gamma function.

100% free No sign-up Works on any device

–

–

Updated November 2026 · Calculated in your browser

How to use the factorial calculator

  1. Type a whole number n up to 10,000. You get the exact result, the number of digits and the trailing zeros.
  2. Choose n!! for the double factorial.
  3. Type a decimal such as 4.5 to get the gamma-function value Γ(n + 1).

Factorial formula

n! = n × (n − 1) × (n − 2) × … × 2 × 1, 0! = 1

Factorials of 0 to 20

0!1
1!1
2!2
3!6
4!24
5!120
6!720
7!5,040
8!40,320
9!362,880
10!3,628,800
11!39,916,800
12!479,001,600
13!6,227,020,800
14!87,178,291,200
15!1,307,674,368,000
16!20,922,789,888,000
17!355,687,428,096,000
18!6,402,373,705,728,000
19!121,645,100,408,832,000
20!2,432,902,008,176,640,000

Where factorials are used

  • Permutations: the number of ways to order n items is n!. Ordering r of n items: n! ÷ (n − r)!.
  • Combinations: choosing r of n items regardless of order: n! ÷ (r! (n − r)!). A 6-from-49 lottery has 13,983,816 combinations.
  • Probability and series: Taylor series such as eˣ = Σ xⁿ ÷ n! and the Poisson distribution.

Factorials grow faster than powers: 10! is about 3.6 million and 70! is larger than a googol (10100). Use the scientific notation calculator to work with numbers this size.

Frequently asked questions

n factorial, written n!, is the product of every whole number from 1 to n. 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials count arrangements: 5 books can be ordered on a shelf in 120 ways.

There is exactly one way to arrange nothing, so 0! = 1. It also keeps the rule n! = n × (n − 1)! working: 1! = 1 × 0!, so 0! must be 1.

24. Each trailing zero comes from a factor of 10 = 2 × 5, and there are fewer 5s than 2s. Count them: ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4 = 24. The calculator shows the trailing zeros for any n.

Not with the ordinary definition, but the gamma function extends it: x! = Γ(x + 1). That gives 0.5! = √π ÷ 2 ≈ 0.8862. Negative whole numbers have no factorial, even with gamma. Type a decimal and the calculator uses gamma.

n!! multiplies every other number down to 1 or 2: 7!! = 7 × 5 × 3 × 1 = 105 and 8!! = 8 × 6 × 4 × 2 = 384. It appears in some integrals and combinatorics problems.
All Calculators
Age Calculator Find your exact age in years, months and days. BMI Calculator Calculate body mass index from height and weight. Loan Calculator Monthly payment, total interest and amortization schedule. Mortgage Calculator Monthly mortgage payment with taxes, insurance and PMI. Time Calculator Add or subtract time, or find the time between two times or dates. Date Calculator Days between two dates, or add and subtract days from a date. Scientific Calculator Trigonometry, logarithms, powers, roots and memory. Percentage Calculator Percent of a number, percentage change, increase and decrease. Tip Calculator Work out the tip and split the bill between friends. GPA Calculator Semester and cumulative GPA, weighted or unweighted. Grade Calculator Weighted course grade and the final exam score you need. Fraction Calculator Add, subtract, multiply and divide fractions with steps. Compound Interest Calculator Grow savings with compound interest and monthly deposits. Car Loan Calculator Monthly car payment with trade-in, sales tax and fees. Calorie Calculator Daily calories to maintain, lose or gain weight. TDEE Calculator Total daily energy expenditure at every activity level. BMR Calculator Basal metabolic rate with three formulas. Macro Calculator Daily protein, carbs and fat in grams for your goal. Body Fat Calculator Body fat % from a tape measure (US Navy method). Due Date Calculator Pregnancy due date and how far along you are. Ovulation Calculator Fertile window and ovulation dates for the next 6 cycles. Inflation Calculator What US dollars are worth across years, 1913 to today. Sales Tax Calculator Add tax to a price, take it out, or find the rate. Discount Calculator Sale price, savings and stacked discounts. Margin Calculator Profit margin, markup and selling price. Concrete Calculator Cubic yards and bags for slabs and post holes. Square Footage Calculator Area of rooms and plots in sq ft and m². Paint Calculator Gallons or litres of paint for a room. Time Card Calculator Weekly hours worked, overtime and pay. Sleep Calculator When to go to bed or wake up, in sleep cycles. Graphing Calculator Plot functions and explore them with pan and zoom. Roman Numeral Converter Convert numbers to Roman numerals and back. Square Root Calculator Square, cube and nth roots, simplified. Ratio Calculator Simplify ratios, solve proportions, split amounts. Average Calculator Mean, median, mode and weighted average. Standard Deviation Calculator Sample and population SD and variance, with steps. Quadratic Formula Calculator Solve ax² + bx + c = 0 with steps and a graph. Percent Error Calculator Percent error and percent difference, with steps. LCM & GCF Calculator Least common multiple and greatest common factor, with steps. Log Calculator Logarithms in any base, natural log and antilog. Exponent Calculator Powers with negative, fractional and huge exponents. Remainder Calculator Quotient and remainder with long division steps. Scientific Notation Calculator Convert and calculate in scientific and E notation. Pythagorean Theorem Calculator Find the hypotenuse or a leg of a right triangle. Trigonometry Calculator sin, cos, tan and inverses in degrees or radians. Complex Number Calculator Add, multiply, divide and convert complex numbers. Exponential Growth Calculator Growth and decay, doubling time and half-life. Multiplication Table Printable times tables up to 30 × 30, plus a quiz. Decimal to Fraction Converter Decimals, fractions and percents, including repeating decimals. Simple Interest Calculator I = P × r × t, solving for any value. APY Calculator APR to APY (effective annual rate) and back.
Esc
↑ ↓ to moveEnter to open