Home Calculators Categories Category: Science & Engineering

Nernst Equation Calculator

The Nernst equation tells you how an electrochemical potential shifts when concentrations, pressures or pH move away from standard conditions. This calculator applies it to four common situations: the cell potential (EMF) of a balanced redox reaction, the equilibrium potential of a single ion across a membrane, the potential of a hydrogen electrode as pH changes, and the ideal reversible voltage of a hydrogen fuel cell. Enter your conditions, read the result, and check the worked substitution to see exactly how it was obtained.

Input
Load an illustrative cell example; selecting one restores Simple mode.
25 °C = 298.15 K. E° must match this temperature.
K

25 °C = 298.15 K. E° must match this temperature.

For the balanced reaction as written; use a consistent reference.
V

For the balanced reaction as written; use a consistent reference.

Positive whole number from the balanced reaction.
electrons

Positive whole number from the balanced reaction.

Dimensionless product/reactant activities with stoichiometric powers. Slider uses log₁₀ Q; type exact Q or scientific notation.
dimensionless

Dimensionless product/reactant activities with stoichiometric powers. Slider uses log₁₀ Q; type exact Q or scientific notation.

Visual
Output

Cell potential

—

Q is dimensionless; E° must match the temperature.

Worked substitution

How to use the calculator

The calculator opens in Simple mode, which calculates the cell potential of a balanced redox reaction. Open Advanced mode to reach the Application selector, which offers four models:

  • Cell potential / EMF
  • Single-ion membrane potential
  • Hydrogen electrode vs pH
  • Hydrogen fuel cell at 25 °C

Only the inputs of the active application affect the result. Entered values are kept when you switch between modes, but Simple mode always uses the cell model. Reset restores Simple mode and the default values.

Input Used by Default Accepted range (inclusive)
Temperature (K) Cell, membrane, hydrogen electrode 298.15 K 250–373.15 K
Standard cell potential E° (V) Cell 1.1 V −5 to +5 V
Electrons transferred n Cell 2 Integers 1 to 20
Reaction quotient Q (dimensionless) Cell 1 10⁻³⁰ to 10³⁰
Signed ion charge z Membrane +1 Nonzero integers −4 to +4
Outside concentration (mM) Membrane 5 mM 10⁻⁹ to 10⁶ mM
Inside concentration (mM) Membrane 140 mM 10⁻⁹ to 10⁶ mM
pH Hydrogen electrode 7 0–14
Hydrogen partial pressure (bar) Hydrogen electrode, fuel cell 1 bar 10⁻⁹ to 1000 bar
Oxygen partial pressure (bar) Fuel cell 1 bar 10⁻⁹ to 1000 bar

Temperature is entered in kelvin, where T(K)=T(∘C)+273.15T(\mathrm K)=T({}^\circ\mathrm C)+273.15, so 25 °C is 298.15 K. The fuel-cell model uses a fixed 298.15 K and hides the temperature field.

Every numeric field accepts a typed value or a slider. Q, both concentrations and the gas pressures use base-10 logarithmic sliders, because they span many orders of magnitude, but the number boxes always hold the actual value in the displayed unit. Q also accepts scientific notation such as 1e-5.

For cell calculations, the Cell examples selector offers Custom conditions, Q = 1 (zero correction), Zinc–copper example: Q = 10 and Practice: Q = 100. Each preset restores Simple mode at 298.15 K, E° = 1.1 V and n = 2, with the stated Q.

The Nernst equation formula

The Nernst equation links the potential of an electrochemical system to its composition. For a cell reaction, it is

E=E∘−RTnFln⁡QE = E^\circ - \frac{RT}{nF}\ln Q

where:

  • EE is the cell potential under the stated conditions, in volts (V).
  • E∘E^\circ is the standard cell potential for the balanced reaction as written, at the entered temperature, in V.
  • R=8.31446261815324 J mol−1 K−1R = 8.31446261815324\ \mathrm{J\,mol^{-1}\,K^{-1}} is the gas constant.
  • TT is the absolute temperature in kelvin.
  • nn is the positive number of electrons transferred in the balanced reaction.
  • F=96485.33212331001 C mol−1F = 96485.33212331001\ \mathrm{C\,mol^{-1}} is the Faraday constant.
  • ln⁡\ln is the natural logarithm.
  • QQ is the reaction quotient (dimensionless).

QQ is the product of product activities divided by the product of reactant activities, each raised to its stoichiometric coefficient. Pure solids and pure liquids have unit activity. In dilute ideal solutions, concentration divided by the standard concentration can approximate activity, which is the usual classroom simplification. The calculator takes QQ directly as an input, so you do the activity bookkeeping before entering it.

At 298.15 K, the combination RTln⁡(10)/FRT\ln(10)/F is approximately 0.05915935 V0.05915935\ \mathrm V, which gives the familiar base-10 form:

E=E∘−0.05915935 Vnlog⁡10QE = E^\circ - \frac{0.05915935\ \mathrm V}{n}\log_{10} Q

