The xkcd number is equal to \(A(G, G) = 2\uparrow^{G-2} (G+3) - 3\) or gag(G), where G is Graham's number and A is the Ackermann function.^{[1]}^{[2]} It was invented by Randall Munroe, the creator of the popular webcomic xkcd, in the third part of strip #207, which says, "[xkcd] means calling the Ackermann function with Graham's number as the arguments just to horrify mathematicians." The number was given its name by various other bloggers.

Despite the caption, the number is not terribly large, and is easily dwarfed by other numbers rising out of mathematics such as TREE(3) or SCG(13). Googologists would consider this an example of a naive extension, or a tame example of a salad number (a derogatory term for an inelegant mishmash of existing numbers and functions). Since gag grows slower than \(3 \rightarrow 3 \rightarrow n\), the xkcd number is smaller than \(g_{65}\), and is therefore not much of an improvement over Graham's number. In BEAF, it is between \(\lbrace 3,66,1,2 \rbrace\) and \(\lbrace 3,67,1,2 \rbrace\) — easily beaten by corporal.

On the xkcd forums, there is a thread titled My number is bigger! where posters compete to define the largest computable number possible.