Skip to content
    Statistics

    What Is a Factorial? (n!) Explained Simply

    How many ways can you shuffle a deck of 52 cards? The answer has 68 digits, far more than the number of grains of sand on a beach. That number is 52 factorial. In this guide you'll learn what n! means, how to work it out, and why 0! equals 1.

    Math Solver Academic Editorial Board4 min read

    Key takeaways

    • n! = n × (n − 1) × (n − 2) × … × 2 × 1.
    • n! counts the ways to arrange n different things in a row.
    • 0! = 1, not 0. There is exactly one way to arrange nothing.
    • Factorials grow very fast: 10! is already 3,628,800.
    In this guide
    1. 01What is a factorial?
    2. 02Why do factorials matter?
    3. 03The formula
    4. 04How to calculate a factorial step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you'll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is a factorial?

    Say you have 3 books: A, B and C. How many ways can you line them up on a shelf? You have 3 choices for the first spot, then 2 left for the second, then 1 for the last. That is 3 × 2 × 1 = 6 ways. We write this as 3!, read '3 factorial'.

    So a factorial is a whole number multiplied by every whole number below it, down to 1.

    Why do factorials matter?

    Factorials are the building blocks of counting. Any time you ask 'how many different orders?', a factorial is hiding in the answer. They also appear in probability, in the binomial formula and in calculus.

    Factorials grow faster than powers. 10! is about 3.6 million, but 20! is already more than 2 billion billion.

    The formula

    n! = n × (n − 1) × (n − 2) × … × 2 × 1
    SymbolWhat it meansExample
    nA whole number, 0 or bigger6
    n!The product from n down to 1720
    0!Defined as 11

    Factorials are not defined for negative numbers. This calculator rounds n to the nearest whole number and can show results up to 170!. Anything bigger is too large for a normal computer number.

    How to calculate a factorial step by step

    1. 1Write down n. Check it is a whole number, 0 or more.
    2. 2Multiply by the next number down. n × (n − 1).
    3. 3Keep going. Multiply by n − 2, n − 3 and so on.
    4. 4Stop at 1. The final product is n!.

    Now pick any whole number and let the calculator below multiply it out for you.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Statistics
    High School

    Factorial Calculator

    Calculate the factorial of a number

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

    μ = 068.2% (±1σ)
    μ: 0 | σ: 1
    120

    💡 Example

    Reference
    Inputs:n=5
    Result:120
    Open the full Factorial Calculator calculator

    Common mistakes to avoid

    • Adding instead of multiplying. 4! is 4 × 3 × 2 × 1 = 24, not 4 + 3 + 2 + 1 = 10.
    • Stopping too early. 5! does not stop at 5 × 4. Go all the way down to 1.
    • Using a negative or decimal n. The normal factorial only works for whole numbers 0, 1, 2, 3 and so on.
    • Underestimating the size. 13! is already more than 6 billion.

    Tips and tricks

    nn!
    01
    11
    36
    5120
    6720
    103,628,800

    Where you'll use it in real life

    • Races and rankings: the number of possible finishing orders.
    • Scheduling: the ways to order a list of tasks or visits.
    • Probability: inside the binomial probability formula.
    • Passwords and codes: counting codes where each symbol is used once.

    Quick summary

    A factorial multiplies a whole number by every whole number below it down to 1, and 0! is 1. It counts how many ways you can arrange things in order. Use the calculator above to get any factorial up to 170! with every step shown.

    Worked example

    Six runners are in a race and you want to know how many different finishing orders are possible, from first place to last place.

    1. 01n! = n × (n-1) × ... × 2 × 1
    2. 026! = 6 × 5 × 4 × 3 × 2 × 1
    3. 036! = 720

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    Why is 0 factorial equal to 1?

    There is exactly one way to arrange zero objects: do nothing. Setting 0! = 1 also keeps formulas like nCr = n! ÷ (r!(n − r)!) working when r = 0 or r = n.

    Can you take the factorial of a negative number or a decimal?

    Not with the normal definition. Factorials are for whole numbers 0, 1, 2, 3 and so on. This calculator rounds a decimal to the nearest whole number first.

    What is 10 factorial?

    10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800.

    How many ways can you shuffle a deck of cards?

    52!, which is about 8.07 × 10⁶⁷. That is so large that a well-shuffled deck is almost certainly in an order no one has ever seen before.

    #Statistics#High School#Factorial Calculator
    Updated

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX