Google parent Alphabet Inc. said its workers earned a median pay package of more than $197,000 last year, the fourth-highest pay among the hundreds of companies in the S&P 500 index that have disclosed those figures.

Alphabet’s median pay was about 18% lower than at rival internet giant Facebook Inc., where employees earned a median salary of $240,000.

The...