We Value Your Privacy

We use cookies to enhance your browsing experience and analyze site traffic. All calculations happen locally in your browser - we never see or store your data. Learn more in our Privacy Policy

/
/
CalculateYogi
  1. Home
  2. Math
  3. Factorial Calculator
Math

Factorial Calculator

Calculate factorial n! = n×(n-1)×...×2×1, subfactorial !n (derangements), and double factorial n!! with step-by-step solutions.

Common scenarios
Factorial Type
Did this calculator solve your problem today?

Contributor

Reviewed by

Last updated: August 2, 2026
SupportI build these free tools with love, late nights, and way too much coffee. If this calculator helped you, a small donation would mean the world to me and help keep this site running. Thank you for your kindness!

Related Calculators

You might also find these calculators useful

Permutation Calculator

Calculate permutations P(n,r) with or without repetition

Combination Calculator

Calculate combinations C(n,r) with or without repetition

Probability Calculator

Calculate probability, permutations, and combinations

Exponent Calculator

Calculate powers and exponentials: a^b, e^x, 10^x, 2^x, and nth roots

Factorial Calculator - Calculate n! and More

Calculate factorials instantly with our comprehensive calculator. Find n! (factorial), !n (subfactorial/derangements), and n!! (double factorial) with detailed step-by-step solutions. Perfect for combinatorics and probability.

What is a Factorial?

A factorial n! is the product of all positive integers up to n. For example, 5! = 5×4×3×2×1 = 120. Factorials are fundamental in combinatorics, probability, and calculus. Special variations include subfactorial !n (number of derangements) and double factorial n!! (product of integers with same parity).

Factorial Formula

How to Use This Calculator

1

2

3

4

Factorial Calculator Applications

Permutations & Combinations

Essential for calculating P(n,r) and C(n,r) formulas.

Probability Theory

Calculate arrangements and selections in probability problems.

Taylor Series

Factorials appear in denominators of Taylor/Maclaurin expansions.

Derangement Problems

Use subfactorial for 'hat check' and similar problems.

Why Use This Calculator

Three Factorial Types

Calculate standard factorial, subfactorial, and double factorial

Large Number Handling

Handles large numbers with proper formatting

Step-by-Step Work

Shows step-by-step calculations

Instant Results

Instant results for numbers up to 170

Probability Ready

Perfect for probability and statistics

Frequently Asked Questions

By definition, 0! = 1. This is not arbitrary - it's required for many mathematical formulas to work correctly, including the binomial coefficient formula C(n,0) = n!/0!n! = 1.

The subfactorial !n counts derangements - permutations where no element appears in its original position. For example, !4 = 9 means there are 9 ways to rearrange 4 items so none stays in place.

Double factorial n!! is the product of all integers from n down to 1 with step 2. So 7!! = 7×5×3×1 = 105, and 6!! = 6×4×2 = 48. It's used in physics and combinatorics.

This calculator computes factorials up to 170!, which is about 7.26 x 10^306 - the largest value before the result exceeds the range of a standard 64-bit floating point number (roughly 1.8 x 10^308). For 171! and beyond the value is displayed in scientific notation once it passes 10^15.

CalculateYogi

The most comprehensive calculator web app. Free, fast, and accurate calculators for everyone.

Calculator Categories

  • Math
  • Finance
  • Health
  • Conversion
  • Date & Time
  • Statistics
  • Science
  • Engineering
  • Business
  • Everyday
  • Construction
  • Education
  • Technology
  • Food & Cooking
  • Sports
  • Climate & Environment
  • Agriculture & Ecology
  • Social Media
  • Other

Company

  • About
  • Contact
  • Contributors

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy

© 2026 CalculateYogi. All rights reserved.

Sitemap

Made with by the AppsYogi team