Pay for CEOs at the biggest U.S. companies climbed 7% last year, widening the gap between chief executives and their workers, whose pay did not rise as quickly.

Chief executives at S&P 500 companies earned a median of $12 million last year, roughly $800,000 more than the same group of CEOs made the year before. That's according to data analyzed by Equilar for The Associated Press.

The median raise for the typical worker at these companies was 3% last year, less than half the bump for their bosses.

The analysis showed that it would take more than 150 years for the typical worker at most big companies to make what their CEO did last year.