The screened exchange (SX) density functional is a hybrid density functional which has been developed to improve the description of the band gaps of semiconductors and insulators in the local density approximation. It is accurate enough to reduce the band gap error to 7%, and efficient enough to be used variationally for total energy minimization in defects for supercells of 100 atoms. It also gives the correct localization of trapped hole states. Calculations of band structures and defects by SX for several materials are given as examples.