Skip to content
ScienceQuest
Chemistry Simulator School

Galvanic Cell Simulator

A galvanic cell makes a current from a redox reaction. Pick two metals and watch electrons, salt bridge ions and the Nernst voltage as the cell runs down.

Simulator

t = 0 h, 1 s on screen = 107.2 min
Cell potential, E
What a voltmeter drawing no current would read across the cell at this moment: E = E° − (RT/nF) ln Q.
1.1 V
Standard potential, E°
E° of the copper cathode minus E° of the zinc anode, both read as reductions. n = 2.
1.10 V
Reaction quotient, Q
Q = [Zn²⁺]/[Cu²⁺]. The current stops when Q reaches K.
1
Equilibrium constant, K
K = 10^(nE°/0.05916) at 25 °C. E is zero exactly when Q equals K.
1.54 × 10³⁷
Charge passed
q = It: the steady current times the time since the circuit closed.
0 C
Zinc anode, mass change
Metal dissolved as Zn²⁺: q × 65.38 / (2F).
0 g
Copper cathode, mass change
Metal plated from Cu²⁺: q × 63.546 / (2F).
0 g
[Zn²⁺] at the anode
1 mol/L
[Cu²⁺] at the cathode
1 mol/L
Run time
Until Q reaches K and E falls to zero, at 100 mA.
53.6 h

Parameters

The Daniell cell anode, and the sacrificial metal in galvanising: zinc corrodes in preference to the iron it covers because it sits below iron here.

Positive, so copper does not displace hydrogen from acid. The cathode of the Daniell cell and half of almost every worked example.

mol/L

The concentration of the left metal’s ions when the circuit closes.

mol/L

The concentration of the right metal’s ions when the circuit closes.

mA

A steady current, as a battery tester draws. It sets how long the run takes, not the shape of the curve against the charge passed.

mL

More solution holds more ions to use up, so the run lasts longer.

g

If the anode dissolves completely before the cell reaches equilibrium, the run stops there.

  • Cell potential
The cell potential over the whole run at a steady current. It falls by 59.16 mV divided by n for every tenfold rise in Q, so it holds almost level until one reactant is nearly used up.
At the zinc anode, oxidation
Zn → Zn²⁺ + 2e⁻
At the copper cathode, reduction
Cu²⁺ + 2e⁻ → Cu
Reaction
Zn + Cu²⁺ → Zn²⁺ + Cu
Reaction quotient
Q = [Zn²⁺]/[Cu²⁺]
Cell diagram
Zn(s) | Zn²⁺(aq) || Cu²⁺(aq) | Cu(s)

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

E=E∘−RTnFln⁡Q,Δm=ItMzFE = E^\circ - \frac{RT}{nF}\ln Q, \quad \Delta m = \frac{ItM}{zF}

Nernst (1889), and Faraday’s laws of electrolysis (1834)

What a galvanic cell is

A galvanic cell, also called a voltaic cell, makes an electric current from a spontaneous redox reaction by keeping the two halves of the reaction apart, so that the electrons have to travel through a wire to get from one to the other. Under standard conditions its voltage is E°cell = E°cathode − E°anode, and away from them it is E = E° − (RT/nF) ln Q, the Nernst equation, which is why the voltage falls as the cell runs down. The Daniell cell, zinc in zinc ions against copper in copper ions, gives 1.10 V.

Each half is a metal strip standing in a solution of its own ions. At the anode the metal is oxidised and dissolves, Zn → Zn²⁺ + 2e⁻, leaving its electrons in the strip. At the cathode, ions from the solution take electrons from the strip and plate out as metal, Cu²⁺ + 2e⁻ → Cu. A wire carries the electrons from one strip to the other, and a salt bridge joins the two solutions so that ions can move between them.

Using the simulator

Choose a metal for each beaker from the 14 metals in the table of standard reduction potentials that can stand in water as an electrode, set the concentration of each solution, the current the load draws, the volume of solution and the starting mass of the electrodes, and press Play. The cell decides for itself which electrode is the anode. The whole discharge plays in 30 seconds at 1x, however long it would take on a bench, and the clock under the scene says how much of the cell’s time each second on screen stands for. Drag the time slider to stop at any moment: the scene, the readouts and the marker on the plot all show the cell as it is then.

