No Good Deed” topped the box office this weekend and helped reinvigorate a floundering domestic movie business.

The Sony/Screen Gems thriller took in $24.5 million from 2,175 theaters, easily beating expectations. Going into the weekend, analysts expected the home invasion thriller to hover around $20 million. Females made up the bulk of the audience, taking up 60% of the seats in theaters, and 41% of ticket-buyers were under 30 years old.

“It’s not a full reversal of the weakness at the box office, but it’s a step in the right direction,” said Phil Contrino, vice president and chief analyst at BoxOffice.com. “It’s good to see new films enter the marketplace and do all right.”

“No Good Deed’s” success is a feather in the cap of stars Idris Elba and Taraji P. Henson, both of whom actively hawked the film on social media.

“They absolutely elevated it,” said Rory Bruer, Sony Pictures’ president of worldwide distribution. “They’re so hard working. It was a great collaboration.”

It also helps that “No Good Deed” cost a mere $13 million to produce.

“It’s going to be hugely successful for the studio,” said Bruer.

Although pitched at a different demographic, “No Good Deed’s” box office muscle may have suppressed business for the weekend’s other wide release, “Dolphin Tale 2.” The Warner Bros./Alcon Entertainment sequel put up $16.5 million across 3,656 theaters. The picture cost a modest $36 million to produce, making it a low-risk venture for its backers. However, box office prognosticators had expected the film to do $20 million of business.

“Dolphin Tale 2” could not match the $19.2 million debut of its 2011 predecessor. That film went on to make $72.3 million domestically. Harry Connick Jr., Ashley Judd, Morgan Freeman and Kris Kristofferson return, with Charles Martin Smith back at the helm.

Warner Bros. domestic distribution chief Dan Fellman noted that the first “Dolphin Tale” was in 3D, which helped goose admission prices. This film was not released in the format. The next live action family film doesn’t hit theaters until Oct. 10 with “Alexander and the Terrible, Horrible, No Good, Very Bad Day,” so Warner Bros. hopes to take advantage of the lack of competition in the coming weeks.

“We’re going to have good legs on this movie,” said Fellman. “The last movie had good legs too.”

“We have some nice running room and the picture is playing extremely well in small towns and midsize markets,” he added.

Females made up 63% of the film’s opening audience, with 44% of the initial audience clocking in under the age of 25.

“The Drop,” a Fox Searchlight thriller starring Tom Hardy and the late James Gandolfini, managed to muscle its way into sixth place despite debuting on a limited number of screens.

The adaptation of a Dennis Lehane short story racked up $4.2 million across 809 theaters. Analysts had pegged the film for a $2 million bow. Fox Searchlight will expand the film to roughly 1,000 theaters next weekend.

Gandolfini’s involvement helped the picture play beyond the standard art house crowd, argued Frank Rodriguez, senior vice president of distribution for Fox Searchlight. Fans flocked to the picture in order to see “The Sopranos” star in one of his final film performances, much in the same way that admirers of Philip Seymour Hoffman were able to make “A Most Wanted Man” a breakout hit as a way of paying tribute to the late actor.

“He’s a big part of the film,” said Rodriguez. “This film has a bit the kind of character he used to play on television with ‘The Sopranos.’ It’s in that whole milieu of the crime drama so there was a lot of interest in seeing him in another role that was similar.”

Chernin Entertainment produced “The Drop,” which premiered at the Toronto Film Festival last weekend.

Sliding in at third position, “Guardians of the Galaxy” became the first film this year to pass $300 million domestically. The Marvel film added another $8 million to its haul. Globally, its total stands at $612 million. With a debut in China still to come, that figure should continue to rise.

In its sixth week, Paramount’s “Teenage Mutant Ninja Turtles” secured fourth place, picking up $4.8 million and driving its total to $181 million stateside.

In limited release, “The Disappearance of Eleanor Rigby” debuted to $77,181 in four locations. The Weinstein Company reconfigured the marital drama starring Jessica Chastain substantially. When it debuted on the festival circuit, it was two films, one depicting the disintegration of a relationship from a woman’s perspective, the other from the man’s, but the studio is releasing a spliced together, single version.

Also hitting the art house circuit, Roadside Attractions and Lionsgate opened “The Skeleton Twins” to $410,756 on 15 screens across five cities. The comedy-drama stars Bill Hader and Kristen Wiig change-of-pace roles as two estranged twins who reunite.

The overall box office was improved over last weekend’s miserable $64.7 million in total revenue, but it could not match the year-ago period when “Insidious Chapter 2” bowed to north of $40 million. Year-to-date the domestic box office is still down more than 5 percent.