Tim Cook, chief executive officer of Apple Inc., center, speaks while U.S. President Donald Trump, right, listen during an American Workforce Policy Advisory board meeting in the State Dining Room of the White House in Washington, D.C.

Apple CEO Tim Cook's total pay decreased last year as the company failed to exceed its financial targets by as much as it did in 2018. But he still pulled in over $125 million in total compensation.

According to an SEC filing on Friday, Cook received $3 million in salary for 2019, the same as a year earlier, while his bonus decreased to $7.67 million from $12 million.

The majority of Cook's pay came from the vesting of $113.5 million worth of Apple shares. All in, Cook's salary, bonus and vesting compensation for the year declined by 8% from $136 million in 2018. Since 2011, the year Cook became CEO, his compensation has totaled $963.5 million, according to Equilar.

Apple exceeded its targets of $256.6 billion in net sales and $60.1 billion in operating income for fiscal 2019, but the company didn't beat the numbers by enough for top executives to maximize their bonuses.

"Annual cash incentives paid out at 128% of target for 2019, down from the maximum 200% of target paid for 2018," the filing said. In 2017, Apple executives received 155% of their target bonus.

In addition to Cook, Apple Chief Financial Officer Luca Maestri, general counsel Kate Adams, and Chief Operating Officer Jeff Williams all received smaller non-equity bonuses last year, down to $2.6 million from $4 million, according to the filing.

Apple sets its goals annually based on a variety of factors, including the macroeconomic environment, trade conditions and foreign exchange headwinds.

Apple declined to comment beyond the proxy.

Cook also received over $800,000 in other compensation, including a $16,800 contribution to his 401(k) plan and security expenses of $457,082. Apple's board of directors also requires Cook to fly private, which cost the company $315,311 in 2019.

Apple's median employee made $57,596, up from $55,426 a year earlier. Not including his 2011 stock grant, which accounts for the majority of Cook's pay, the CEO's compensation of $11.6 million last year was 201 times the amount earned by the median Apple employee.

Apple's stock surged 89% in 2019, its best performance since 2009 and the biggest gainer in the Dow Jones Industrial Average for the year.

Apple shareholders will vote on executive compensation at the company's annual shareholder meeting on Feb. 26.

CNBC's Josh Lipton contributed to this report.

WATCH: Look at pullbacks in Apple shares as buying opportunities