The amount of electricity (or charge) required for oxidation or reduction depends on the stoichiometry of the electrode reaction.
For example,in the reaction: $Ag_{(aq)}^{+} + e^{-} \rightarrow Ag_{(s)}$
One mole of electrons is required for the reduction of one mole of silver ions. The charge on one mole of electrons is calculated as:
$= N_{A} \times 1.6021 \times 10^{-19} \ C$
$= 6.022 \times 10^{23} \ mol^{-1} \times 1.6021 \times 10^{-19} \ C \approx 96487 \ C \ mol^{-1}$
This quantity of electricity is called $1$ Faraday $(F)$. For calculations,we use $1 \ F \approx 96500 \ C \ mol^{-1}$.
In electrolytic reactions,the total electricity $(Q)$ is given by $Q = I \times t$,where $I$ is current in amperes and $t$ is time in seconds.
Steps to calculate the required electricity:
$(i)$ Write the balanced half-reaction occurring on the electrode.
$(ii)$ Determine the number of moles of electrons $(n)$ required to produce $1 \ mol$ of the product.
$(iii)$ The required charge is $n \times F$.
Examples:
$(i)$ For $Ag$: $Ag_{(aq)}^{+} + e^{-} \rightarrow Ag_{(s)}$. $1 \ mol$ of $Ag$ requires $1 \ F$.
$(ii)$ For $Mg$: $Mg_{(aq)}^{2+} + 2e^{-} \rightarrow Mg_{(s)}$. $1 \ mol$ of $Mg$ requires $2 \ F$.
$(iii)$ For $Al$: $Al_{(aq)}^{3+} + 3e^{-} \rightarrow Al_{(s)}$. $1 \ mol$ of $Al$ requires $3 \ F$.