Apply Faradays law of electrolysis.
Faraday's laws of electrolysis state that the amount of substance transformed at an electrode is proportional to the charge passed, and inversely proportional to the number of electrons each ion needs. Charge is simply current multiplied by time, and one mole of electrons carries 96,485 coulombs — the Faraday constant. Dividing by the electron count per ion converts moles of electrons into moles of product, which the molar mass turns into grams.
Faraday's law of electrolysis
Q = I x t; moles of electrons = Q / 96485; mass = (moles of electrons / z) x molar mass
It is the charge on the ion being discharged: 1 for Ag+ or H+, 2 for Cu2+, Zn2+ or Ni2+, 3 for Al3+. For gas evolution use the balanced half-equation — 4 electrons per O2 molecule, 2 per H2.
Because of current efficiency. Side reactions, especially hydrogen evolution in aqueous plating baths, consume part of the charge. Industrial copper refining runs at 95-98 percent efficiency; some processes are far lower.
Yes. Rearrange to t = mass x z x 96485 / (molar mass x current). Adjust for expected current efficiency by dividing the theoretical time by that fraction.