The readouts give the cell potential now, the standard potential of the reaction as it runs, the reaction quotient Q beside the equilibrium constant K, the charge passed, the mass each electrode has lost or gained, and both concentrations. The plot is the voltage over the whole run, worked out from the equations rather than recorded from the animation.

To work out a single moment for any two rows of the table, including the gas electrodes and the pH dependent couples this simulator leaves out, or at another temperature with the table’s 25 °C values of E°, use the Nernst equation calculator.

Which electrode is the anode

The one with the lower electrode potential, which for standard solutions is the metal lower in the table of standard reduction potentials. Each electrode’s potential against its own solution is E = E° + (RT/zF) ln c, where z is the charge on the metal’s ion and c its concentration: the table’s value corrected for the solution the strip stands in. The cell potential is the difference between the two. Zinc at −0.76 V is below copper at +0.34 V, so zinc is the anode however the beakers are arranged: swap the metals and the labels, the electrons and the bridge ions all turn round.

When two metals sit close together in the table, the concentrations can overrule it. Tin at −0.14 V is just below lead at −0.13 V, so with both solutions at 1 mol/L tin is the anode. Dilute the lead solution to 0.001 mol/L and lead’s electrode potential falls by 0.0887 V, to −0.2187 V, below tin’s. Lead then becomes the anode and the cell runs the other way, starting at 0.0787 V, with a standard potential of −0.01 V for the reaction it now drives.

Electrons in the wire, ions in the bridge

Electrons flow through the wire from the anode to the cathode, which in a galvanic cell is from the negative electrode to the positive one, and the conventional current runs the other way. No electron crosses the solutions. Inside the cell the charge is carried by ions, and the salt bridge is where they cross from one beaker to the other.

The bridge is there to keep each solution electrically neutral. The anode adds positive ions to its beaker, so negative ions have to arrive to balance them, and nitrate ions move out of the bridge into the anode’s solution. The cathode removes positive ions from its beaker, so potassium ions move into the cathode’s solution to take their place. Take the bridge away and the circuit is open, so no current flows at all.

The bridge here holds potassium nitrate, a common choice because nitrates and potassium salts are soluble as a rule, so neither ion that leaves the bridge precipitates anything in the beakers. A potassium chloride bridge, the other common one, would precipitate silver chloride in a silver half-cell, and lead(II) chloride, which is only sparingly soluble, in a lead one.

Worked example: the Daniell cell run down at 100 mA

The simulator opens on this cell: zinc on the left and copper on the right, each in 100 mL of its own ions at 1.0 mol/L, electrodes of 10 g each, and 100 mA drawn through the circuit.

  • At the start. Both solutions are standard, so Q = [Zn²⁺]/[Cu²⁺] = 1 and E = E° = 0.34 − (−0.76) = 1.10 V. With n = 2, log K = 2 × 1.10 / 0.05916 = 37.19, so K = 1.54 × 10³⁷.
  • How long it can run. The beaker holds 1.0 × 0.100 = 0.100 mol of Cu²⁺, which takes 0.200 mol of electrons to plate out, 0.200 × 96,485 = 19,297 C. At 0.100 A that is 19,297 / 0.100 = 192,971 s, or 53.60 hours.
  • Halfway, after 26.80 hours. 9,648.5 C has passed, 0.100 mol of electrons. Half the copper ions are gone and the zinc ions have risen by the same amount: [Zn²⁺] = 1.50 mol/L, [Cu²⁺] = 0.50 mol/L and Q = 3.0, so E = 1.10 − (0.025693/2) × ln 3 = 1.10 − 0.01411 = 1.086 V.
  • The electrodes, halfway. With Δm = qM/(zF), the zinc has lost 9,648.5 × 65.38 / (2 × 96,485) = 3.269 g, leaving 6.731 g, and the copper has gained 9,648.5 × 63.546 / (2 × 96,485) = 3.177 g, to 13.18 g.
  • At the end. The voltage reaches zero when Q reaches K, which leaves [Cu²⁺] = 2.0 / (1.54 × 10³⁷) = 1.3 × 10⁻³⁷ mol/L, far less than one ion in the beaker. By then the zinc has lost 6.538 g and the copper has gained 6.355 g.

Drag the time slider to the middle for the halfway readings and to the end for the last ones. With reduced motion switched on, the scene opens at the halfway point.

Why the voltage holds steady, then falls away

