LixCoO2 and LixNiO2 (0.5<x<1) are prototype cathode materials in lithium ion batteries. Both systems show degradation and fatigue during electrochemical cycling. We have performed band structure calculations based on density-functional theory for a series of compounds Li-x(Co,Ni)O-2 (0<x<1). The distribution Of the transition metals (TM) cobalt and nickel on TM sites as well as the electronic structure of these compounds is investigated with focus on the change of oxidation states of cobalt, nickel and oxygen during lithium de-intercalation. We also study the total energy as a function Of the lithium content x, including the vibrational energy E-v and the formation energy of lithium vacancies E(V-Li). It is found that E-v is small compared to E(V-Li) and that E(V-Li) is increasing with increasing x for all systems.