A first-principles calculation for potassium dioxide (K2O) in anti-fluorite structure with cation/anion migration defect, tetrahedral site and F center vacancy defect, has been performed by the plane-wave self-consistent field (PWscf) method with local-density approximation (LDA) and generalized gradient approximation (GGA). Defect formation energies are estimated under lattice unrelaxed structure for supercell containing unit cell of K2O. The results show that the formation energy increases in K2O with increases tetrahedral site and F center vacancy defect. Based on the results of the LDA and GGA methods, gives smaller values difference in defect formation energy. © 2018 Author(s).