Written in the key of G major, "Hot n Cold" is a pop and dance-pop song which utilizes guitars and synthesizers. It has a length of three minutes and forty seconds (3:40), and runs at a moderately fast tempo of 132 beats per minute.