Defect physics is at the heart of microelectronics. By keeping track of the reference energy in total energy calculations, we explicitly show that the "potential alignment" correction vanishes, and the classic Markov-Payne correction yields accurate results. From linear response theory, we further formulate an accurate expression for the quadrupole correction. Application to numerous defects including anisotropic material yields accurate formation energies in small supercells and the historically slow convergence of the 2+ diamond vacancy is shown to be a result of slow varying gap levels of the defect leading to a size dependent dielectric constant.