Calculadora de Fatorial
Calcule n! para qualquer inteiro não negativo — na hora
Factorial Calculator
Calculate n! for any non-negative integer
Compute the factorial of a number (n!)
n! = n x (n-1) x (n-2) x ... x 2 x 1What is a Factorial Calculator?
A Factorial Calculator is a math tool that computes the factorial of a number, written as n! (pronounced "n factorial"). The factorial operation multiplies a whole number by every whole number below it down to 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120.
Factorials are extremely common in probability, statistics, algebra, and combinatorics. They help answer questions like "How many ways can I arrange these items?" or "How many different combinations are possible?" That's why factorials appear in formulas for permutations (arrangements) and combinations (selections).
Because factorial values grow very fast (even 20! is already a huge number), a calculator is the easiest way to get accurate results instantly without manual multiplication errors.
How to Use This Factorial Calculator
- Enter a number (n) -- Typically a non-negative whole number (0, 1, 2, 3, ...)
- Click "Calculate" -- The calculator computes n!
- Review the result -- The output is the factorial value
- Try other values -- Factorials grow quickly, so test small and large numbers to see the pattern
Tips:
- 0! equals 1 (this is a standard math rule)
- Factorials are usually defined for whole numbers. If you enter a negative number, it's typically invalid
- Large factorials may be displayed with commas or in scientific notation depending on the page formatting
Formulas
Factorial Definition (for non-negative integers)
n! = n × (n − 1) × (n − 2) × … × 3 × 2 × 1
1! = 1
2! = 2 × 1 = 2
3! = 3 × 2 × 1 = 6
Special Case
Rule: 0! = 1
This is defined by convention to keep formulas consistent
Recursive Form
Rule: n! = n × (n − 1)! for n ≥ 1
Example: 6! = 6 × 5!
Where Factorials Are Commonly Used
- Permutations: nPr = n! / (n − r)!
- Combinations: nCr = n! / (r! × (n − r)!)
Example Calculations
Example 1: Compute 5!
Calculation: 5 × 4 × 3 × 2 × 1 = 20 × 3 × 2 × 1 = 60 × 2 × 1 = 120
Result: 120
Example 2: Compute 0!
Rule: By definition, 0! = 1
Result: 1
Example 3: Compute 8!
Calculation: 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320
Result: 40,320
Example 4: Use factorials to compute a combination (10 choose 3)
Formula: 10C3 = 10! / (3! × 7!)
Calculation: (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120
Result: 120 ways
Frequently Asked Questions
What does "n!" mean?
"n!" means factorial. It's the product of all whole numbers from n down to 1. For example, 4! = 4 × 3 × 2 × 1 = 24.
Why is 0! equal to 1?
It's defined that way to keep math formulas consistent—especially in combinations and permutations. For example, the formula for combinations would break in common edge cases if 0! were not equal to 1.
Can I calculate the factorial of a negative number?
Factorials are not defined for negative integers in standard arithmetic. Most factorial calculators will reject negative inputs or return an error.
Why do factorial numbers get so large so quickly?
Factorials grow by repeated multiplication. Each step multiplies by a larger number (e.g., 10! is 10 times bigger than 9!). That rapid growth is why factorials become huge even for moderately sized inputs.
What's the difference between permutations and combinations?
Permutations count arrangements where order matters (ABC is different from ACB). Combinations count selections where order does not matter (ABC is the same group as ACB). Both formulas rely on factorials.
Want to add this factorial calculator to your website? Get a custom embed code that matches your site's design and keeps visitors engaged.
O que é um fatorial?
O fatorial de um inteiro não negativo n, escrito n!, é o produto de todos os inteiros positivos de 1 até n. Por exemplo, 5! = 5 × 4 × 3 × 2 × 1 = 120. Os fatoriais aparecem em problemas de contagem, probabilidade, combinatória (combinações e permutações), cálculo (séries de Taylor) e no teorema binomial. Se você já se perguntou de quantas formas pode organizar um conjunto de objetos, a resposta quase certamente envolve um fatorial.
Os fatoriais crescem de forma astronômica — 20! = 2.432.902.008.176.640.000. Mesmo entradas modestas produzem números enormes, por isso calculá-los com precisão exige cuidado. Esta calculadora lida com inteiros grandes com exatidão, mostrando valores exatos para entradas práticas e aproximações bem arredondadas (usando a fórmula de Stirling) para valores de n muito grandes, onde o cálculo exato se torna impraticável.
Como usar a calculadora de fatorial
- Digite qualquer inteiro não negativo n no campo de entrada.
- Clique em Calcular (ou pressione Enter) para obter o resultado.
- Leia o valor exato do fatorial exibido abaixo do campo.
- Use o resultado na fórmula de permutações P(n,r) = n! / (n−r)! ou na de combinações C(n,r) = n! / (r! × (n−r)!) conforme necessário.
Fórmula do fatorial e tabela de referência
Definição: n! = n × (n−1) × (n−2) × ... × 2 × 1
Recursiva: n! = n × (n−1)!, com 0! = 1
Casos especiais:
0! = 1 (por definição)
1! = 1
2! = 2
5! = 120
10! = 3.628.800
20! = 2.432.902.008.176.640.000
Combinações: C(n,r) = n! / (r! × (n−r)!)
Permutações: P(n,r) = n! / (n−r)!0! = 1 é uma convenção que faz as fórmulas de combinações e permutações funcionarem corretamente nos casos limite — por exemplo, ao escolher 0 elementos de n ou ao escolher todos os n elementos. Sem essa convenção, as fórmulas falhariam nos seus limites.
Exemplos resolvidos
6! = 720 — Organizar 6 pessoas em uma fila
Se você precisa sentar 6 pessoas em 6 cadeiras em fila, o número de arranjos distintos é 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720. Cada posição tem uma opção a menos que a anterior, então o produto se reduz até chegar a 1.
C(10, 3) = 120 — Escolher 3 de 10
Para saber de quantas formas você pode escolher um comitê de 3 pessoas de um grupo de 10, use C(10, 3) = 10! / (3! × 7!) = 3.628.800 / (6 × 5.040) = 120. A ordem não importa nas combinações.
15! = 1.307.674.368.000
15! = 1.307.674.368.000 — mais de 1,3 trilhão. Isso ilustra o quão rapidamente os fatoriais crescem. Um sistema de senhas com 15 caracteres únicos tem mais de um trilhão de ordenações possíveis, tornando ataques de força bruta computacionalmente caros.