Female chief executives earned big bucks last year, but there are still very few of them running the nation’s largest companies.

The median pay for a female CEO was $13.1 million last year, up 9% from 2015, according to an analysis by executive data firm Equilar and the Associated Press. By comparison, male CEOs earned $11.4 million, also up 9%.

But the number of women in CEO roles has barely budged. Just 6% of the top-paid CEOs in the U.S. last year were women, according to the Equilar and AP analysis, a slight increase from about 5% in 2015 and 2014.

The highest-paid woman was Virginia Rometty of IBM, bumping out Yahoo’s Marissa Mayer from the top spot. Rometty earned $32.3 million last year from the technology company, a 63% jump from the year before, thanks to $12.1 million in stock option awards that she didn’t receive in 2015.

Mayer earned $27.4 million last year, making her the second-highest paid woman. But she may be out of a job after Yahoo Inc. completes the sale of its websites and email services to Verizon Communications Inc. in June. She’s not expected to join Verizon, and Yahoo has said Mayer will receive a $23-million severance package if she departs.

Third on the list was Indra Nooyi of PepsiCo Inc. She earned $25.2 million, up 13% from 2015. She was followed by Mary Barra, the CEO of automaker General Motors Co., who earned $22.4 million.

On the bottom of the list was Susan Story of American Water Works Co., the utility company, who earned $4.1 million.

To calculate pay, Equilar added salary, bonus, perks, stock awards, stock option awards and other types of compensation. Equilar looked only at companies in the Standard & Poor’s 500 index that filed proxy statements with federal regulators between Jan. 1 and May 1, 2017. And it included only CEOs who have been in their roles for at least two years in order to exclude sign-on bonuses. Of the 346 CEOs in that group, 21 were women.

The only black woman on the list, Xerox’s Ursula Burns, left the CEO role in January after the document management company split in two. Burns, who earned $13.1 million as CEO last year, retired as chairman of Xerox Corp.’s board this week.

Gracia Martore, who earned $8.5 million last year, announced this month that she will retire as CEO of Tegna Inc., the TV station owner and operator. Her replacement is a man.

Experts say companies need to do more to get women into CEO roles.

Janice Ellig, the co-CEO of executive search firm Chadick Ellig, said “unconscious bias” in the workplace is keeping women from getting opportunities that will put them on track for top roles.

Companies need to “start recognizing that gender inequality exists,” said Ellig, who is also chairperson of the Women’s Forum of New York. “If you don’t recognize a problem, you can’t solve a problem.”