Factorial Calculator
Find n factorial for any integer up to 20.
Result
How it is calculated
The factorial of a non-negative whole number is the product of all whole numbers from 1 up to it: n! = n × (n−1) × … × 2 × 1, with 0! = 1 by definition. The tool multiplies the integers one by one in exact integer arithmetic. It accepts only whole numbers from 0 to 20, because 20! = 2,432,902,008,176,640,000 is the largest factorial that fits in a 64-bit integer; a decimal, a negative number or anything above 20 returns no result rather than an inexact one. Digits are grouped with the separator of the page language.
Worked example
For n = 10 the product is 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1. Multiply in pairs: 10 × 9 = 90, 90 × 8 = 720, 720 × 7 = 5,040, 5,040 × 6 = 30,240, 30,240 × 5 = 151,200, 151,200 × 4 = 604,800, 604,800 × 3 = 1,814,400, and × 2 = 3,628,800. The tool returns 3,628,800. That is how many different orders 10 distinct items can be arranged in.
Common mistakes
- Entering a decimal such as 4.5. Factorial here is defined for whole numbers only, so there is no result.
- Expecting 0! to be 0. By definition 0! = 1, which is what makes combination formulas work.
- Typing a number above 20 and expecting a huge value. Beyond 20 the result no longer fits exactly, so the tool refuses it.
- Confusing n! with n × 2 or n². Factorial grows far faster: 5! = 120, while 5² = 25.
- Using n! when order does not matter. For choosing a group from n items you need combinations, which divide factorials by each other.
About this calculator
This tool computes n! (n factorial), the product of every whole number from 1 up to n — for example 5! = 5×4×3×2×1 = 120. It is capped at 20 because 20! is the largest factorial that fits in a 64-bit integer, which keeps every result exact.
Factorials show up constantly in combinatorics: counting how many ways a deck of cards can be arranged, how many ways a race can finish, or computing permutations and combinations for probability problems. Students, and anyone writing code that needs nCr or nPr, use this to check their work by hand.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The tool stops at 20, because 20! equals 2,432,902,008,176,640,000 and that is the largest factorial that still fits exactly into a 64-bit integer; anything above returns no result rather than a rounded guess. A quick use: n! is the number of ways to line up n different items, so 10 people in a row can be arranged 3,628,800 ways. Need larger values or digit counts? Tell us what you are working on.