Fatorial

Last updated: 2026-08-24

Fatorial — Calcule o fatorial de um inteiro.
Inputs
Result
Enter values and press Calculate

How to use it

  1. Calculate 7!
  2. Multiply: 7 × 6 × 5 × 4 × 3 × 2 × 1
  3. Step by step: 7×6=42, 42×5=210, 210×4=840
  4. Continue: 840×3=2520, 2520×2=5040, 5040×1=5040

Common mistakes

  • ⚠️ Forgetting that 0! = 1 by definition
  • ⚠️ Trying to calculate factorial of negative numbers
  • ⚠️ Integer overflow for large n values (>170)

Worked example

Calculate the factorial of 7.

The factorial {fact} is the product of all positive integers from 1 to n.

Input guide

FieldTypical range
nNumber: 0 to 170 (larger values overflow)