Factorial Calculator

Enter any integer from 0 to 170 to get the exact value, number of digits, scientific notation, and Stirling approximation. Integers from 0 to 170.

Try: 0 · 5 · 10 · 20 · 52 · 100 · 170

Integers from 0 to 170 (171! overflows IEEE 754 double).

Factorial table: 0! to 170!

Exact values for 0!–20!, scientific notation for 21!–170!. Each row multiplies the previous factorial by n.

n n! Digits
0 1 1
1 1 1
2 2 1
3 6 1
4 24 2
5 120 3
6 720 3
7 5,040 4
8 40,320 5
9 362,880 6
10 3,628,800 7
11 39,916,800 8
12 479,001,600 9
13 6,227,020,800 10
14 87,178,291,200 11
15 1,307,674,368,000 13
16 20,922,789,888,000 14
17 355,687,428,096,000 15
18 6,402,373,705,728,000 16
19 121,645,100,408,832,000 18
20 2,432,902,008,176,640,000 19
Show 21! – 170!
n n! Digits
21 5.1090942 × 1019 20
22 1.1240007 × 1021 22
23 2.5852016 × 1022 23
24 6.2044840 × 1023 24
25 1.5511210 × 1025 26
26 4.0329146 × 1026 27
27 1.0888869 × 1028 29
28 3.0488834 × 1029 30
29 8.8417619 × 1030 31
30 2.6525285 × 1032 33
31 8.2228386 × 1033 34
32 2.6313083 × 1035 36
33 8.6833176 × 1036 37
34 2.9523279 × 1038 39
35 1.0333147 × 1040 41
36 3.7199332 × 1041 42
37 1.3763753 × 1043 44
38 5.2302261 × 1044 45
39 2.0397882 × 1046 47
40 8.1591528 × 1047 48
41 3.3452526 × 1049 50
42 1.4050061 × 1051 52
43 6.0415263 × 1052 53
44 2.6582715 × 1054 55
45 1.1962222 × 1056 57
46 5.5026221 × 1057 58
47 2.5862324 × 1059 60
48 1.2413915 × 1061 62
49 6.0828186 × 1062 63
50 3.0414093 × 1064 65
51 1.5511187 × 1066 67
52 8.0658175 × 1067 68
53 4.2748832 × 1069 70
54 2.3084369 × 1071 72
55 1.2696403 × 1073 74
56 7.1099858 × 1074 75
57 4.0526919 × 1076 77
58 2.3505613 × 1078 79
59 1.3868311 × 1080 81
60 8.3209871 × 1081 82
61 5.0758021 × 1083 84
62 3.1469973 × 1085 86
63 1.9826083 × 1087 88
64 1.2688693 × 1089 90
65 8.2476505 × 1090 91
66 5.4434493 × 1092 93
67 3.6471110 × 1094 95
68 2.4800355 × 1096 97
69 1.7112245 × 1098 99
70 1.1978571 × 10100 101
71 8.5047858 × 10101 102
72 6.1234458 × 10103 104
73 4.4701154 × 10105 106
74 3.3078854 × 10107 108
75 2.4809140 × 10109 110
76 1.8854947 × 10111 112
77 1.4518309 × 10113 114
78 1.1324281 × 10115 116
79 8.9461821 × 10116 117
80 7.1569457 × 10118 119
81 5.7971260 × 10120 121
82 4.7536433 × 10122 123
83 3.9455239 × 10124 125
84 3.3142401 × 10126 127
85 2.8171041 × 10128 129
86 2.4227095 × 10130 131
87 2.1077572 × 10132 133
88 1.8548264 × 10134 135
89 1.6507955 × 10136 137
90 1.4857159 × 10138 139
91 1.3520015 × 10140 141
92 1.2438414 × 10142 143
93 1.1567725 × 10144 145
94 1.0873661 × 10146 147
95 1.0329978 × 10148 149
96 9.9167793 × 10149 150
97 9.6192759 × 10151 152
98 9.4268904 × 10153 154
99 9.3326215 × 10155 156
100 9.3326215 × 10157 158
101 9.4259477 × 10159 160
102 9.6144667 × 10161 162
103 9.9029007 × 10163 164
104 1.0299016 × 10166 167
105 1.0813967 × 10168 169
106 1.1462805 × 10170 171
107 1.2265202 × 10172 173
108 1.3246418 × 10174 175
109 1.4438595 × 10176 177
110 1.5882455 × 10178 179
111 1.7629525 × 10180 181
112 1.9745068 × 10182 183
113 2.2311927 × 10184 185
114 2.5435597 × 10186 187
115 2.9250936 × 10188 189
116 3.3931086 × 10190 191
117 3.9699371 × 10192 193
118 4.6845258 × 10194 195
119 5.5745857 × 10196 197
120 6.6895029 × 10198 199
121 8.0942985 × 10200 201
122 9.8750442 × 10202 203
123 1.2146304 × 10205 206
124 1.5061417 × 10207 208
125 1.8826771 × 10209 210
126 2.3721732 × 10211 212
127 3.0126600 × 10213 214
128 3.8562048 × 10215 216
129 4.9745042 × 10217 218
130 6.4668554 × 10219 220
131 8.4715806 × 10221 222
132 1.1182486 × 10224 225
133 1.4872707 × 10226 227
134 1.9929427 × 10228 229
135 2.6904727 × 10230 231
136 3.6590428 × 10232 233
137 5.0128887 × 10234 235
138 6.9177864 × 10236 237
139 9.6157231 × 10238 239
140 1.3462012 × 10241 242
141 1.8981437 × 10243 244
142 2.6953641 × 10245 246
143 3.8543707 × 10247 248
144 5.5502938 × 10249 250
145 8.0479260 × 10251 252
146 1.1749972 × 10254 255
147 1.7272458 × 10256 257
148 2.5563239 × 10258 259
149 3.8089226 × 10260 261
150 5.7133839 × 10262 263
151 8.6272097 × 10264 265
152 1.3113358 × 10267 268
153 2.0063439 × 10269 270
154 3.0897696 × 10271 272
155 4.7891429 × 10273 274
156 7.4710629 × 10275 276
157 1.1729568 × 10278 279
158 1.8532718 × 10280 281
159 2.9467022 × 10282 283
160 4.7147236 × 10284 285
161 7.5907050 × 10286 287
162 1.2296942 × 10289 290
163 2.0044015 × 10291 292
164 3.2872185 × 10293 294
165 5.4239106 × 10295 296
166 9.0036917 × 10297 298
167 1.5036165 × 10300 301
168 2.5260757 × 10302 303
169 4.2690680 × 10304 305
170 7.2574156 × 10306 307

