Women may be badly outnumbered in the top ranks of corporate America, but at least they aren’t underpaid.

Compensation for female chief financial officers at S&P 500 companies last year outpaced that of their male counterparts, according to an analysis by executive compensation firm Equilar and the Associated Press. It follows a similar trend seen with female CEOs in recent years.

The median pay for female CFOs last year rose nearly 11 percent to $3.32 million. Male CFO pay rose 7 percent, to $3.3 million. This follows several years of steady gains for both sexes.

The gains, for both men and women, are in part a result of the expansion of the CFO role to include far more responsibility and visibility.

“The CFO is no longer a bean counter,” said Josh Crist, managing director at executive search firm Crist Kolder Associates.

Companies and shareholders became more focused on financial security and regulation after the financial crisis, and corporate finance began to play a bigger role in company strategy, according to Gregg Passin, a compensation expert at consulting firm Mercer.