The chemical formula of guanine is C5H5N5O. It is one of the four nucleobases found in DNA and RNA, and it pairs with cytosine. Guanine is also an essential component of guanosine triphosphate (GTP) and guanosine monophosphate (GMP), which are involved in various cellular processes.