Factorial Calculator

Compute factorials (n!) up to 170 with nCr combinations and nPr permutations. Free combinatorics, probability and algebra calculator with a growth chart.

Calculate factorials

About This Calculator

The factorial of a non-negative integer n, denoted n!, is the product of all positive integers from 1 to n. Factorials are fundamental to combinatorics, probability, and algebra. They are used extensively in permutations (nPr), combinations (nCr), binomial theorem expansions, Taylor series, and statistical distributions including the Poisson and binomial distributions.

This calculator computes the factorial of any integer from 0 to 170 using direct multiplication. Beyond 170, the result exceeds the maximum representable 64-bit floating-point value. It also optionally computes combinations nCr = n! / (r! (n-r)!) and permutations nPr = n! / (n-r)!, making it a complete toolkit for combinatorial mathematics.

The factorial growth chart visualizes how rapidly factorial values increase -- n! grows faster than exponential functions and is used in algorithm analysis to describe the complexity of brute-force search over permutations.

Frequently Asked Questions

What is a factorial?

A factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120. Factorials are defined for non-negative integers, with 0! defined as 1 by convention.

What is the difference between nCr and nPr?

nCr (combinations) counts ways to choose r items from n where order does not matter. nPr (permutations) counts ways to choose and arrange r items from n where order matters. For example, picking a committee uses nCr while assigning roles uses nPr.

What is the largest factorial this calculator can compute?

This calculator supports numbers up to 170. 170! is approximately 7.26 x 10^306, which is very close to the maximum value representable by a 64-bit floating-point number (about 1.79 x 10^308). Values beyond 170 overflow to Infinity.

How is factorial used in combinatorics?

Factorials are fundamental to combinatorics. They are used to calculate permutations (nPr = n! / (n-r)!), combinations (nCr = n! / (r! (n-r)!)), and count arrangements of items. Factorials also appear in probability distributions like the binomial and Poisson distributions.

What are real-world applications of factorials?

Factorials appear in probability calculations (lottery odds, poker hands), combinatorics (arranging books on a shelf, seating arrangements), calculus (Taylor series expansions), computer science (algorithm complexity analysis), and statistics (permutation tests).

How do you calculate nCr on a calculator?

To calculate nCr on this calculator, enter n (the total number of items) and r (the number to choose), then click Calculate. The result, C(n,r), will display alongside n! and nPr. For example, C(10,3) = 120, meaning there are 120 ways to choose 3 items from 10.

Why is 0! defined as 1?

0! is defined as 1 by convention because there is exactly one way to arrange zero items (the empty arrangement). This definition also makes combinatorial formulas work correctly: nCr = 1 when r = 0 or r = n, and it maintains consistency with the gamma function extension.

Is this factorial calculator free to use?

Yes, all calculators on Calculy are completely free to use. There are no hidden fees, subscriptions, or limits on the number of calculations you can perform.