"Cannonball" is an alternative rock, pop rock, indie pop and grunge song that lasts for a duration of three minute and thirty-six seconds, featuring a balance of quirky pop hooks and surging power which support playful, goofball lyrics. According to the sheet music published at Musicnotes.com by EMI Music Publishing, the song is written in the time signature of common time, with a moderately fast rock tempo of 112 beats per minute. "Cannonball" is composed in the key of E-flat major (E), while Kim Deal's vocal range spans from a low of E3 to a high of B4. The song has a basic sequence that alternates between the chords of B5 and E5 during the introduction and verses and follows B5–E5–A5 at the chorus as its chord progression.