The Nernst correction depends on the logarithm of Q, so the voltage hardly notices the concentrations changing until one of them is nearly gone. At 25 °C a tenfold rise in Q costs 59.16 mV divided by n, which is 29.58 mV for the Daniell cell. Its Q climbs from 1 to 3 by halfway and to 199 once 99 percent of the copper ions are used, and the voltage is still 1.032 V. After that, each further tenfold fall in the copper ion concentration takes a tenth as long as the one before, so the last decades of Q pass in moments and the voltage drops to zero at the end of the run.

That shape, level for almost the whole run and then a cliff, is the discharge curve on the plot. It is nothing like a capacitor running down, whose voltage is proportional to the charge it still holds; the RC charge and discharge simulator shows that exponential for comparison.

How much metal moves: Faraday’s laws

Every electron through the wire is one electron taken from an atom at the anode and handed to an ion at the cathode, so the amount of metal that moves is fixed by the charge alone: Δm = qM/(zF) = ItM/(zF), where M is the molar mass, z the charge on the metal’s ion and F the Faraday constant, 96,485 C/mol, the charge on a mole of electrons. Every 1,000 C dissolves 0.3388 g of zinc and plates 0.3293 g of copper, or 1.118 g of silver, whose ion carries one charge where copper’s carries two.

The two electrodes do not change by the same mass. The same charge moves the same number of atoms of zinc and copper, and zinc atoms are the heavier of the two, so the anode loses a little more than the cathode gains.

When the cell stops before its reactants run out

The current stops when E reaches zero, which is when Q equals K, not necessarily when anything has run out. For the Daniell cell K is so large that the two amount to the same thing. Tin against lead is the opposite case: E° is only 0.01 V, so K = e^(2 × 0.01 / 0.025693) = 2.18. With both solutions at 1.0 mol/L the cell stops with [Sn²⁺] = 1.371 mol/L and [Pb²⁺] = 0.629 mol/L, whose ratio is K, after 19.87 hours at 100 mA and with most of the lead ions still in the beaker.

The anode can run out first instead. Lead against silver ions at 1.0 mol/L has K = 2.76 × 10³¹, but a 10 g lead strip is only 10 / 207.2 = 0.0483 mol of lead, which gives up 0.0965 mol of electrons, 9,313 C, before it has all dissolved, while the silver ions would take 0.100 mol. The run stops after 25.87 hours with the lead gone and 0.0347 mol/L of silver ions left, and the solutions would still give 0.839 V against a fresh lead strip. Give the electrodes 11 g each and the silver ions run out first.

Checking a textbook example

NCERT’s Class 12 chemistry textbook works this cell as Example 2.1: Mg | Mg²⁺(0.130 M) || Ag⁺(0.0001 M) | Ag, with E° = 3.17 V. Put magnesium on the left at 0.130 mol/L and silver on the right at 0.0001 mol/L, and the meter reads 2.960 V the moment the circuit closes: E = 3.17 − (0.025693/2) × ln(0.130 / 0.0001²) = 3.17 − 0.2104 = 2.960 V. The book rounds 2.303RT/F to 0.059 V and prints 2.96 V. There is so little silver in the right-hand beaker, 0.00001 mol, that at 100 mA the run is over in 9.649 seconds.

What this simulator leaves out

  • Internal resistance and overpotential. The meter shows the open-circuit potential of the two solutions as they stand, what a voltmeter drawing no current would read. A real cell delivering current loses some of that inside itself, more at larger currents, so its terminal voltage sits lower and falls further under load.
  • Activities. Concentrations stand in for activities, which only holds in dilute solution.
  • The junction. The salt bridge is taken as perfect: no potential forms where it meets each solution, and nothing mixes through it.
  • Temperature. The whole run is at 25 °C, the temperature the table’s potentials are quoted at.
  • Other kinds of half-cell. Only metals standing in their own ions are on offer. Gas electrodes such as hydrogen, inert platinum electrodes and couples whose potential depends on pH are left out.
  • Metals that react with water. Lithium, sodium, potassium, calcium and barium react with water too fast to stand in it as an electrode, so they are not offered. Magnesium and aluminium are, as they are in textbook problems, and the table’s note under each metal says what lets it last in water.
  • Side reactions and solubility. Nothing else happens in the beakers: no metal reacts with the water or the air, and no salt crystallises out however concentrated the anode’s solution becomes.
  • Rate. The current is whatever you set. How much current a real cell can deliver depends on the kinetics at its electrodes and the resistance of its bridge, and no table of potentials contains either.

