This past weekend, "Wonder Woman" surpassed "Guardians of the Galaxy Vol. 2" as the highest-grossing movie of the summer in the U.S. With a weak August slate and no current release that can catch up, "Wonder Woman," whose domestic gross hit $390.6 million as of Tuesday, July 25, ultimately will be the summer's biggest movie.

But will it be the most profitable? All sorts of different factors, such as productions budgets, marketing costs and ancillary revenue, have to be considered when answering that question. Though several pieces of the equation are either unavailable or to be determined, there is still enough evidence to ascertain which summer release will reap the largest profit for its studio.

That film is unlikely to be "Wonder Woman," despite its status as the summer's top-grosser. The DC film from Time Warner Inc.'s (TWX) Warner Bros. carries a $149 million production budget and a marketing cost that was likely almost as expensive. The studio usually only gets about half of a film's box office revenue in the U.S. (with exhibitors keeping the other half), and the share of the pie can be even smaller in territories overseas. (In China, for example, studios only get a quarter of box office revenue.) That means that Warner Bros. has probably made $350 million to $400 million from the $781.2 million global gross of "Wonder Woman."

Image placeholder title

Because the movie likely cost around $300 million to make and market, only a fraction of that revenue counts as profit. The film's global box office tally is still climbing, though, and "Wonder Woman" seems primed to do better than "Suicide Squad" and "Batman v Superman: Dawn of Justice" on home entertainment and TV because of its glowing reception. Assuming the film has similar costs to those DC films for residuals, participations and so on, "Wonder Woman" ultimately could make $200 million to $225 million for Warner Bros., an outstanding result.

But still, not the summer's most profitable movie. How about Walt Disney Co.'s (DIS) - Get Report "Guardians of the Galaxy Vol. 2," which boasts a higher global gross than "Wonder Woman"? The Marvel film has made $860.2 million to date, albeit off a hefty $200 million budget. The sequel still has only out-grossed its predecessor by less than $100 million, and the first "Guardians of the Galaxy" made a profit of $204.2 million. With a production budget that was $30 million more expensive and likely heftier costs across the board, it seems doubtful that the sequel will do much better than that.

Image placeholder title

Maybe another Marvel property, then? Sony Corp.'s (SNE) - Get Report "Spider-Man: Homecoming" kept up the superhero hot streak when it opened to $117 million at the beginning of the month, and it has already shot past $500 million worldwide (with much more to come). The film, however, was not cheap to make, as "Homecoming" carries a $175 million production budget. And even though the new iteration of Spider-Man was introduced to millions via Disney's "Captain America: Civil War," Sony still had to market this film around the world, likely to the tune of more than $100 million.

Image placeholder title

Additionally, Sony will not get to keep all revenue from the movie -- under a deal from 2011, Disney has merchandising rights to the Spider-Man property. All of this means "Spider-Man: Homecoming" will probably not be the most profitable film of the summer either.

No, the most profitable film of the summer cost much less than these movies while still landing in the $700 million to $800 million in sales ballpark. The studio that released this movie also was responsible for last summer's most profitable film, "The Secret Life of Pets." Yes, the movie that should give its studio the best cash-on-cash return is "Despicable Me 3," which hails from Comcast Corp. (CMCSA) - Get Report and Universal Studios' Illumination Entertainment. 

The sequel has grossed $737.7 million worldwide so far, or nearly 10 times its $80 million production budget. Illumination always keeps its movies cheap -- last year's "The Secret Life of Pets" only cost $75 million, and its $875.5 million global gross was able to earn Comcast $374.7 million. "Despicable Me 3" probably will surpass the worldwide box office tally of "The Secret Life of Pets," thanks to a knockout performance from China (it is already the fourth-biggest animated film in the Middle Kingdom through two weeks of play) and plenty of box office potential left in North America as well.

Image placeholder title

"Despicable Me 3" should additionally earn at least $150 million on home entertainment (all of Illumination's recent films have), and its total costs probably won't exceed $400 million, based on the studio's recent history. That means that at the end of the day "Despicable Me 3" will earn Comcast more than $300 million, as animation continues to be a juggernaut for NBCUniversal.

More of What's Trending on TheStreet: