The effect of doping spinel LiMn 2 O 4 with chromium and magnesium has been studied using the first-principles spin density functional theory within GGA (generalized gradient approximation) and GGA+U. We find that GGA and GGA+U give different ground states for pristine LiMn 2 O 4 and same ground state for doped systems. For LiMn 2 O 4 the body centered tetragonal phase was found to be the ground state structure using GGA and face centered orthorhombic using GGA+U, while for LiM 0.5 Mn 1.5 O 4 (M= Cr or Mg) it was base centered monoclinic and for LiMMnO 4 (M= Cr or Mg) it was body centered orthorhombic in both GGA and GGA+U. We find that GGA predicts the pristine LiMn 2 O 4 to be metallic while GGA+U predicts it to be the insulating which is in accordance with the experimental observations. For doped spinels, GGA predicts the ground state to be half metallic while GGA+U predicts it to be insulating or metallic depending on the doping concentration. GGA+U predicts insulator-metal-insulator transition as a function of doping in case of Cr and in case of Mg the ground state is found to go from insulating to a half metallic state as a function of doping. Analysis of the charge density and the density of 2 states suggest a charge transfer from the dopants to the neighboring oxygen atoms and manganese atoms. We have calculated the Jahn-Teller active mode displacement Q 3 for doped compounds using GGA and GGA+U. The bond lengths calculated from GGA+U are found to be in better agreement with the experimental bond lengths. Based on the bond lengths of metal and oxygen, we have also estimated the average oxidation states of the dopants.