Math · Everyday

Factorial Calculator

Calculate n! for a whole number up to 170, with the number of digits shown.

Live resultFormula shownStep-by-stepNo sign-up
Inputs

Factorial Calculator

Live
Updates as you type. Nothing leaves your browser.
ResultLive
Factorial—
Explain my calculation

Each substitution is shown so you can check the arithmetic.

Enter values to see the step-by-step working.

Factorial formula

Formula
n! = n × (n − 1) × … × 2 × 1, with 0! = 1

The live calculator applies this equation with full precision and rounds only for display.

What the variables mean

n = a non-negative integer.

Worked example

Example

5! = 5 × 4 × 3 × 2 × 1 = 120.

How to interpret the result

Factorials count arrangements of distinct items. They grow extremely quickly: 10! is already 3,628,800, and 170! is close to the largest value JavaScript can represent as a finite number.

Common mistakes

  • Rounding too early is the most common math error. Keep full precision during intermediate steps and round only the final answer. Also check the order of operations and that all quantities use the same unit.

Frequently asked questions

What formula does this calculator use?
The calculator uses n! = n × (n − 1) × … × 2 × 1, with 0! = 1. The variables and units are listed on this page, and the live result shows the substituted working.
Are the results rounded?
Yes. Intermediate calculations use full precision, and the displayed result is rounded for readability. Small differences in the last digit can appear depending on the inputs.
Is this calculator free to use?
Yes. FormulasWorld calculators are free, require no account, and run in your browser. The formula and method are shown so you can verify the result independently.
Sources and standards

The formula, classification ranges and assumptions on this page follow the definitions and guidance of the bodies below.

How these are used: sources and standards.

Reviewed November 2026 · This tool is for education and estimation. See the disclaimer and methodology.

FormulasWorld

Need the theory behind factorial?

Read the formula entry for the derivation, units and related equations.