C
CalcFusionHub
ConvertersFinancialHealthMath & EducationEngineeringBusiness♥ Favorites
Home›Calculators›Math & Education›Factorial Calculator
🧮

Factorial Calculator

Calculate the factorial of any whole number (n!) instantly, with a step-by-step product chain and a quick-reference table of small factorials.

Loading…

Related Calculators

📈
Standard Deviation Calculator
Free standard deviation calculator — sample and population standard deviation, variance, and mean from any list of numbers, with a histogram.
➗
Average Calculator
Free average calculator — mean, median, mode, range, and sum from any list of numbers, with a distribution histogram.
⚖️
Ratio Calculator
Free ratio calculator — simplify a ratio to its lowest terms or solve a proportion A:B = C:D for the missing value.
🔢
LCM & GCD Calculator
Free LCM and GCD (HCF) calculator — least common multiple and greatest common divisor of two or more whole numbers.
📐
Trigonometry Calculator
Free trigonometry calculator — sin, cos, tan and their reciprocals for any angle, plus a right-triangle solver from two sides.
🎲
Probability Calculator
Free probability calculator — single-event probability and combined odds of two independent events (and, or, neither).
View all Math & Education →
C
CalcFusionHub

Free online calculators and converters for finance, health, math, and everyday life.

calcfusionhub.com

Converters

  • Length Converter
  • Weight Converter
  • Temperature Converter
  • Area Converter
  • Volume Converter
  • Speed Converter
  • View all →

Calculators

  • BMI Calculator
  • Loan Calculator
  • Mortgage Calculator
  • Compound Interest
  • Age Calculator
  • ROI Calculator
  • View all →

Company

  • About
  • For Teachers
  • Contact
  • Privacy Policy
  • Terms of Service
  • ♥ Favorites

© 2026 CalcFusionHub. All rights reserved.

Privacy PolicyTerms of ServiceContact

Results are for informational purposes only. Always verify with a qualified professional.

Growth rates on a logarithmic scale up to n = 28. At n = 20, n! has 19 digits, while 2ⁿ has 7. Factorial overtakes 2ⁿ at n = 4 and never falls behind.8d16d23d30dn = 20n! passes 2ⁿ herevertical axis: number of digits (logarithmic)n = 28
  • n!2.433 × 10^18
  • 2ⁿ1,048,576
  • n³8,000
  • n²400
  • n20

The vertical axis counts digits, so each gridline is ten times the one below. Plotted linearly, the factorial curve would leave the chart before n = 10.

2.433 × 10^18
20! — 19 digits
shown to four significant figures — past 20! a double cannot hold every digit
Digits
19
2ⁿ
1,048,576
n³
8,000
Stirling's error
0.416%

How 20! is built (showing the last steps of the chain)

× 151,307,674,368,000
× 1620,922,789,888,000
× 17355,687,428,096,000
× 186,402,373,705,728,000
× 19121,645,100,408,832,000
× 202,432,902,008,176,640,000

Instant insight

  • 20! has 19 digits

    n! is the product of every whole number from 1 to n, and it counts the number of ways to arrange n distinct things in order. 20 items can be put in 19-digit-many different orders.

  • Factorial overtakes exponential growth at n = 4, and never looks back

    3! is 6 and 2³ is 8, so up to there the exponential looks like the fast one. At n = 4 they cross — 24 against 16 — and the gap only widens. At n = 20, n! is 2,320,196,159,531 times larger than 2ⁿ. This is why "exponential" is not the strongest word available for how fast something grows.

  • This is why you cannot just try every order

    Checking all 10^18 arrangements at a billion per second would take about 10^2 years. Brute-forcing a travelling-salesman route or a permutation lock fails not because computers are slow but because factorial growth is faster than any amount of speed can fix.

  • Past 20!, the exact digits stop being reliable

    20! is the largest factorial that fits exactly in a double-precision number. Beyond it the magnitude stays right while the last digits drift — this page therefore works in logarithms and reports the digit count, which is honest, rather than printing digits it cannot vouch for.

  • Stirling's approximation is already within 0.416% at n = 20

    n! ≈ √(2πn)·(n/e)ⁿ. It is within 1% by n = 9 and keeps improving, which is remarkable for a formula with no factorials in it. It is how factorials of large numbers are handled in practice, and why "roughly how big is 1000!" is an easy question even though the number has 2,568 digits.

  • What the factorial counts

    Arrangements, not selections. n! is every ordering of all n items; nPr is every ordering of r of them; nCr is every selection of r ignoring order. They are all built from factorials, and which one you want depends entirely on whether order matters.

