The Social Security earnings test taxes away benefits at a 33%-50% rate once earnings pass a threshold amount. I investigate the response to three past changes in the earnings test rules, each applying to some age groups and not others. I find that beneficiaries bunch in substantial numbers just below the earnings threshold, and the bunching shifts when the earnings test rules change. These shifts in the budget constraint are incorporated into an econometric model to identify income and substitution effects. The estimation yields significant elasticities that suggest considerable deadweight loss suffered by working beneficiaries.