There is no shortage of headlines about CEOs getting paid seriously big money. Last week, for instance, it was revealed that Microsoft CEO Satya Nadella got a 66% raise, bringing his total compensation to nearly $43 million. And this summer Abigail Disney, an heir to the Disney fortune, publicly criticized CEO Bob Iger’s $66 million pay package, which is more than 1,000 times the median pay of Disney employees.

While many CEOs are not as generously compensated as Nadella and Iger, they do pretty well.

In 2018, the median total compensation for S&P 500 CEOs rose 4% to $12.3 million, according to the latest figures from the Conference Board. CEOs at the high end of that group were paid more than $22 million, while those at the low end were paid roughly $6 million.

But why do they make so much? And why might one CEO make millions more than another?

One major consideration that goes into how much a CEO should be paid is what other companies are paying. Compensation committees benchmark CEO pay against a self-selected peer group – often 12 to 20 companies that may be of similar size and complexity, and have similar business models, according to Robin Ferracone, CEO of Farient Advisors, an executive compensation consulting firm.

Boards will also consider whether a candidate would be a first-time CEO, who will typically be paid at the lower end of the scale.

If the chosen candidate is forfeiting still-unvested stock awards at her current employer, the board may offer a one-time “make-whole” pay award to compensate for that loss on top of her normal compensation.

That’s partly why internal candidates are usually less expensive than outsiders. “You’re starting them out at the low end of the market range. It’s a big step up for them but fairly priced for someone with no CEO experience,” Ferracone said. “And you don’t have the make-whole pay awards. They’re already at the company. They’re not walking away.”

Plus, boards looking outside for a CEO will want a proven commodity and that will cost them more because an experienced CEO will want to be paid above the average, said David Swinford, CEO of executive compensation consulting firm Pearl Meyer.

Tying pay to performance

CEO compensation packages typically include a base salary, a bonus plan, two types of long-term incentives, plus perks and benefits, Ferracone said.

With investors demanding that pay be tied more closely to performance, an increasing share of CEO compensation is in company stock, especially in bonuses and long-term incentive plans. For the first time last year, stock awards accounted for more than 50% of S&P 500 CEOs’ total median compensation, the Conference Board found.

In the case of Microsoft (MSFT)’s Nadella, the majority of his $43 million pay package comes from stock awards. The same was true for Disney (DIS)’s Iger. Similarly, last year nearly $37 million of the $50 million pay package that now former 21st Century Fox CEO James Murdoch received was in stock awards, according to the Conference Board.

But stock awards have strings attached. Payment typically depends on whether a CEO hits certain targets, which are primarily financial – for instance, an earnings target or a return on capital investment. There may be some non-financial targets, too, such as increasing diversity among the ranks or reaching certain safety goals. For example, Chuck Jones, who has been CEO of the utility company First Energy since 2015, has to meet safety and diversity goals to receive his full bonus potential, Ferracone said.

Stock awards come in several flavors, including restricted stocks and performance shares. Each have their own set of rules and vesting schedules and each differ in how directly they’re tied to performance.

Say a board wants to award the CEO $100,000 in stock-based compensation and the company’s stock is trading at $100 a share. The executive may get 1,000 shares of restricted stock, a third of which will vest each year for three years. If the company – and by extension its stock price – do well under the CEO, his pay from that award will be greater than $100,000.

If instead the CEO is awarded 1,000 performance shares, he will need to meet a given target over time – for instance, an average return on investment over the next three years — to get the full payout. If only part of the target is met, he may get a partial payout, Swinford said.

In either case, the $100,000 is what gets counted as part of the CEO’s compensation the year it’s awarded, even though he may end up getting much more or less depending on where the share price is when the award vests. So a CEO’s published compensation number for a given year often is not a true reflection of what he takes home that year or what he’ll eventually be paid.

Are CEOs paid too much?

Most big public companies are now required to provide shareholders with a vote on CEO compensation under the SEC’s Say-on-Pay rule. The vote results are not binding, so don’t require the board to take action. But they do let boards know how shareholders feel about the issue. The rule has only been in effect for 8 years. But so far this year, investors have rejected only 2.5% of pay package proposals, and the rate was similarly low last year, according to David Kokell, director of US compensation research for Institutional Shareholder Services.

Since the Say-on-Pay rule went into effect, CEO pay has actually risen. Still, Kokell said, “[the rule] has likely slowed the growth of pay. And it certainly has had a dramatic impact on the composition of top executive pay – resulting in widescale shifts to performance-conditioned pay opportunities.”

Even with that shift, though, it still can be hard to decipher just how well CEO pay is aligned with performance and shareholder value. CEO compensation packages have so many moving parts that pay out over time. And different corporate actions, such as stock buybacks, or the use of different accounting methods, can change the very targets that CEOs are supposed to hit under their pay incentive plans.

Ferracone notes that attractive CEO candidates will be doing pay comparisons of their own before accepting a position. “It’s a competitive market. CEOs will work for the company that pays them fairly for the job they’re doing. They’re no different than anyone else in that regard.”

And when boards increase CEO pay at some companies, that can drive other companies to pay more because their peer group norms go up.

Sky-high compensation packages often drive critics to ask: Are CEOs really worth all the money they’re paid?

“Don’t confuse pay with what people are worth. No human being is worth $20 million, but many executives cost $20 million,” said Swinford.