ForHosting KIT · Science

Electrolysis calculator

Turn a current and a run time into grams of product: 0.8 A for 7200 seconds through a silver bath passes 5760 coulombs and plates a little over 6 g of silver. The same law covers gases released at either electrode. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Current
0.8
Time
7,200
Molar mass
107.8682
Electrons
1
You get
Mass
6.4395366459
Charge
5,760
Faraday constant
96,485.33212331

Electrolysis drives a redox change by sending a constant current through a molten salt or aqueous electrolyte, so metal plates out at the cathode or a gas leaves at either electrode. Faraday's first law ties the mass of that product to the charge that crossed the cell. Given current in amperes, electrolysis time in seconds, molar mass in grams per mole, and the electron count n of the half-reaction, this calculator returns the mass in grams from m equals I times t times M over n times F.

Faraday's first law for plated metal and evolved gas

Faraday's first law of electrolysis states that the mass of substance liberated at an electrode is proportional to the electric charge that passes through the cell. In SI units that statement becomes a single closed formula: mass in grams equals current in amperes times time in seconds times molar mass in grams per mole, divided by the product of the electron count n and the Faraday constant F.

F is the charge of one mole of electrons, fixed by the 2019 SI redefinition as the product of the elementary charge and the Avogadro constant. The same identity covers a metal plated onto a cathode and a gas evolved at either electrode, because both are Faraday products of the half-reaction. For silver reduced from Ag+, n is one and M is the molar mass of silver.

For copper(II) reduced to metal, n is two and M is the molar mass of copper. For hydrogen evolved from aqueous acid, n is two and M is the molar mass of H2. For oxygen from water oxidation, n is four and M is the molar mass of O2.

For chlorine from chloride, n is two and M is the molar mass of Cl2. Choose n from the balanced half-reaction, not from the charge of an unrelated spectator ion. Zero current or zero time is allowed and returns zero grams, which is the honest idle-cell result.

Where this electrolysis calculation pays off

Plating shops and teaching labs use an electrolysis calculator so a planned current and run time turn into grams of silver, copper, nickel, or zinc before the bath is committed. Water-splitting and chlor-alkali notebooks need the same Faraday identity for hydrogen, oxygen, and chlorine mass evolved at a given ampere-hour budget, without pulling a full computer-algebra system for four numbers.

Exam-prep generators need a deterministic oracle that marks wrong a negative current or a negative duration instead of silently returning a signed mass that a buggy grader might treat as success. Failed validation does not consume balance. Keep requests inside ordinary lab ranges—microamp sensors through industrial baths, seconds through multi-hour runs—and prefer classroom-scale numbers for grading oracles.

Authors shipping SDKs can map mass and charge directly into UI tables that mirror the worked example students write on paper when they apply Faraday's law by hand.

Electroplating mass estimates

Convert a planned current and run time into grams of silver, copper, or nickel before committing bath chemistry, using n from the metal half-reaction.

Evolved gas from water splitting

Estimate grams of hydrogen or oxygen evolved for a given ampere-hour budget in lab-scale electrolysis or chlor-alkali sketches.

Classroom Faraday drills

Let students submit I, t, M, and n and check the gram result, with a hard error when current or time is negative.

How do I calculate the mass deposited or the gas evolved during electrolysis?

The response includes mass in grams via m = (I·t·M)/(n·F).

What happens if current or time is negative?

A negative ampere reading or a negative duration is not a physical electrolysis interval and is not billed.

Does the same formula cover evolved gases as well as plated metal?

Yes. Faraday's first law applies to any half-reaction product. Use n and M for H2, O2, or Cl2 just as you would for Ag, Cu, or Al.

Is the electrolysis calculator free?

The browser tool runs free on your device.

Which electron count n should I use?

Take it from the balanced half-reaction: 1 for silver from Ag+, 2 for copper(II), hydrogen and chlorine, and 4 for oxygen from water. Never use the charge of an unrelated spectator ion.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/chem/electrolysis

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/chem/electrolysis \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"current":0.8,"time":7200,"molar_mass":107.8682,"electrons":1}'
{
  "current": 0.8,
  "time": 7200,
  "molar_mass": 107.8682,
  "electrons": 1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.electrolysis",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Negative current or negative time is rejected as invalid_input because a reverse ampere reading or a negative duration is not a physical run.

Faraday's first law for plated metal and evolved gas

Send current, time, molar_mass, and electrons as finite numbers. Current and time must not be negative: a negative ampere value or a negative duration is not a physical electrolysis interval, and the engine answers invalid_input rather than a signed mass that would confuse plating reports. Identical inputs always produce identical JSON because the path is pure arithmetic with no network, no random seed, and no wall clock.

Input contract, errors, and the gram result

Molar mass must be positive so the gram scale stays meaningful. Zero electrons fail because the n F denominator is undefined and the engine never returns Infinity or NaN. POST a JSON body with four required finite numbers: current, the electrolysis current I in amperes; time, the run duration t in seconds; molar_mass, the molar mass M of the deposited species or evolved gas in grams per mole; and electrons, the number n of electrons transferred per formula unit. Each field may arrive as a JSON number or as a numeric string; aliases such as I, t, M, n, amperes, seconds, molecular_weight, and valence are accepted so laboratory code can speak everyday English. Missing fields, empty strings, and non-finite values fail with invalid_input naming the field. The primary result is mass in grams of deposit or evolved gas. charge reports the total charge passed as current times time in coulombs, which is the Q that appears in many textbooks before converting to moles of electrons. faraday_constant documents the exact SI Faraday constant used, and formula is always the string m equals open parenthesis I times t times M close parenthesis over open parenthesis n times F close parenthesis. Pair the gram figure with your own current-efficiency factor if side reactions waste charge; this endpoint assumes one hundred percent faradaic yield at constant current and does not emit plots or step-by-step prose beyond the formula field.

Where an electrolysis mass API earns its keep

Use the prepaid API when a tutoring platform, process-control sandbox, curriculum generator, or electroplating pipeline needs a stable contract under KIT balance; use the in-browser tool for homework checks and lecture demos without installing a spreadsheet.

Which Faraday constant does the calculator use?

The exact 2019 SI value F = e·N_A, the product of the elementary charge and the Avogadro constant, returned as faraday_constant in C/mol.

Read the full KIT documentation →