Many textbooks round the coefficient to 0.0592 V or 0.059 V, which is why hand calculations differ slightly from the calculator in the last digits.

Interpreting a cell potential

Three results are worth recognizing:

  • Q=1Q = 1: the logarithm is zero, so E=E∘E = E^\circ. Concentrations or pressures at standard activity leave the potential uncorrected.
  • E>0E > 0: the forward reaction, as written, is thermodynamically favored.
  • E=0E = 0: the cell is at equilibrium, and Q=KQ = K, the equilibrium constant.

Using the default values (E∘=1.1E^\circ = 1.1 V, n=2n = 2, 298.15 K), the calculator shows:

Q Cell potential
1 1.10000 V
10 1.07042 V
100 1.04084 V

Each tenfold increase in QQ lowers the potential by 0.05915935/2≈0.029580.05915935/2 \approx 0.02958 V for a two-electron reaction. This is why the plotted line against log⁡10Q\log_{10}Q is straight. A larger nn makes the potential less sensitive to QQ, because the same concentration change is spread over more electrons.

Because E=0E=0 at equilibrium, you can rearrange the equation to estimate KK. At 298.15 K with E∘=1.1E^\circ = 1.1 V and n=2n = 2, log⁡10K=nE∘/0.05915935≈37.2\log_{10}K = nE^\circ/0.05915935 \approx 37.2, so K≈1.5×1037K \approx 1.5\times10^{37}. The reaction lies overwhelmingly toward products. The calculator itself does not output KK, but its model is consistent with this relationship.

Temperature caution. The temperature you enter changes the RT/nFRT/nF term. The model does not adjust E∘E^\circ for temperature, since that requires thermodynamic data for your specific reaction. For this reason, a valid cell calculation at any temperature other than 298.15 K shows the note "Check the standard potential." Use an E∘E^\circ that is appropriate to the temperature you entered.

Nernst equation for membrane potential

For a single ion that can cross a membrane, the Nernst equation gives the voltage at which the electrical and concentration driving forces balance, so there is no net flow of that ion. The calculator uses

Eion=1000 RTzFln⁡coutsidecinsideE_{\mathrm{ion}} = \frac{1000\,RT}{zF}\ln\frac{c_{\mathrm{outside}}}{c_{\mathrm{inside}}}

where zz is the signed charge number of the ion (for example +1 for K⁺ or −1 for Cl⁻), the concentrations are in mM and their ratio is dimensionless, and the factor 1000 converts volts to millivolts. The model approximates the activity ratio with the concentration ratio.

Sign convention. The result is labeled Ion equilibrium potential (inside − outside): the outside is the voltage reference. Equal concentrations give zero. Reversing the sign of zz with the concentrations fixed reverses the sign of the potential.

With 5 mM outside, 140 mM inside and 298.15 K:

Signed charge z Ion equilibrium potential
+1 −85.61 mV
−1 +85.61 mV

The interface omits the plus sign on positive results, so +85.61 mV appears as 85.61 mV. The value of −85.61 mV for z=+1z=+1 reflects a cation that is more concentrated inside: at equilibrium, the inside must be negative to hold it in.

The result describes the equilibrium of one ion. A real resting membrane potential depends on several ions and their relative permeabilities, so it needs a multi-ion model. Treat the Nernst value as the limiting potential toward which a membrane dominated by that single ion would settle. A valid membrane calculation shows the note "Single-ion equilibrium" to remind you of this.

Nernst equation for pH

A hydrogen electrode responds to the activity of hydrogen ions. For the reduction

2H++2e−→H22\mathrm{H^+} + 2e^- \rightarrow \mathrm{H_2}

the calculator uses pH=−log⁡10(aH+)\mathrm{pH} = -\log_{10}(a_{\mathrm{H^+}}) and Q=h/aH+2Q = h/a_{\mathrm{H^+}}^2, where h=pH2/(1 bar)h = p_{\mathrm{H_2}}/(1\ \mathrm{bar}) is the dimensionless hydrogen pressure. With the standard hydrogen electrode (SHE) defined as zero volts, the implemented equation is

E=−RT2F[ln⁡h+2 pH ln⁡10]E = -\frac{RT}{2F}\left[\ln h + 2\,\mathrm{pH}\,\ln 10\right]

This assumes ideal gas behavior. At 1 bar of hydrogen and pH 0, the potential is zero. At fixed hydrogen pressure and 298.15 K, every unit increase in pH lowers the potential by about 59.16 mV. At 1 bar and pH 7, the calculator gives −0.41412 V versus SHE.

The result is labeled Hydrogen electrode potential vs SHE. This application takes pH as an input and returns electrode potential; it does not work backward from a measured voltage to pH.

Hydrogen fuel cell at 25 °C

The fuel-cell application models the reaction

H2+12O2→H2O(l)\mathrm{H_2} + \tfrac{1}{2}\mathrm{O_2} \rightarrow \mathrm{H_2O(l)}

with ideal gases, unit activity for liquid water, n=2n = 2, T=298.15T = 298.15 K and E∘=1.229E^\circ = 1.229 V. With o=pO2/(1 bar)o = p_{\mathrm{O_2}}/(1\ \mathrm{bar}) and Q=1/(ho)Q = 1/(h\sqrt{o}), the equation is

