A first principles simulation of the crystal structure of potassium peroxocarbonate is presented, using density functional methods (both local and semilocal) for the calculations. An experimental crystal structure with a seemingly inconsistent disposition of the peroxide bonds was used as initial input. Both geometry optimizations of the molecular structure and optimization of the cell size were performed. While cell parameters and heavier atom positions determined at the GGA level are very close to the experimental ones, there are important discrepancies in the positioning of the hydrogen atoms. As a result of these calculations, it was shown that the assignment of the peroxydic hydrogens and the peroxydic bond in the experimental structure was incorrect. A more accurate structure is presented and geometrical as well as cell parameters described. It is also shown that LDA is not accurate enough to describe this type of ionic crystals, because of overbinding of the ions, leading to incorrect cell parameters and volume. Our methodology was validated using DFT methods with several basis sets. (C) 2017 Elsevier B.V. All rights reserved.