Common mistakes

  • Calling the anode positive. In a galvanic cell the anode, where the metal gives up its electrons, is the negative electrode, and the cathode is the positive one.
  • Sending electrons through the salt bridge. Electrons travel only through the wire. The bridge carries ions, which is why it is an electrolyte and not a strip of metal.
  • Flipping the anode’s sign before subtracting. E°cathode − E°anode already reverses it. Doing both turns the Daniell cell’s 1.10 V into −0.42 V.
  • Expecting the voltage to fall steadily. It follows log Q, so it holds nearly level until a reactant is almost used up.
  • Leaving z out of Faraday’s law. A mole of electrons plates a mole of silver but only half a mole of copper, because each Cu²⁺ takes two.
  • Expecting the electrodes to change by the same mass. The charge moves equal numbers of atoms, not equal masses: 3.269 g of zinc dissolves while 3.177 g of copper plates.
  • Using a chloride salt bridge with silver or lead. Silver chloride is insoluble and lead(II) chloride only sparingly soluble, so the bridge would precipitate the very ion the cell runs on.

Model and assumptions

Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • The load draws a steady current, so the charge passed is exactly the current times the time, and Faraday’s laws give every mass and concentration from it in closed form.
  • Each electrode sits at its Nernst potential with concentrations standing in for activities, and the voltage shown is the open-circuit potential of the two solutions at that moment.
  • The run ends where the voltage reaches zero, found by bisection on the logarithm of the cathode ion’s concentration down to adjacent doubles, or sooner if the anode’s metal is used up.
  • The temperature is fixed at the table’s 298.15 K, and internal resistance, overpotential and the junction potential at the salt bridge are all left out.

Where it stops holding. Any temperature but 25 °C, and any half-cell that is not a metal in a solution of its own ions, such as a gas electrode, an inert platinum electrode or a couple whose potential depends on pH. The Nernst Equation Calculator is the right tool there.

Numerical accuracy

No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.

Galvanic Cell Simulator: the equation E = E° - (RT/(nF)) ln Q, Δm = ItM/(zF).
The equation the simulator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Common questions

How does a galvanic cell work?

It keeps the two halves of a spontaneous redox reaction apart, so the electrons have to travel through a wire. The metal lower in the table of reduction potentials is oxidised at the anode and releases electrons, which flow through the external circuit to the cathode, where the other metal’s ions take them and plate out as metal. A salt bridge joins the two solutions so that ions can move between them and keep each one neutral. The Daniell cell, zinc against copper, gives 1.10 V under standard conditions.

What does the salt bridge do in a galvanic cell?

It completes the circuit inside the cell and keeps both solutions electrically neutral. The anode adds positive metal ions to its solution, so anions such as nitrate move out of the bridge into that beaker, and the cathode removes positive ions from its solution, so cations such as potassium move into the other. Only ions cross the bridge, never electrons. Take the bridge away and the circuit is open, so no current flows.

Which way do electrons flow in a galvanic cell?

From the anode to the cathode through the external wire, which in a galvanic cell means from the negative electrode to the positive one. Conventional current flows the other way round the circuit. In a Daniell cell the electrons leave the zinc and arrive at the copper, and inside the cell the charge is carried by ions instead.

Why does a galvanic cell’s voltage fall as it runs down?

Because the reaction changes the concentrations, and the Nernst equation, E = E° − (RT/nF) ln Q, turns that into volts. As the anode’s ions build up and the cathode’s are used, Q rises and E falls, reaching zero when Q equals the equilibrium constant K. At 25 °C each tenfold rise in Q costs only 59.16 mV divided by n, so a Daniell cell that started with both solutions at 1 mol/L still gives 1.032 V with 99 percent of its copper ions used, and then drops quickly to zero.

How do you work out how much an electrode’s mass changes?

Multiply the charge passed by the molar mass and divide by zF: Δm = ItM/(zF), where I is the current, t the time, M the molar mass, z the charge on the metal’s ion and F the Faraday constant, 96,485 C/mol. At 100 mA for 10 hours, 3,600 C passes, so a Daniell cell’s zinc anode loses 3,600 × 65.38 / (2 × 96,485) = 1.220 g and its copper cathode gains 1.185 g.