Worked out in your browser — nothing is sent anywhere.

Compare results

Save this result, change your inputs, and recalculate to compare scenarios side by side.

Everyday Uses

🎲

Counting arrangements

How many ways can 8 people sit at a table? 8! answers seating, playlists, and race orders.

🎓

Where nPr and nCr come from

Permutations and combinations are built on factorials — get the big numbers right.

🔐

Password intuition

See how quickly arrangements explode — why shuffled decks and passphrases are so hard to guess.

🧩

Puzzle solving

Estimate the search space of puzzles and games before brute-forcing them.

🃏

Shuffling a deck of cards

52! is roughly 8×10⁶⁷. A properly shuffled deck has almost certainly never appeared in that exact order before anywhere in history.

🪑

Seating plans

Ten guests around a round table can be arranged 362,880 ways once one seat is fixed. It explains why the wedding seating chart took a whole evening.

Frequently Asked Questions

What is a factorial and how is it calculated?

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n: n! = n × (n−1) × (n−2) × … × 2 × 1. Examples: 0! = 1 (by convention); 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. The 0!=1 convention is not arbitrary — it makes the combinatorics formulas work correctly for edge cases like "choose 0 from n."

What are the main real-world applications of factorials?

Factorials appear throughout mathematics and science: Permutations — the number of ways to arrange n distinct objects in order is n! (e.g. 5 books on a shelf = 5! = 120 arrangements). Combinations — choosing r items from n: C(n,r) = n! ÷ (r! × (n−r)!). Probability — poker hand probabilities use C(52,5) = 52!/(5!×47!). Calculus — Taylor series: eˣ = 1 + x + x²/2! + x³/3! + … Physics — Stirling's approximation (ln n! ≈ n ln n − n) is used in statistical mechanics and thermodynamics.

Why do factorials grow so fast?

Factorials are a product of increasing multipliers, so they grow superexponentially — faster than any exponential function like 2ⁿ. Quick scale reference: 10! ≈ 3.6 million; 15! ≈ 1.3 trillion; 20! ≈ 2.4 × 10¹⁸; 25! ≈ 1.6 × 10²⁵; 52! ≈ 8 × 10⁶⁷ (the number of ways to shuffle a deck of cards — more than the estimated number of atoms in the observable universe, which is ~10⁸⁰). This explosive growth is why even 100! (about 9.3 × 10¹⁵⁷) requires arbitrary-precision arithmetic to represent exactly.

What is the connection between factorials and permutations vs. combinations?

Permutations count ordered arrangements; combinations count unordered selections. Permutations (order matters): P(n,r) = n! ÷ (n−r)!. Example: arranging 3 of 5 letters = P(5,3) = 5!/2! = 60. Combinations (order does not matter): C(n,r) = n! ÷ (r! × (n−r)!). Example: choosing 3 from 5 = C(5,3) = 5!/(3!×2!) = 10. The relationship: C(n,r) = P(n,r) ÷ r! — since each combination corresponds to r! permutations of the same items. Lottery odds use combinations: C(49,6) = 49!/(6!×43!) ≈ 14 million (why winning is so rare).

What is the gamma function and how does it extend factorials?

Factorials are only defined for non-negative integers, but the Gamma function Γ(n) extends the concept to real and complex numbers: Γ(n) = (n−1)! for positive integers, and Γ(1/2) = √π ≈ 1.772. This means you can compute "half-factorial": (1/2)! = Γ(3/2) = √π/2 ≈ 0.886. The Gamma function appears in probability distributions (chi-squared, beta, Student's t), physics (quantum mechanics, statistical mechanics), and complex analysis. It is one of the most important functions in advanced mathematics.