Factorial On Calculator
To find a factorial on a calculator you type the number, press the x! key, and read the result. This page does that job online for any whole number from 0 to 170: enter n and it returns n! with the full multiplication chain written out, so you can see every step instead of trusting a single number. It computes ordinary factorials only, in standard double-precision arithmetic, and the sections below are honest about what that means for very large results.
Quick Answer
10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800. That is the worked example loaded in the calculator above. On a physical calculator the same answer takes three presses: type 10, press the x! key, then press equals. This tool accepts any whole number from 0 to 170 and writes out the whole chain.
Key takeaways
- n! multiplies every whole number from n down to 1, and 0! is defined as 1, not 0.
- The range is 0 to 170 for a hard reason: 171! is larger than standard calculator arithmetic can hold and overflows to infinity.
- Results are exact integers through 21!. From 22! on, double-precision rounding changes the later digits, and this page says so wherever it quotes a large value.
- Decimals are not gamma values here. The tool reads the whole-number part, so 5.9 returns 5! = 120.
- Quick Answer
- How to use this factorial calculator
- How to do a factorial on a physical calculator
- The factorial formula
- Worked example: 10 factorial, step by step
- Factorial table: 0! to 20!
- Why the calculator stops at 170, and how exact the answers are
- Where factorials do the work: permutations and combinations
- What competing calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use this factorial calculator
Type a whole number from 0 to 170, then click Calculate. The results stay hidden until you do.
- Enter n: one whole number. The pre-filled 10 gives the worked example, 3,628,800.
- Read the chain first: the result opens with the expansion, for example 5! = 5 × 4 × 3 × 2 × 1, which is the part worth checking against your homework or formula.
- Read the grouped result: the large number under the chain is n! with thousands separators, in the format your browser locale uses.
- Check the precision badge: green means the printed integer is exact, which holds through 21!. Amber means the value came from double-precision arithmetic and the later digits are rounded, which is the case from 22! to 170!.
Two input behaviours catch people out. First, the tool reads input with a whole-number parser, so a decimal entry is cut down to its whole part: 2.5 calculates 2! and 0.5 calculates 0!. Second, there is no gamma evaluation hiding behind that: mathematicians extend factorials to decimals with the gamma function, where the value at 0.5 would involve √π, but this tool deliberately stays with the school definition. If you need a gamma value, this is the wrong tool, and the limits section below explains the distinction in full.
How to do a factorial on a physical calculator
On most scientific calculators you enter the number first, then press the factorial key, then equals. The key is labelled x! or n! and it usually sits on a shifted layer.
- Standard scientific models (Casio fx series and similar): type the number, press Shift or 2nd, press the x! key (often above the multiplication or a probability key), then press =. For 5: type 5, Shift, x!, =, and the display shows 120.
- Texas Instruments graphing models (TI-83 and TI-84 family): type the number, press MATH, arrow right to the PRB (probability) menu, choose the! symbol, then press ENTER.
- Basic calculators with no x! key: there is no shortcut. Multiply the descending chain by hand, n × (n − 1) × (n − 2) and so on down to 1, which is exactly the chain this page writes out for you.
- Phone and desktop calculator apps: switch to the scientific layout first. The factorial key only appears there, usually as x! alongside the logarithm and power keys.
Two habits prevent the common errors. Enter the number before the factorial key, not after it: factorial is a postfix operation on most models, so the sequence is value, then x!. And expect large inputs to fail on hardware: many school calculators stop at 69! because their internal range tops out near 10100, well below the 170! ceiling of the double-precision arithmetic used here.
The factorial formula
n! = n × (n − 1) × (n − 2) × … × 2 × 1, with 0! = 1 by definition. The recursive form says the same thing one step at a time: n! = n × (n − 1)!.
0! = 1 (by definition)
n! = n × (n − 1)! for n ≥ 1
The notation itself is old: Christian Kramp introduced the! symbol in 1808, and the counting meaning, formalised in the NIST Digital Library of Mathematical Functions through the relation Gamma(n + 1) = n!, is that n! is the number of ways to arrange n distinct objects in order. That counting meaning is why 0! = 1 is not a fudge: there is exactly one way to arrange zero objects, the empty arrangement. The Wolfram Language documentation for Factorial states the same definition and notes that for non-integer input the value is given by Gamma(n + 1), the extension this tool does not perform.
Worked example: 10 factorial, step by step
Ten distinct books on a shelf can be arranged in 10! orders. The calculator runs the descending chain:
| Check (real run of this tool) | Result shown | Note |
|---|---|---|
| 5! | 120 | Chain: 5 × 4 × 3 × 2 × 1 |
| 20! | 2,432,902,008,176,640,000 | Exact integer |
| 25! | 15,511,210,043,330,984,000,000,000 | Later digits rounded; the exact value ends …985,984,000,000 |
| Typing 5.9 | 120 | Whole-number part read: calculates 5! |
| 170! | 7,257,415,615,308,004,000,… (307 digits) | Largest input accepted; full chain is printed |
Every row is a real run of the calculator above, so you can type any of them in and get the same display back. The 25! row is the honest one to study: the tool prints a confident-looking integer, and the first 16 or so digits are right, but double-precision arithmetic cannot hold the rest, so the tail is rounded. Exact-integer tools exist and the competitor section below names the trade-off.
Factorial table: 0! to 20!
Every value in this table is exact. These are the factorials students and programmers reach for most, and all of them sit inside this tool's exact range.
| n | n! | n | n! |
|---|---|---|---|
| 0 | 1 | 11 | 39,916,800 |
| 1 | 1 | 12 | 479,001,600 |
| 2 | 2 | 13 | 6,227,020,800 |
| 3 | 6 | 14 | 87,178,291,200 |
| 4 | 24 | 15 | 1,307,674,368,000 |
| 5 | 120 | 16 | 20,922,789,888,000 |
| 6 | 720 | 17 | 355,687,428,096,000 |
| 7 | 5,040 | 18 | 6,402,373,705,728,000 |
| 8 | 40,320 | 19 | 121,645,100,408,832,000 |
| 9 | 362,880 | 20 | 2,432,902,008,176,640,000 |
Growth is the story of this table. Adding one to n multiplies the result by the new n, so the values outrun addition-based intuition fast: 10! is already in the millions, 20! passes 2 quintillion, and 21! = 51,090,942,171,709,440,000 is the last value this tool prints digit-for-digit exactly. That speed is also why factorials dominate counting problems: the number of orderings explodes long before the set itself gets large. For the related operation that raises a number to a power instead of multiplying a chain, the exponent calculator covers the power side, and the contrast is instructive: 1010 is 10,000,000,000, roughly 2,756 times larger than 10!, yet by n = 20 the factorial has overtaken the power.
Why the calculator stops at 170, and how exact the answers are
The 170 cap is an arithmetic limit, not an editorial one. The tool multiplies with standard double-precision numbers, which top out near 1.8 × 10308. Since 170! is about 7.26 × 10306 it still fits, while 171! is about 1.24 × 10309 and becomes infinity. The tool refuses 171 and above with the message “Number too large. Please enter a number between 0 and 170” rather than printing a broken result.
Precision gives out earlier than range. A double holds about 15 to 17 significant decimal digits exactly, so the running product stops being a digit-perfect integer once it grows past that: the printed result matches the true integer through 21!, and from 22! the later digits are the nearest representable values instead. For homework, counting arguments and order-of-magnitude work that rounding is invisible. For exact large factorials, such as checking a 100-digit integer digit by digit, you need a big-integer tool, several of which the competitor section names. What this page will not do is print an approximate tail without labelling it, which is why the precision badge is wired into every result.
The remaining limits are about scope. Negative integers have no factorial in the elementary definition, and the tool rejects them with “Please enter a valid non-negative number”. Non-integers belong to the gamma function: the gamma function satisfies Gamma(n + 1) = n! at whole numbers and assigns values such as (1/2)! = √π/2 in between, as the Kansas State University notes on the gamma function work through in detail, and the NIST Digital Library of Mathematical Functions, Chapter 5 treats rigorously. This tool does not evaluate gamma. It reads the whole-number part of your entry and computes that factorial, so (1/2) entered as 0.5 returns 0! = 1, not √π/2.
Where factorials do the work: permutations and combinations
Factorials earn their place inside counting formulas. A permutation counts arrangements where order matters, and choosing r items from n in order gives nPr = n! ÷ (n − r)!. A combination counts selections where order does not matter, and gives nCr = n! ÷ (r! (n − r)!). Both formulas are factorial arithmetic, which is why a reliable n! is the building block.
Worked through this tool: a podium of gold, silver and bronze from 10 finalists is a permutation, 10! ÷ 7! = 10 × 9 × 8 = 720 possible podiums. A committee of 3 chosen from the same 10 finalists is a combination, 10! ÷ (3! × 7!) = 120 possible committees. The dedicated binomial coefficient calculator runs the combination formula directly and is the better tool once you know you need nCr rather than a bare factorial. The same factorial denominators appear in probability: series expansions and the Poisson formula both divide by k!, and the discrete probability distribution calculator and the compound probability calculator pick up from there when the question turns into the chance of an outcome rather than a count of arrangements.
What competing calculators miss
The factorial tools ranking for this topic split into two camps, and each gives something up:
- Exact big-integer tools (CalculatorX, NeftCal): exact integers up to n = 5,000 with digit counts. Genuinely better if you need every digit of a huge factorial. The cost is a heavier, specification-led page, and the multiplication chain disappears behind scientific notation for large results, which is exactly the part a student needs to see.
- Stepwise teaching tools (Vedantu): clear step-by-step breakdowns and a conversion table, aimed at school discrete maths. Strong pedagogy, thin treatment of the precision and overflow questions that decide whether a large answer can be trusted.
- Same-ceiling tools (EasyUnitConverter, ManyCalcs): the same 0 to 170 double-precision range as this page, with digit and trailing-zero counts added. EasyUnitConverter explains the 170 ceiling well. ManyCalcs adds double factorial and subfactorial modes this tool does not offer.
- Multifactorial tools (CalculatorSoup): n!, n!!, n!!! and beyond in one place, well referenced. Broader scope, but the plain n! answer a homework question wants sits inside a more complex tool.
- The gap this page fills: the question in this page's name is how to do a factorial on a calculator, so this page answers both halves: the key sequences for physical scientific and TI graphing calculators, and an online tool that shows the complete chain for every n up to 170, with its exactness boundary (exact through 21!, rounded tails after) stated on the result itself instead of buried or omitted.
Frequently asked questions
Type the number, press the x! or n! key, then press equals. On many scientific calculators the factorial key is a shifted function, so press Shift or 2nd first. On TI graphing calculators, type the number, press MATH, move to the PRB menu, choose the! symbol, then press ENTER.
10! = 3,628,800. The chain is 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1, and it counts the ways to arrange 10 distinct items in order. It is the worked example pre-filled in the calculator above.
Because 0! is defined as the empty product, and because there is exactly one way to arrange zero objects: the empty arrangement. The definition also keeps the counting formulas consistent, since nCr with r = 0 must return 1, and that requires 0! to be 1 in the denominator.
It multiplies using standard double-precision arithmetic, which holds numbers up to about 1.8 × 10^308. 170! is about 7.26 × 10^306 and still fits, but 171! is about 1.24 × 10^309 and overflows to infinity. The tool refuses inputs above 170 instead of printing a meaningless result.
Yes through 21!: the printed integer matches the true factorial digit for digit. From 22! on, the value is computed in double-precision arithmetic, so the leading digits are correct and the later digits are rounded to the nearest representable number. The badge under each result tells you which case you are in.
The tool reads the whole-number part and calculates that factorial, so 5.9 returns 5! = 120 and 0.5 returns 0! = 1. It does not evaluate the gamma function, which is the extension that gives factorials of decimals their mathematical values. Enter a whole number to get the factorial you expect.
No. It computes ordinary factorials n! only. A double factorial such as 10!! = 10 × 8 × 6 × 4 × 2 = 3,840 multiplies every second integer, and the gamma function extends factorials to non-integers through Gamma(n + 1). Both are different operations that need a dedicated tool.
Counting arrangements and selections: the number of orderings of n items is n!, permutations use n! ÷ (n − r)!, and combinations use n! ÷ (r! (n − r)!). Factorials also sit in the denominators of probability formulas and series expansions, including the Poisson formula and the Taylor series.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- National Institute of Standards and Technology. Digital Library of Mathematical Functions, Section 5.2: Gamma Function (factorial relation). Accessed October 21, 2026.
- National Institute of Standards and Technology. Digital Library of Mathematical Functions, Section 26.2: Basic Definitions (permutations). Accessed October 21, 2026.
- Wolfram Research. Factorial: Wolfram Language Documentation. Accessed October 21, 2026.
- National Institute of Standards and Technology. Digital Library of Mathematical Functions, Chapter 5: Gamma Function. Accessed October 21, 2026.
- Kansas State University, Department of Mathematics. The Gamma Function (Elementary Differential Equations). Accessed October 21, 2026.
- OEIS Foundation. Sequence A000142: Factorial numbers. Accessed October 21, 2026.
