This would be the case, if the element of oxygen were to have 2 fewer electrons than what is present in the neural atom.
We can calculate the formal charge of a given species, by simply taking the species number of valence electrons and subtracting it by the number of electrons in the Lewis diagram if given.