Localized Wannier functions are essential to accelerating electronic structure calculations as well as painting a Chemically intuitive picture. In this talk, I will introduce how localized Wannier functions arise from the theory of electronic structures. I will then present a variational formulation of the localized Wannier functions that resolves some theoretical inconsistencies and affords us a 10-50x speedup compared to the state of the art.