Only a portion of a top CEO's pay fluctuates with a company's year-to-year performance, according to one expert.

"The market usually generates and dictates what kind of compensation packages are out there," says Mark Fagan, a managing partner of Citrin Cooperman, an accounting firm.

He says CEO compensation is based on a contractual salary, an annual bonus and long-term incentives based on stock price. Of those three components, the bonus is the only one that may fluctuate based on yearly company performance like Ebitda or net income.

Corporate profits fell 3.2% in 2015, according to the Bureau of Economic Analysis -- the first yearly drop since 2008.

The Economic Policy Institute said top CEOs earn 300 times more than their employees, and the average CEO pay in 2014 stood at $16.3 million for some of America's biggest companies.

Aside from big-time salaries, CEOs also get paid millions of dollars when they leave their jobs.

One CEO making headlines in recent weeks is Yahoo! (YHOO) CEO Marissa Mayer, who will receive $54.9 million should she face termination, per a company filing released earlier this week. The company is reportedly weighing a sale of its core Internet business. Possible buyers include Verizon Communications (VZ) - Get Report .

While some may be surprised to learn of Mayer's hefty severance package, Fagan says there's a reason for the sky-high numbers.

"The CEO needs to be comfortable to run the company," he says, adding that if the CEO doesn't have a large severance package, he or she may be reluctant to take chances. "Every year, they're going to be sitting in front of the board of directors, wondering if they're going to get fired. If there's a large payout, that CEO is going to take chances they might not have taken. Taking chances is good for business."

Mayer earned $36 million in 2015.

Yahoo!'s stock traded at roughly $16 per share when Mayer took control of the company in 2012. It currently trades near $37, but has lost 15.5% over the past year.

"You can't say that she didn't increase the value. But if you peel back the onion, (most of the reason the stock price went up) was because of a 15% investment they made in another company," he says, referring to Yahoo!'s stake in Chinese e-commerce giant Alibaba (BABA) - Get Report .