About factorials

What is a factorial?

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By convention, 0! = 1 (the empty product).

How fast do factorials grow?

Factorials grow faster than any exponential function. While 2ⁿ doubles at each step, n! multiplies by n — an ever-increasing factor. By n = 100, we already have 100! ≈ 9.33 × 10157, and 170! reaches about 7.26 × 10306.

What is Stirling's approximation?

Stirling's formula provides a practical way to estimate large factorials: n! ≈ √(2πn) · (n/e)ⁿ. The relative error is already below 1% for n = 10 and below 0.1% for n = 100. It is widely used in combinatorics, statistical mechanics, and information theory.

Factorials in combinatorics

Factorials count permutations: n! is the number of ways to arrange n distinct objects in a row. They also appear in combinations C(n,k) = n! / (k!(n−k)!), in Taylor series (the n-th term is divided by n!), and in the Gamma function: Γ(n+1) = n!.

Why does 171! overflow?

IEEE 754 double-precision floats can represent values up to ≈ 1.8 × 10308. Since 170! ≈ 7.26 × 10306 is within range but 171! ≈ 1.24 × 10309 is not, 171! evaluates to Infinity in most languages using native floats.

Frequently asked questions

0! = 1 by convention. This follows from the definition of the empty product: the product of no numbers is the multiplicative identity, 1. It also ensures that C(n,0) = n!/(0!·n!) = 1 remains consistent for all n.
100! has exactly 158 digits. This is computed as ⌊log₁₀(100!)⌋ + 1 = ⌊∑ log₁₀(k) for k=1 to 100⌋ + 1 = 157 + 1 = 158.
Exactly 52! ≈ 8.07 × 1067 ways. This number is so astronomically large that every shuffle performed in all of human history is almost certainly unique.
This tool computes exact integer values up to 170! — the largest factorial that fits in an IEEE 754 double. 170! has 307 digits.
The digit count is ⌊log₁₀(n!)⌋ + 1. By logarithm properties, log₁₀(n!) = ∑ log₁₀(k) for k=1 to n. This is computable in O(n) without big-integer arithmetic.
The Gamma function Γ(z) generalises factorials to complex numbers: Γ(n+1) = n! for any non-negative integer n. Γ(1/2) = √π, and Γ(3/2) = √π/2.


Send your feedback