Both new films exceeded expectations, pumping some much-needed life into a lackluster summer at U.S. and Canadian theaters.
"Dawn of the Planet of the Apes," which topped the box office the past two weekends, finished third with $16.4 million.
"Lucy," directed by French action film specialist Luc Besson, stars Johansson as a woman who can stop traffic and move objects with her mind after a drug planted in her body causes her brain to operate at abnormally high levels. The special effects-laden film was made for a relatively inexpensive $40 million, according to the movie site Box Office Mojo.
Nikki Rocco, president for domestic distribution at Universal Pictures, the Comcast Corp unit that released the film, said the studio had maintained high hopes for the "R-rated original concept female-driven action movie."
Broad interest from ticket buyers showed the film provided "a different side to an action film," Rocco added.
Made for a brawny $100 million, "Hercules," starring Dwayne "The Rock" Johnson in the title role, got mixed reviews, though nearly two-thirds of critics on the site Rotten Tomatoes gave it a "fresh" rating.
Megan Colligan, head of domestic marketing and distribution at Viacom's Paramount Pictures which jointly released the film with MGM, credited Johnson's "charisma" with helping drive the opening, which exceeded predictions by several million.
"It's exactly what we had hoped for," she said of the total.
"Hercules" is the year's second film featuring the legendary muscle man. "The Legend of Hercules" opened in January and generated a paltry $18.8 million, according to Box Office Mojo.
While the new film and "Lucy" both beat opening weekend industry predictions, Hollywood continues to be in a funk.
With few of the hugely successful films that usually propel viewing, this summer's box office is some 20 percent behind last year with $2.93 billion in ticket sales, versus $3.67 billion in 2013, which ended as a record summer according to Rentrak.
Universal Pictures' low-budget horror film "The Purge: Anarchy" was fourth with $9.9 million in sales and has totaled an impressive $51.3 million through its first two weekends. Walt Disney Co's animated sequel "Planes: Fire and Rescue" landed in the No. 5 slot, grossing $9.3 million.
The 20th Century Fox studio, a unit of Twenty-First Century Fox, released "Dawn of the Planet of the Apes."