He wrote the song with Jacob Kasher and DJ Frank E. It was released on October 5, 2017, by Atlantic Records as the second single from Puth's second studio album, Voicenotes (2018).
[5] Chris Malone of Billboard felt the song "opens with a slinky bassline 'Attention'", featuring a catchy chorus and representing "a slight stylistic shift from the more straight forward pop sound that filled his debut album Nine Track Mind", and that Puth took "the funkier R&B-leaning direction" with "How Long".
[6] James Dinh of iHeartRadio deemed it "a fitting follow-up to 'Attention' as the 25-year-old tackles yet another vulnerable narrative from the romance department", and expected it to enter the top 10 on the Billboard Hot 100.
[8] Katrina Rees of CelebMix regarded the song as "Charlie's latest infectious offering", and wrote that it "has a slick yet fairly stripped back vibe which showcases the singer's vocal range".
On April 3, 2018, the single was certified platinum by the Recording Industry Association of America (RIAA) for sales of a million digital copies in the United States.