Quick Overview
- This tool calculates the factorial of any non-negative integer (n!) and displays every multiplication step in sequence.
- The factorial formula is defined as n! = n × (n−1) × (n−2) × … × 1, with the special cases 0! = 1 and 1! = 1.
- For example, 5! = 120 and 10! = 3,628,800.
- The calculator is designed for students solving permutation and combination problems, and for developers validating recursive functions.
Factorial Calculator: Instant n! Results with Step-by-Step Solutions
Whether you're cramming for the SAT, debugging a recursive function, or working through a probability problem set, computing large factorials by hand is slow and error-prone. The Factorial Calculator takes your input and returns the exact value of n! alongside every multiplication step.
Formula: n! = n × (n−1) × … × 1.
Purpose: solving permutation, combination, and probability problems in seconds.
What Is a Factorial?
A factorial is the product of all positive integers from 1 up to a given number n, written as n!. Two special cases are universally accepted: 0! = 1 and 1! = 1. These aren't arbitrary rules — they ensure that combination and permutation formulas work consistently across all valid inputs. In the United States, factorials appear on the SAT, ACT, AP Statistics, and AP Computer Science exams, making them a high-priority topic for students in junior and senior year. For software engineers, factorials underpin algorithms that calculate arrangements in everything from route optimization to game-state analysis. The numbers grow extraordinarily fast: while 5! is a manageable 120, 20! already exceeds two quintillion, making a calculator indispensable for anything beyond the simplest cases.
Formula and Calculation Reference
There is exactly one formula for factorial, and it applies to every non-negative integer. The table below covers the most commonly needed values along with their typical applications.
n | Calculation | Result (n!) | Common Use Case |
0 | By definition | 1 | Base case in combinations |
1 | 1 | 1 | Identity case |
5 | 5 × 4 × 3 × 2 × 1 | 120 | SAT permutation problems |
10 | 10 × 9 × … × 1 | 3,628,800 | Probability and statistics |
13 | 13 × 12 × … × 1 | 6,227,020,800 | Card game arrangements (52-card deck subsets) |
20 | 20 × 19 × … × 1 | 2,432,902,008,176,640,000 | Large combinatorics, algorithm analysis |
Quick Examples:
How many ways can 6 NFL draft picks be ranked? 6! = 720
Choose 3 players from a 10-person roster (order matters): P(10,3) = 10!/7! = 720
Ways to arrange all 8 letters of "ABCDEFGH": 8! = 40,320
Practical Examples
SAT/ACT Counting Problems
A classic standardized-test question asks: "In how many ways can 7 students be seated in a row?" The answer is 7! = 5,040. Students who understand this formula intuitively — not just by memorization — can solve variations involving restrictions or repetitions. The step-by-step display reinforces exactly why each multiplication step is necessary.
AP Computer Science: Recursive Function Verification
A student writing a recursive factorial function in Java or Python needs a reference value to confirm their output is correct. Entering 12 returns 12! = 479,001,600 instantly. Comparing this against their program's output reveals off-by-one errors or missing base cases before submission.
Poker and Card Game Probability
Calculating the number of 5-card hands from a standard 52-card deck uses C(52,5) = 52!/(5! × 47!). Rather than computing 52! in full, understanding how the cancellation works becomes clearer when you see 5! = 120 and 47! side by side in the steps panel.
NASA-Style Route Optimization (Intro Level)
Scheduling 8 satellite passes in optimal order involves evaluating up to 8! = 40,320 possible sequences — a classic traveling salesman setup. Even at the introductory computer-science level, this example demonstrates why brute-force approaches become impractical fast and why efficient algorithms matter.
Who Can Use This Calculator?
High school students — Prepare for SAT, ACT, and AP exams involving permutations and combinations with instant answer verification.
College math and statistics students — Quickly confirm n! values for discrete math, probability theory, and combinatorics coursework.
Software engineers and developers — Validate recursive algorithms, dynamic programming solutions, and Big-O complexity estimates.
Data scientists — Compute factorials needed for Bayesian probability, permutation tests, and feature selection counts.
Math teachers and tutors — Demonstrate factorial growth visually for students who struggle to grasp how quickly n! scales.
Game developers — Calculate total possible game states and board arrangements for puzzle design and AI difficulty tuning.
Curious learners — Explore how many ways you can arrange your Spotify playlist or sort a deck of cards.
Cryptography enthusiasts — Estimate key-space sizes based on permutation counts for educational security analysis.
Conclusion and Next Steps
Factorial calculation sits at the heart of combinatorics, probability, and algorithm design. Whether you need a quick answer for a homework problem or a precise reference value for a software project, doing it by hand for anything above n = 10 invites errors. This calculator delivers the exact result alongside every step, so you understand the process rather than just copying a number. When you're ready to go further, explore the Permutation Calculator, the Combination Calculator, and the Probability Calculator to apply these values directly to your problems.
Key Takeaways
0! = 1 and 1! = 1 are mathematical definitions, not calculated results.
Factorial is only defined for non-negative integers; negative and fractional inputs are not valid.
The value of n! grows extraordinarily fast — 20! already exceeds two quintillion.
Permutations use P(n,r) = n!/(n−r)! and combinations use C(n,r) = n!/(r!×(n−r)!), both built directly on factorials.
This tool is free, works on mobile, and requires no account or sign-up.