We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Calculate the factorial (n!) of any positive integer. Ideal for math, programming, and statistics.
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
A factorial multiplies each positive integer up to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. This calculator accepts a nonnegative integer from 0 through 5,000 and returns the complete decimal integer, its digit count, and, for some inputs, a scientific-notation summary.
The special case 0! = 1 is part of the definition: an empty product is 1. That convention also keeps factorial identities such as n! = n × (n−1)! consistent at the boundary.
n! = 1 × 2 × 3 × … × n for positive integer n
0! = 1
Full Result is the exact integer produced by the factorial multiplication. Digits counts how many decimal numerals appear in that integer; for example, 10! = 3,628,800 has 7 digits. The scientific-notation field is a compact approximation for magnitude, not a substitute for the complete value.
The scientific summary appears for inputs above 20 when the browser can represent that approximation as a finite number. It is omitted for 0! through 20!, and for sufficiently large factorials where the approximation overflows. The full result and digit count can still appear when that summary is absent.
Each step multiplies the previous factorial by the next integer: 6! = 6 × 5!. This rapid growth is why even a moderate input can produce a long answer. Factorials appear in counting arrangements: the number of ways to order n distinct objects is n!. For instance, 4 distinct items have 4! = 24 possible orders.
For selections where order does not matter, a related expression is the binomial coefficient C(n,k) = n! / (k!(n−k)!). This page calculates only a single factorial; it does not determine whether a problem calls for a permutation, combination, or probability formula.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Type a nonnegative whole number from 0 to 5,000 in the n! input. The default is 5, and the result updates when the input changes.
Use the digit count to check the size of an answer. Use Full Result when every digit matters. Use scientific notation only as a quick magnitude summary.
The digit-count copy control copies the count itself. The Full Result copy control copies the factorial integer. Reset restores the input to 5.
As a quick check, entering 0 should show 1; entering 5 should show 120; and entering 10 should show 3628800 with 7 digits.
Use cases
See how the tool fits into real work and everyday tasks.
For an exercise asking how many orders are possible for 7 distinct objects, calculate 7! = 5,040. Confirm that every object is used once and order matters before applying this result.
When checking a table or a worked solution, compare the digit count first, then compare the full integer. This can quickly expose a missing digit in a long answer.
Use small boundary values such as 0, 1, and 5 to check a factorial implementation. For large test values, copy the full result and check that the receiving editor has not reformatted it.
Q&A
Find concise answers to common questions and confusing cases.
The supported range ends at 5,000. A value above that limit does not produce a factorial result.
It reads the integer portion at the start of the input, so a value such as 5.9 is treated as 5. Negative values and inputs without a readable nonnegative integer do not produce a valid result. Enter a whole number explicitly to avoid ambiguity.
The scientific summary is calculated separately from the exact integer. If that approximate numeric representation overflows, the summary is omitted; the exact full result and digit count may still be available.
Notes
Review scope, result limitations, and important precautions before use.
Related
Discover related tools, collections, and available API capabilities.