Being a star means making a fortune, and the biggest celebrities in the world all know how to make a pretty penny. Be it on the small screen, in a major blockbuster movie, or with an endorsement deal, stars cash in whenever they can.

Mark Wahlberg is no stranger to making millions, and he's done so in a variety of ways. Years back, he starred in a major franchise film that net him tens of millions. That film, however, lost a ton of money.

Let's look back and see what happened.

Mark Wahlberg Is A Major Movie Star

Since bursting onto the scene in the 1990s, Mark Wahlberg has been one of the most interesting stars in Hollywood. Everyone's journey is unique, but the road that Wahlberg took the superstardom is genuinely interesting, especially compared to a number of his peers.

Initially, Wahlberg broke out as a rapper and as a model. This was made a bit easier thanks to his brother, Donnie, being in New Kids on the Block during that time. Nevertheless, once the public got a glimpse of Mark Wahlberg, they wanted more

After finding success in music and modeling, Wahlberg set his sights on acting, much like his brother. The former rapper was not an instant success, but he began landing some solid movies in the '90s, including The Basketball Diaries and Fear. 1997's Boogie Nights was the film that proved he could act and lead a movie to success, and suddenly, the man was everywhere.

Since Boogie Nights, Mark Wahlberg has been featured in countless hit films, and he has also managed to turn in a number of successful television shows while serving as producer.

The man's a hit, and he has the bank account to prove it.

Related: Mark Wahlberg Drank Straight Olive Oil To Prep For A Role

He's Worth $400 Million

According to Celebrity Net Worth, Mark Wahlberg is currently worth a whopping $400 million. This is an incredible amount of wealth for one actor to earn, and it is something that Wahlberg has been chipping away at for over 30 years.

The site talked about how much Wahlberg can charge for a film, but it notes that he usually makes plays to earn more after the box office gross comes in.

"As an actor, he can easily command $10 million to appear in a film, but typically accepts lower salaries in exchange for shares of the backend gross," the site writes.

The actor's wealth is also boosted by a number of investments and endorsements that he has taken part in throughout the years.

His burger chain, Wahlburgers, for instance, is a major financial success, and the site notes that "there are 49 Wahlburger locations around the world. The company reportedly generates over $100 million in annual revenue."

When dishing on his endorsements, the site highlighted his deal with ATT&T, noting that Wahlberg "signed a deal with AT&T in March 2017 reportedly for $10 million to be their spokesman."

The man makes bank, even when things don't go so well for the side making the investment. This was apparent when he netted millions for a movie that lost a bunch of money.

Related: Fans Noticed Mark Wahlberg Was Completely Intoxicated During This Awkward Live TV Interview

'Transformers: The Last Knight' Lost Money, But Wahlberg Made Bank

Transformers: The Last Knight was a movie that had a ton of box office potential, and while the overall box office gross looks pretty good, the truth is that the movie lost a ton of money after it hit theaters.

According to Flickering Myth, The Last Knight "apparently made a loss of $100 million for the studio; budgeted at $217 million (plus a marketing budget presumably in excess of $100 million), the fifth installment in the main series grossed $605 million worldwide, although $228.8 million of that sum came from China where studios only receive around a 25% cut of ticket sales. Add in the likely back-end deals for Michael Bay and Mark Wahlberg, and it’s easy to see where that $100 million figure comes from."

Speaking of Wahlberg and his back-end deal, it has been estimated that the star was able to pull down nearly $60 million for taking part in the movie. Reports vary, but clearly, he was able to make tens of millions of dollars for a movie that wound up being a loss for the studio behind it.

Overall, The Last Knight was Wahlberg's final Transformers film, and the franchise shifted to the Bumblebee movie, which was successful enough to generate a sequel with the Beast Wars storyline.

Related: Did Mark Wahlberg Actually Sing In This Box Office Disaster?

While Transformers: The Last Knight lost the studio money, we're sure that Mark Wahlberg slept soundly after making a fortune.

Next: Mark Wahlberg Had To Eat 10-Meals Per Day While Prepping For This Film