A generic definition of oxidation state (OS) is formulated: "The OS of a bonded atom equals its charge after ionic approximation". In the ionic approximation, the atom that contributes more to the bonding molecular orbital (MO) becomes negative. This sign can also be estimated by comparing Allen electronegativities of the two bonded atoms, but this simplification carries an exception when the more electronegative atom is bonded as a Lewis acid. Two principal algorithms are outlined for OS determination of an atom in a compound; one based on composition, the other on topology. Both provide the same generic OS because both the ionic approximation and structural formula obey rules of stable electron configurations. A sufficiently simple empirical formula yields OS via the algorithm of direct ionic approximation (DIA) by these rules. The topological algorithm works on a Lewis formula (for a molecule) or a bond graph (for an extended solid) and has two variants. One assigns bonding electrons to more electronegative bond partners, the other sums an atom's formal charge with bond orders (or bond valences) of sign defined by the ionic approximation of each particular bond at the atom. A glossary of terms and auxiliary rules needed for determination of OS are provided, illustrated with examples, and the origins of ambiguous OS values are pointed out. An electrochemical OS is suggested with a nominal value equal to the average OS for atoms of the same element in a moiety that is charged or otherwise electrochemically relevant.