3tej home
← Math

What is Factorial Calculator?

A Factorial Calculator computes factorial from the inputs you provide. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Free Factorial Calculator. The tool runs entirely in.

Interactive calculator

Factorial (n!)

n! = 1 x 2 x 3 x ... x n. Supports BigInt up to n = 1000.

n!-
Scientific notation-
Digit count-
Trailing zeros-
How is this calculated?

Formula: n! = 1 x 2 x 3 x ... x n with 0! = 1 by convention. Numeric overflow occurs after 170! in 64-bit floats, so this tool falls back to JavaScript BigInt for exact integer arithmetic up to n = 1000. Trailing zeros equal floor(n/5) + floor(n/25) + ... (Legendre's formula for the exponent of 5 in n!). Source: standard combinatorics.

Factorial Calculator

n! = n × (n-1) × (n-2) × ... × 2 × 1.

About this tool

Factorial is the product of all positive integers up to n. It's central to combinatorics: n! = number of orderings of n distinct items. 0! is defined as 1 by convention. Factorials grow extremely fast - 170! is the largest that fits in a standard 64-bit float.

How it works

n! = n × (n-1)! with 0! = 1; Stirling's: n! ≈ √(2πn) × (n/e)^n

Enter any non-negative integer. For n ≤ 170 the result fits in standard floating-point. For larger values, the calculator uses arbitrary-precision BigInt to compute the exact answer.

Quick math reference

OperationFormulaExample
Percentage of a numbervalue x percent / 10020% of 150 = 150 x 0.20 = 30
Percentage increase(new - old) / old x 100from 80 to 100 = +25%
Percentage decrease(old - new) / old x 100from 100 to 80 = -20% (not -25%)
Reverse percentagevalue / (1 + rate)$120 after 20% tax was $100 originally
Compound growthP x (1 + r)^n$1,000 at 7% for 10 years = $1,967
Average (mean)sum / count(2+4+6+8) / 4 = 5
Weighted averagesum(weight x value) / sum(weight)Grade: (3x80 + 2x90) / 5 = 84

Why percentage gain != percentage loss

A 50% loss requires a 100% gain to recover. This asymmetry surprises most people:

  • Down 10% -> need +11.1% to break even
  • Down 20% -> need +25%
  • Down 33% -> need +50%
  • Down 50% -> need +100%
  • Down 75% -> need +300%
  • Down 90% -> need +900%

This is why limiting drawdowns matters more than capturing every up-day in investing.

Useful approximations

  • Rule of 72: doubling time = 72 / rate. At 7%, money doubles in ~10.3 years. At 9%, in 8 years.
  • Rule of 114: tripling time = 114 / rate.
  • Rule of 144: quadrupling time = 144 / rate.
  • Inflation halving: at 3% inflation, purchasing power halves in 24 years (72/3).

The formula explained

This calculator uses the following formula:

n! = n × (n-1)! with 0! = 1; Stirling's: n! ≈ √(2πn) × (n/e)^n

The reason this formula works is rooted in the underlying physics, finance, or biology of the problem. Behind every calculator is a published, peer-reviewed equation or a widely accepted convention. We do not invent formulas; we apply standard ones from textbooks, government tables, professional bodies, and academic literature.

If you are curious about the math, the simplest way to verify is to plug in two known numbers and compare against a known result. The calculator should match published examples to within rounding precision.

Frequently asked questions

Why is 0! = 1?

By convention to make formulas work - there's exactly one way to arrange zero items (do nothing).

How big does it get?

20! is already over 2 quintillion. 100! has 158 digits. 1000! has 2,568 digits.

Trailing zeros pattern?

Equal to floor(n/5) + floor(n/25) + ... - comes from how many factors of 5 are in n!.

Where is factorial used?

Permutations (nPr = n! / (n-r)!), combinations (nCr = n! / (r!·(n-r)!)), Taylor series, and probability.

Is the calculator's precision exact?

JavaScript uses IEEE 754 double-precision floats. Most operations are accurate to ~15 significant digits. Currency calculations may show tiny rounding errors (0.1 + 0.2 = 0.30000000000000004) - this is normal and rounded for display.

Does the order of operations follow standard math rules?

Yes. Parentheses first, then exponents, then multiplication/division (left to right), then addition/subtraction. The calculator parses expressions accordingly.

What's the difference between mean, median, and mode?

Mean is the arithmetic average. Median is the middle value when sorted. Mode is the most frequent value. For skewed data (incomes, house prices), the median is more representative than the mean.

How do I calculate percentage difference between two numbers?

Use (new - old) / |old| x 100. The denominator is the ORIGINAL value, not the average. Going from 50 to 60 is a 20% increase. Going from 60 to 50 is a 16.7% decrease, not 20%.

How accurate is the Factorial Calculator?

It applies the standard formula. Accuracy is limited only by your input precision. For decisions with material consequences (taxes, medical, legal, structural), use the result as a starting point and verify with a qualified professional in the relevant field.

Is the Factorial Calculator free to use?

Yes. 100% free, no signup, no payment, no API key. The site is funded by display ads around the tool but not inside the calculation flow.

Are my inputs saved anywhere?

No. All inputs stay in your browser tab. Closing the tab discards them. The site uses Google Analytics for traffic measurement (anonymized) but the analytics never see what you type into the form.

Can I use the Factorial Calculator on my phone?

Yes. The tool is responsive and tested on iOS Safari, Android Chrome, and major desktop browsers. Touch targets meet Apple's 44pt and Google's 48dp minimum.

Does the Factorial Calculator work offline?

Yes. Once the page has loaded, it works without internet. The calculation runs in JavaScript on your device.

How do I report a bug or suggest improvement to the Factorial Calculator?

Email hi@3tej.com with the URL of this page and a description of what you saw vs expected. We typically respond within 72 hours.

Can I share results from the Factorial Calculator?

Take a screenshot or copy the output. The page doesn't generate shareable URLs for specific calculations - inputs stay in your browser only.

Why are the results different from another factorial tool?

Most likely: different formula assumptions, different default values, different rounding rules, or different applicable rates. Check the methodology if both tools document it. Both can be valid for different scenarios.