E=1.229 V+RT2F[ln⁡h+12ln⁡o]E = 1.229\ \mathrm V + \frac{RT}{2F}\left[\ln h + \tfrac{1}{2}\ln o\right]

With both gases at 1 bar, the result is 1.22900 V. Reducing oxygen to 0.21 bar (roughly the partial pressure in air at 1 bar total) while keeping hydrogen at 1 bar gives 1.21898 V, a drop of about 10 mV.

The output is labeled Ideal reversible cell potential and carries the note "Ideal fuel-cell limit." It is the thermodynamic ceiling, not what a working stack delivers. Voltage under load is lower and depends on operating conditions and losses such as activation, ohmic and mass-transport effects, none of which this model includes.

Reading the results panel and graph

The calculator displays a single potential: five decimal places for volts and two for millivolts. Those digits reflect numerical display resolution only. The physical accuracy of the answer depends on your inputs and on how well the model's assumptions (ideal activities, a correct E∘E^\circ) fit your system.

Below the result you will see a short statement of the model assumptions and a Worked substitution panel showing the formula with your entered values. Use it to check unit handling and to follow the arithmetic by hand.

The graph updates as you change inputs. Its horizontal axis depends on the application:

Application Horizontal variable
Cell potential log⁡10Q\log_{10}Q
Membrane log⁡10(coutside/cinside)\log_{10}(c_{\mathrm{outside}}/c_{\mathrm{inside}})
Hydrogen electrode pH
Fuel cell log⁡10(ho)\log_{10}(h\sqrt{o})

The orange line shows the relationship and the blue point marks your current result. Zoom and reset view change the drawing only, not the calculation.

If any active input is invalid, the calculator shows an error and replaces the result with an em dash (—). The worked calculation and graph are cleared, and Copy and Print / PDF are disabled until the input is fixed. Copy includes the active inputs, the result, the model assumptions and any applicable notes. Print / PDF opens your browser's print dialog. The Help panel covers inputs, sign and reference conventions, graph controls and error recovery.

Common mistakes to avoid

  • Mixing up ln⁡\ln and log⁡10\log_{10}. The coefficient RT/nFRT/nF goes with ln⁡Q\ln Q. The 0.0592 V figure goes with log⁡10Q\log_{10}Q.
  • Writing Q upside down. Products go in the numerator and reactants in the denominator. Inverting QQ flips the sign of the correction.
  • Using the wrong nn. Use the number of electrons in the balanced reaction exactly as written, and use the same reaction for E∘E^\circ.
  • Using Celsius. Convert to kelvin first by adding 273.15.
  • Ignoring non-ideality. At high ionic strength or high pressure, concentrations and pressures are poor stand-ins for activities and fugacities.
  • Treating the Nernst result as a rate or loaded voltage. The equation describes thermodynamic potential, not reaction speed or voltage while current flows.

Frequently asked questions

What does the Nernst equation calculate? It calculates the potential of an electrochemical system at specified conditions, relative to its standard potential, by correcting for composition and temperature.

What is the Nernst equation at 25 °C? At 298.15 K, it is E=E∘−(0.05915935 V/n)log⁡10QE = E^\circ - (0.05915935\ \mathrm V/n)\log_{10}Q. Many sources round the coefficient to 0.0592 V.

What happens when Q equals 1? The logarithm is zero, so E=E∘E = E^\circ.

What does a negative membrane potential mean here? The calculator reports inside minus outside. A negative value means the inside is at a lower potential than the outside when that ion is at equilibrium.

Is the Nernst potential the same as the resting membrane potential? No. The Nernst potential is for one ion. A resting potential reflects several ions with different permeabilities and needs a multi-ion model.

Why does the calculator warn me to check the standard potential? E∘E^\circ is not adjusted for temperature. If you enter a temperature other than 298.15 K in the cell model, make sure your E∘E^\circ value is valid for that temperature.

Can I enter Q in scientific notation? Yes. Q accepts scientific notation within the range 10−3010^{-30} to 103010^{30}.

Why is the fuel-cell voltage so close to 1.229 V? Pressures only enter through a logarithm and the prefactor is small, so even large pressure changes shift the ideal voltage by only millivolts to tens of millivolts. Real stacks run well below the reversible value under load.

Calculation Methodology Documented

Read the formula definitions, supported input ranges, and limitations before using this estimate.

Review Methodology
Debjeet Bhowmick
Author Debjeet Bhowmick AWS Certified Solutions Architect • Cloud & DevOps Consultant

AWS Certified Solutions Architect Professional and Senior Cloud & DevOps Consultant with over 14 years of hands-on expertise architecting resilient cloud infrastructure across AWS, GCP, and Azure. Specializes in infrastructure as code, continuous delivery automation, and telemetry across Terraform, Ansible, Docker, Kubernetes, ELK, Python, and SQL. Creator of OrangeCalc, delivering client-side high-precision computational tools.