Melissa McCarthy is Hollywood's 3rd highest-paid actress—here's how she negotiated her way to the top

Before her big break, Melissa McCarthy had less than $5 in her bank account

Melissa McCarthy spent two decades struggling to break into Hollywood. After moving from her hometown in Plainfield, Illinois, to New York City at age 20, she racked up credit card debt and, at one point, couldn't withdraw cash from an ATM because her bank account balance was under $5.

But once she made a splash with the 2011 comedy "Bridesmaids," McCarthy rose quickly: In just five years, she was the third highest-paid actress in Hollywood.

"I've gotten lucky," she tells Glamour, "and I've worked hard."

She has also negotiated her way to the top. As her husband, comedian Ben Falcone, puts it, she has "fists of justice" and is relentless about getting the roles and production deals that she wants and deserves.

Actress Melissa McCarthy
Frazer Harrison | Getty Images

When approaching any negotiation in Hollywood, "I always think, 'Is the deal fair? Would you be asking the same thing of a guy in this position?'" says McCarthy. "And if the answer is 'It probably wouldn't be happening [to a guy],' I'll dig my teeth in for months."

She's also learned that you have to be willing to walk away, she tells Glamour: "As you start up the ladder in whatever field you're in, you have to walk if people won't give you what you're worth. Once people don't respect you enough to give you what you're worth, they're never going to."

As with nearly every single occupation out there, women in Hollywood still have a ways to go in the fight for equal pay.

According to Forbes, between June 1, 2016, and June 1, 2017, the world's 10 highest-paid actresses made a combined $172.5 million. The 10 highest-paid actors earned more than double that amount: $488.5 million.

Hollywood's male stars make millions more than its A-list actresses

The world's highest-paid actress, Oscar-winner Emma Stone, earned $26 million over the 12-month period. That's a sizable paycheck but it's still less than half the amount the highest-paid actor made: Action star Mark Wahlberg, who topped the men's ranking, earned $68 million.

Although some defenders of the system point out that the disparity could be chalked up to the fact that more men star in profitable action and superhero franchises, women often make less even in romantic comedies. Oscar-winner Natalie Portman, for example, says she was paid three times less than her male co-star Ashton Kutcher for the 2011 movie "No Strings Attached."

"I mean, we get paid a lot, so it's hard to complain," the star tells Marie Claire, "but the disparity is crazy."

McCarthy's advice is to keep fighting for what you're worth. She tells Glamour: "There were some jobs when I was paid what most [of my costars were]. And then people who climbed the ladder with me were suddenly making 15 times what I made. I was like, 'Wait, wait, wait.' I thought, 'This is based on bulls---. This is not based on anything factual to me.' I hated that feeling of not being in control and not being able to do anything about it. I think that feeling is what keeps the fight in me."

Like this story? Like CNBC Make It on Facebook!

Don't miss: Michelle Williams getting 1 percent of Mark Wahlberg's fee is not actually that unusual for Hollywood

Suzy Welch: This is the biggest mistake people make when negotiating salary