Factorial Calculator — n! (n Factorial)

Compute exact n! with BigInt—0! = 1, explosive growth, and the factorial backbone behind nPr and nCr counting formulas.

Runs in your browser · No data stored · No signup

n! is the product of every positive integer from 1 through n, with 0! = 1 by definition. So 5! = 5×4×3×2×1 = 120—the count of ways to order five distinct items.

10! = 3628800

By Muhammad Abdullah Rauf · Founder, EverydayTools.proUpdated 2026-07-03· Reviewed by EverydayTools Editorial Team

What is n factorial (n!)?

Factorial counts how explosively ordered arrangements grow. Line up five books on a shelf: 5 choices for the first spot, 4 for the next, and so on—5! = 120 complete orderings.

Define 0! = 1 so combinatorics formulas do not break at empty sets. The permutation formula nPr = n!/(n−r)! and combination nCr = n!/(r!(n−r)!) both depend on factorials in numerator and denominator.

Growth is brutal: 10! = 3,628,800; 20! has 19 digits; 100! has 158 digits. EverydayTools uses BigInt for exact integers up to n = 500 in your browser—no scientific notation rounding on homework-sized n.

When a problem asks “how many ways” with ordering, think permutation first; when order is irrelevant, combinations cancel the r! reorderings inside nCr. This page gives the raw factorial building block.

Enter n → get exact n! locally. Chain to permutation or combination calculators when the problem specifies r selections.

Quick answers

Concise answers for common searches — definitions, steps, and comparisons.

What is 6 factorial?

6! = 6×5×4×3×2×1 = 720.

Why is 0 factorial equal to 1?

There is exactly one way to order zero items (the empty arrangement). Setting 0! = 1 keeps combinatorics formulas consistent.

How fast does factorial grow?

Each step multiplies by a larger integer. 10! is 3.6 million; 20! is about 2.4×10¹⁸.

What is the link between factorial and permutations?

n! counts all orderings of n items. nPr = n!/(n−r)! counts orderings when only r positions are filled.

Factorial computation

Multiply integers 1 through n using arbitrary-precision BigInt arithmetic. Result is exact for 0 ≤ n ≤ 500.

Formula

n! = ∏_{k=1}^{n} k. Stirling approximation (large n): n! ≈ √(2πn)(n/e)^n. Permutation: nPr = n!/(n−r)!. Combination: nCr = n!/(r!(n−r)!).

Assumptions

  • n is a non-negative integer.
  • 0! returns 1 without multiplying any factors.

Limitations

  • n > 500 may exceed practical browser memory for displaying full digit strings.
  • Factorial is undefined for negative integers in standard combinatorics.

How to use Factorial Calculator — n! (n Factorial)

  1. Enter non-negative integer n

    Type n (0–500). Decimals and negatives trigger validation errors.

  2. Read exact n!

    Full integer displays—copy for use in downstream formulas.

  3. Relate to nPr or nCr

    If selecting r from n, open permutation or combination tools instead of manual division chains.

  4. Spot-check with small n

    Memorize 5! = 120 and 6! = 720 as anchors for mental estimates.

Factorial Calculator — n! (n Factorial) examples

Definition anchor

Input

n = 5

Output

5! = 120

5×4×3×2×1 = 120 distinct orderings of five items.

Zero factorial

Input

n = 0

Output

0! = 1

Empty product convention keeps nCr defined when r = 0 or r = n.

Single item

Input

n = 1

Output

1! = 1

One item has exactly one ordering.

Mid-size exact value

Input

n = 10

Output

10! = 3,628,800

Ten distinct books → 3.6 million shelf orders.

Permutation link

Input

n = 7 (for 7P3)

Output

7! = 5,040

7P3 = 7!/4! = 5040/24 = 210—factorial is the starting point.

Growth preview

Input

n = 15

Output

15! = 1,307,674,368,000

Already over a trillion—why counting problems need formulas, not brute lists.

When to use a factorial calculator

Common real-world scenarios where this tool saves time.

Verify combinatorics homework

Confirm 8! = 40,320 before dividing in a hand-computed 8P3 or 8C3 problem.

Count full permutations

A deck of 10 labeled cards has 10! = 3,628,800 possible orderings—factorial gives the total shuffle space.

Algorithm complexity intuition

Brute-force traveling-salesman on n cities checks (n−1)! routes—see why n = 12 already means hundreds of millions.

Probability denominators

Equally likely outcomes for ordering n items use n! in the denominator of each specific sequence probability.

Workflow guides

Step-by-step chains that connect related tools for common tasks.

Related mathematical concepts

  1. Permutations nPr shave trailing (n−r)! factors off n! when only r positions matter.
  2. Combinations nCr further divide by r! to ignore reorderings within the chosen subset.
  3. Binomial coefficients C(n,k) use factorials and appear in probability and algebra.
  4. Stirling's formula approximates n! for large n—bridges factorials to exponentials and logs.

Reference tables

Factorial values reference

nn!Digits
011
51203
840,3205
12479,001,6009
151,307,674,368,00013
202,432,902,008,176,640,00019

Factorial vs permutation vs combination

QuestionFormula5 items, pick 3
All orderings of nn!5! = 120
Ordered pick of rnPr = n!/(n−r)!5P3 = 60
Unordered pick of rnCr = n!/(r!(n−r)!)5C3 = 10

Use dedicated permutation or combination calculators for nPr and nCr.

Best practices

Cancel before multiplying fully

In nPr = n!/(n−r)!, expand only r factors: n×(n−1)×… instead of computing huge factorials.

Memorize 0! through 7!

Speeds multiple-choice combinatorics and sanity checks.

Log-scale intuition for large n

ln(n!) grows roughly n ln n − n—connects to logarithm calculator for magnitude estimates.

Jump to permutation/combination for partial selections

Full n! is rarely the final answer when choosing r < n items.

Common mistakes to avoid

Treating 0! as 0

0! = 1 by definition. Without it, nCr formulas fail for edge selections.

Using factorial when order does not matter

n! counts all orderings. Committees and hands need nCr, which divides out r! duplicate orders.

Rounding large factorials with a basic calculator

Scientific notation loses digits. Use BigInt exact mode here for homework verification.

Factorial of a fraction or decimal

Standard n! applies to non-negative integers only. Gamma function extends elsewhere—not this tool.

Advertisement

Frequently Asked Questions

Can factorial handle n = 500?

This tool caps at n = 500 for exact BigInt results. Beyond that, use computer algebra systems.

What is double factorial?

n!! multiplies every other integer down—different function, not computed here.

How does 10! appear in probability?

Shuffling 10 distinct cards has 10! equally likely orders—each specific order has probability 1/10!.

Is n! the same as n^n?

No. n! multiplies 1×2×…×n; n^n multiplies n copies of n. For n > 1, n^n grows faster eventually but differs at small n.

Why divide factorials in nCr?

Choosing {A,B,C} is one combination but 3! = 6 permutations—division removes reordering duplicates.

Does negative n have factorial?

Not in standard combinatorics. Gamma function generalizes to non-integers but not negative integers.

How is factorial used in derangements?

Subfactorial formulas subtract cases with fixed points using alternating sums over factorials—advanced counting built on n!.

Privacy, accuracy, and trust

Privacy

n is processed with BigInt in your browser—never uploaded.

Advertisement

Reviewed by EverydayTools Editorial Team on 2026-07-03.

Same workflow or intent — pick the next step without leaving the site.

Frequently opened tools from the same category.

People also use

Cross-category tools others open in the same session.

Continue learning

Guides and walkthroughs that reference this tool.

Explore categories

Browse full tool collections by topic.