New York CNN Business  — 

Walmart CEO Doug McMillon’s total compensation reached nearly $24 million during the last year as the company continued to hold its ground against Amazon and other rival retailers.

McMillon’s salary was about $1.3 million and he was eligible for stock awards based on performance and values at $15.6 million. He is also eligible for about $6.7 million in incentives and other forms of compensation.

That’s about 3.5% more than McMillon’s total compensation in the prior fiscal year. It’s also 1,076 times more than what Walmart’s median worker made. Workers got a raise, too: The median worker made nearly $22,000 last year, a 14.5% increase. That means the ratio between McMillon’s pay and the median Walmart worker was actually about 9% smaller than a year prior.

“We are a pay-for-performance company and heavily link our executive compensation program to the company’s operating performance and our strategic priorities,” said Walmart spokesperson Randy Hargrove. He noted that 76% of McMillon’s compensation is contingent on performance goals that have not been met yet. McMillon has been CEO since 2014.

The company’s stock dropped about 10% during the last fiscal year. But Walmart’s overall sales grew 3%, and digital sales ballooned 40%. Walmart’s all-important holiday sales blew past expectations, too.

Walmart (WMT) is the nation’s largest private sector employer and it employed more than 2.2 million workers last year, including 1.5 million in the United States.

The company has raised its minimum wage and expanded benefits in recent years.

Last year, Walmart increased its starting hourly wage in the United States to $11 an hour and paid nearly $800 million in bonuses to hourly workers based on stores’ performance. It also added new maternity and parental leave policies. The company says its average hourly total compensation and benefits come out to more than $17.50 an hour.

Walmart’s turnover rates decreased last year and the year prior as the result of its initiatives.

“At Walmart, it’s about moving people beyond entry-level jobs by giving associates clearer career paths, skills-based training and more control of their schedule,” Hargrove said. “Walmart has represented a ladder of opportunity since we started the business, and we want to make sure that’s the case going forward.”

Many companies have recently had to release CEO pay ratios for the second time. The move was mandated under a provision of the Dodd-Frank financial reforms passed during the Obama administration.

Gap (GPS) had the largest pay gap in retail between its CEO and median associate last year, according to data from MyLogIQ. CEO Art Peck earned 3,566 times as much as the retailer’s median associate. Peck made $20.7 million. Ross Stores (ROST) CEO Barbara Rentler made 1,222 more than the company’s median worker.

— CNN Business’ Julia Horowitz contributed to this report.