How do you calculate the standard cell potential of a cell constructed from #Mg^(2+)#/#Mg# and#Ni^(2+)#/#Ni#. Which half-cell is the anode and which half-cell is the cathode?
#"Mg"^(2+) "/" "Mg"#
#"Ni"^(2+) "/" "Ni"#
Look up the reduction potential for each cell in question on a table of standard electrode potential like this one from Chemistry LibreTexts. 
#"Mg"^(2+) (aq) + 2color(white)(l) "e"^(-) to "Mg"(s) color(white)(-)E^theta = -2.372 color(white)(l) "V"# #"Ni"^(2+) (aq) + 2color(white)(l) "e"^(-) to "Ni"(s) color(white)(-)E^theta = -0.257 color(white)(l) "V"#
The standard reduction potential
A cell with a high reduction potential indicates a strong oxidizing agent- vice versa for a cell with low reduction potentials.
Two half cells connected with an external circuit and a salt bridge make a galvanic cell; the half-cell with the higher
Therefore in this galvanic cell, the
The standard cell potential of a galvanic cell equals the standard reduction potential of the cathode minus that of the anode. That is:
Indicating that connecting the two cells will generate a potential difference of
 "1.2: Standard Electrode Potentials", Chemistry LibreTexts,
 "17.3: Standard Reduction Potentials", Chemistry LibreTexts, https://chem.libretexts.org/Textbook_Maps/General_Chemistry/Book%3A_Chemistry_(OpenSTAX)/17%3A_Electrochemistry/17.3%3A_Standard_Reduction_Potentials