Sandra Bullock and Melissa McCarthy brought ‘‘The Heat’’ against Channing Tatum and Jamie Foxx at the box office. The Fox action-comedy starring the funny ladies as mismatched detectives in Boston earned $40 million and second place in its opening weekend, topping the $25.7 million debut haul of Sony’s ‘‘White House Down,’’ according to studio estimates Sunday.
The Disney-Pixar animated prequel ‘‘Monsters University’’ remained box-office winner in its second weekend, earning $46.1 million in first place.
As for ‘‘The Heat,’’ which filmed around Boston last year, employing two female leads to buck the male-dominated buddy-cop formula paid off in ticket sales.
‘‘I think the fact that we have a female-centric movie standing out in a forest of giant tent-pole movies is phenomenal,’’ said Chris Aronson, Fox’s president of domestic distribution. ‘‘Audiences really responded. We positioned this to be a female event movie, and we got the opening that we were hoping for this weekend.’’
‘‘White House Down,’’ which features Tatum as a wannabe Secret Service agent and Foxx as the president of the United States, finished below expectations in fourth place. The film’s White House takeover plot is strikingly similar to FilmDistrict’s ‘‘Olympus Has Fallen,’’ which opened in March and starred Gerard Butler and Aaron Eckhart.
Meanwhile, Paramount’s globe-trotting zombie thriller ‘‘World War Z’’ starring Brad Pitt took another bite out of the box office in its second weekend with $29.8 million.
‘‘I think the variety of films is what brought people out to the movie theaters,’’ said Paul Dergarabedian, an analyst for box-office tracker Hollywood.com. ‘‘There’s a G-rated movie at the top of the chart and an R-rated movie in second place. That says a lot about the summer marketplace and how a unique slate of films can propel the box office.’’
Overall, Dergarabedian said revenue and attendance are now both down just 2 percent over last year, and this weekend’s films grossed 8.5 percent less than last year when Universal’s ‘‘Ted’’ opened with $54.4 million at the box office. He said those numbers could shift further next week when Disney’s ‘‘The Lone Ranger’’ and Universal’s ‘‘Despicable Me 2’’ debut.