AllSmartCalculators

Factorial Calculator

Calculate n! for any number.

Reviewed by Ankit Gupta· Builder · AllSmartCalculators

math

Adjust the inputs below

Ready when you are

Adjust the input on the left to see your n!.

Introduction to the Factorial Calculator

The Factorial Calculator computes n! for any non-negative integer using the formula: n! = n x (n-1) x (n-2) x ... x 2 x 1, with 0! defined as 1. It is one of the most-used building blocks in permutations, combinations, probability, binomial expansion and Taylor series across Indian school and college maths.

Indian Class 11 and 12 students under CBSE, ICSE and state boards encounter factorials in NCERT chapter Permutations and Combinations, where formulas like nPr = n!/(n-r)! and nCr = n!/[r!(n-r)!] dominate the exercise sets. JEE Main, JEE Advanced, NDA, CDS and BITSAT regularly include factorial-heavy questions worth 8 to 12 marks per paper.

You enter a single non-negative integer n. The tool returns n! in full digits, scientific notation for large values, and a step-by-step breakdown. It handles n up to 170 within standard floating-point range and uses big-number arithmetic for higher values.

Who Should Use This Factorial Calculator

CBSE Class 11 students like Kavya in Delhi solving NCERT Chapter 7 Permutations and Combinations need this to verify homework answers quickly. JEE aspirants like Arjun in Kota practicing binomial theorem and probability sums use it to cross-check intermediate steps in 4-mark problems. Engineering students like Rohan in Bengaluru working on discrete math, combinatorics and algorithm analysis (Big-O notation involves n!) use it routinely. Statistics students like Priya in Pune computing Poisson distribution probabilities, where e raised to power negative lambda x lambda^k / k! appears, use it daily. Competitive coders like Manish in Hyderabad on Codeforces and CodeChef use it to verify formulas before writing brute-force solutions.

Tips for Factorial Problems

Smart Factorial Tips

Memorize factorials up to 10! by heart: 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800. This saves 30 to 45 seconds per JEE question.

Simplify before computing. For nCr, divide n! by (n-r)! to cancel terms. Example: 10C2 = 10!/(8! x 2!) becomes (10 x 9)/2 = 45 without ever computing 10! fully.

Watch for factorials in disguise. The Indian board favourite "arrangements of MISSISSIPPI" is 11!/(4! x 4! x 2!), not just 11!. Always look for repeated letters or grouped objects.

For probability sums using Poisson or normal approximations, use Stirling's formula: n! is approximately equal to sqrt(2 pi n) x (n/e)^n for large n. This is in the NCERT supplementary syllabus for some boards.

Never compute n! beyond 170 in standard programs. Java long and Python int handle it but spreadsheets like Excel overflow at 171!. Use big-number libraries or this calculator for higher values.

Formula Explanation

Core Factorial Formula

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

Where:

  • n = non-negative integer
  • 0! = 1 by definition
  • 1! = 1
  • The product runs from n down to 1

Example: 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720. Used in arrangements: number of ways to seat 6 people in a row at a wedding in Lucknow is 6! = 720.

Factorial Quick Reference Table

nn!DigitsExample Use
51203Arranging 5 books on a shelf
75,0404Days in a week permutations
103,628,8007Seating 10 guests at a dinner
151.31 x 10^1213IPL team batting order combos
202.43 x 10^181920-team tournament fixtures

Real-World Example

Example: Ishita's JEE Permutation Problem in Mumbai

Meet Ishita, an 18-year-old Class 12 student from Mumbai preparing for JEE Main 2026. Her mock test asks: How many distinct arrangements of the letters in ENGINEERING are possible?

Step 1: She counts the letters: 11 total. Repeated: E appears 3 times, N appears 3 times, I appears 2 times, G appears 2 times, R appears 1 time.

Step 2: She enters values into the formula: 11!/(3! x 3! x 2! x 2! x 1!) = 39,916,800/(6 x 6 x 2 x 2 x 1) = 39,916,800/144.

Step 3: The calculator returns 11! = 39,916,800 and divides by 144 to give 277,200.

Result: 277,200 distinct arrangements. Ishita matches this with the JEE answer key and confirms her understanding, gaining 4 marks on this question type in the actual exam.

Frequently Asked Questions About Factorials

Common questions Indian students ask about factorials include why 0! equals 1, how to compute factorials of negative numbers and fractions (using the Gamma function), the largest factorial that fits in a 64-bit integer, applications of factorial in binomial expansion and probability, and how factorial growth compares with exponential growth. The answers below cover each of these in detail with NCERT-aligned explanations.

Factorial Calculator — frequently asked questions

How does the Factorial Calculator work?

Factorial of n (written n!) is the product of all positive integers from 1 to n. So 5! = 5 x 4 x 3 x 2 x 1 = 120. By convention 0! equals 1. The calculator computes factorial for any non-negative integer up to 170 in standard precision, and beyond using BigInt arithmetic for arbitrary-size integers.

How accurate is the factorial computation?

Factorials are computed exactly using integer multiplication. For inputs up to 170, the result fits in JavaScript's double-precision number type (about 7.3 x 10^306). For larger inputs, the calculator uses BigInt arithmetic that stays exact regardless of size. There is no rounding error in the calculation, only display formatting for extremely large outputs.

What inputs does the Factorial Calculator need?

Enter a single non-negative integer. The calculator returns n! plus optional related values: number of digits, scientific notation form, and the prime factorisation if it fits on screen. A combinatorial mode also computes n choose k (combinations) and n permute k (permutations), both heavily reliant on factorial arithmetic underneath.

Where are factorials used in real problems?

Factorials count arrangements: 5! ways to seat 5 people in a row, 10! card shuffles of a 10-card deck. Combinations (n choose k) count selections without order: 52 choose 5 gives the number of possible poker hands. Permutations count ordered selections. Factorials also appear in series expansions for sine, cosine, exponential, and many physics and engineering formulas.

Is the Factorial Calculator free to use?

Yes, the Factorial Calculator is free on AllSmartCalculators with no signup, ads inside the form, or login. Works on any device. Bookmark it for probability and combinatorics homework, computing permutations and combinations in card and dice problems, statistical distribution work, polynomial series expansions, and computer science algorithm analysis involving factorial-growth functions.

What other calculators pair with the Factorial Calculator?

Pair the Factorial Calculator with the Probability Calculator (combinations and permutations directly use factorials), the Power Calculator (Taylor series expansions need both), and the Logarithm Calculator (Stirling's approximation for large factorials uses logs). The Statistics Calculator handles combinatorial probability distributions like binomial.

Embed this calculator

Free to use on your own site — no signup, no key, no limits. Paste this where you want the calculator to appear. Please keep the attribution line; it is the only thing we ask in return.

HTML

Add ?theme=light to the embed URL for a light background. The frame reports its own height to the parent window as a asc-embed-height message if you would rather size it automatically than use the fixed 620px.

Related calculators