Calculate factorials and combinations
Instantly compute n! (factorial), nCr (combinations), and nPr (permutations) for any valid integers.
About This Tool
Factorial Calculator is useful for statistics, probability problems, and combinatorics exercises in math courses and competitive programming.
Key Features
Factorial (n!) calculation
Combinations (nCr) calculation
Permutations (nPr) calculation
Supports n up to 20
Instant client-side results
How to Use This Tool
- Enter n for a factorial.
- Enter n and r for combinations (nCr) or permutations (nPr).
- Results appear instantly.
Why Use This Tool
- Covers factorial, nCr, and nPr in a single tool.
- No calculator app needed for combinatorics problems.
- Handles n up to 20 (maximum safe factorial in JavaScript).
Pro Tips
- Use nCr to calculate lottery odds
- Use nPr when order matters (e.g. race standings)
- 0! = 1 by mathematical convention
Frequently Asked Questions
What is n! (factorial)?
n! is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120.
What is the difference between nCr and nPr?
nCr counts combinations where order does NOT matter. nPr counts permutations where order DOES matter.
Why is there a limit on n?
JavaScript numbers lose precision past 2^53. Factorials above 20! exceed that range.