Co-written by Lewis with Novel and Tony Reyes, "Whatever It Takes" was recorded at DARP Studios and Doppler Studios, both located in Atlanta, Georgia and at Battery Studios in New York City, by Carlton Lynn. Lynn was assisted in the recording process by Lloyd Cooper (at Doppler Studios) and Tim Sturges (at Battery Studios). It was also mixed by Lynn at DARP Studios; Josh Houghkirk served as the assistant mixer. The song was produced by Novel and Dallas Austin. A variety of instrumentalists were enlisted for the production of "Whatever It Takes": Eddie Horst was the string arranger, while Kenn Wagner, Olga Shiptko, Amy Chang and William Pu performed violins, Karen Freer and Daniel Laufer provided cello and co-writer Reyes played the guitar. Stephen Lowman and Stephen Ferrera performed drums, while Novel played the keyboard. "Whatever It Takes" makes use of a choir, which consists of Tawatha Agee, Vanesse Thomas, Cindy Mizelle, Michelle Cobbs, Robin Clark, "Bibi" Straughn, Tammy Lucas, Billy Porter, Bennie Diggs and Fonzi Thornton; Thornton was enlisted as the vocal contractor. Lewis provides background vocals on the track, and the production process was overseen by Kimberly L. Smith. As she introduced the track before performing it on her debut concert tour The Labyrinth (2010), Lewis revealed that "Whatever It Takes" was the first song to be written for "Spirit".