The H-1B program allows highly educated foreign-born labor to temporarily work in the United States. Quotas restrict the number of H-1B recipients. In many years, all available work permits were allocated by random lottery. This paper argues that an alternative distribution method based upon ability would increase output, output per worker, and wages paid to less-educated workers. Baseline estimates suggest that a change in allocation policy could result in a $26.5 billion gain for the economy over a 6-year period. This estimate grows when H-1B demand rises.