Factorial Calculator

Client-sideNo sign-upFree

Calculate n! exactly, even for large numbers, using arbitrary-precision arithmetic.

Quick facts

Category
Calculators
Best for
Calculating combinatorics or probability problems that involve factorials
10!
3,628,800
✓ Exact value, computed with arbitrary-precision arithmetic
In-content slot
Was this tool helpful?
On this page

Overview

Enter a whole number to calculate its factorial (n!) - the product of every whole number from 1 up to n. This uses JavaScript's native BigInt type for the calculation, so results stay exact even for large values where a regular floating-point number would lose precision (20! already exceeds what a standard JavaScript number can represent exactly). Useful for combinatorics problems, probability calculations, or checking schoolwork. Runs entirely client-side.

Best for: Calculating combinatorics or probability problems that involve factorials

How to use this tool

  1. Enter a whole number. Any non-negative integer, from 0 up to 5,000.
  2. Calculated with BigInt. Arbitrary-precision arithmetic keeps the result exact, no matter how large it gets.
  3. Copy the result. Grab the exact value with one click, formatted with digit-grouping commas.

Frequently asked questions

A standard JavaScript number can only represent integers exactly up to about 9 quadrillion, and factorials grow extremely fast - 20! is already over 2 quintillion. Beyond that point, regular floating-point math would silently round the result. BigInt represents integers of any size exactly, so the result stays precise no matter how large n gets.

Factorials grow so quickly that 5,000! already has over 16,000 digits - past that, the result becomes too large to display or copy usefully, even though the math itself would still be exact.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools