Capacitor code calculator: what 104, 473 and 2A104J mean
Type the code printed on a capacitor, such as 104, 473J or 2A104J, and get the value in pF, nF and µF with the tolerance and voltage. Works both ways.
Most small capacitors have no room for their value in full, so they carry a short code instead. 104 means 100,000 pF, which is 100 nF or 0.1 µF. Type the code from your capacitor into the calculator below to get the value in picofarads (pF), nanofarads (nF) and microfarads (µF), with the tolerance and the voltage when the marking includes them. It also works the other way: enter a value to see the code to look for.
The capacitor code calculator needs JavaScript switched on in your browser.
How the three-digit code works
The first two digits are the value and the third digit is the number of zeros to add. The answer is always in picofarads. So 104 is 10 followed by four zeros: 100,000 pF. Divide by 1,000 for nanofarads (100 nF) and by 1,000,000 for microfarads (0.1 µF).
Two third digits work differently. A 9 means multiply by 0.1 and an 8 means multiply by 0.01, which is how values under 10 pF are written: 229 is 2.2 pF and 508 is 0.5 pF. A number with only one or two digits, such as 47, is simply the value in picofarads.
A common mistake is to read the code as the value. A capacitor marked 100 is 10 pF (10 and no zeros), not 100 pF. A 100 pF capacitor is marked 101.
Common capacitor codes
| Code | Picofarads | Nanofarads | Microfarads |
|---|---|---|---|
| 100 | 10 pF | 0.01 nF | 0.00001 µF |
| 220 | 22 pF | 0.022 nF | 0.000022 µF |
| 470 | 47 pF | 0.047 nF | 0.000047 µF |
| 101 | 100 pF | 0.1 nF | 0.0001 µF |
| 221 | 220 pF | 0.22 nF | 0.00022 µF |
| 331 | 330 pF | 0.33 nF | 0.00033 µF |
| 471 | 470 pF | 0.47 nF | 0.00047 µF |
| 102 | 1,000 pF | 1 nF | 0.001 µF |
| 222 | 2,200 pF | 2.2 nF | 0.0022 µF |
| 332 | 3,300 pF | 3.3 nF | 0.0033 µF |
| 472 | 4,700 pF | 4.7 nF | 0.0047 µF |
| 103 | 10,000 pF | 10 nF | 0.01 µF |
| 223 | 22,000 pF | 22 nF | 0.022 µF |
| 333 | 33,000 pF | 33 nF | 0.033 µF |
| 473 | 47,000 pF | 47 nF | 0.047 µF |
| 104 | 100,000 pF | 100 nF | 0.1 µF |
| 224 | 220,000 pF | 220 nF | 0.22 µF |
| 474 | 470,000 pF | 470 nF | 0.47 µF |
| 105 | 1,000,000 pF | 1,000 nF | 1 µF |
Codes with a letter in the middle, such as 4n7
Some capacitors, especially film capacitors, use the unit letter as the decimal point: p for picofarads, n for nanofarads and µ (or u) for microfarads. So 4n7 is 4.7 nF, n47 is 0.47 nF (470 pF), 10n is 10 nF and 2µ2 is 2.2 µF. This system comes from the international standard IEC 60062. With no decimal point to get lost in printing, 4.7 cannot be misread as 47.
Tolerance letters
A letter after the code gives the tolerance: how far the real value may be from the marked value.
| Letter | Tolerance |
|---|---|
| B | ±0.1 pF |
| C | ±0.25 pF |
| D | ±0.5 pF |
| F | ±1% |
| G | ±2% |
| H | ±2.5% |
| J | ±5% |
| K | ±10% |
| M | ±20% |
| Z | +80% / −20% |
B, C and D are given in picofarads, so they only appear on very small values. So 473J is 47 nF within 5%, and 104K is 100 nF within 10%.
Voltage codes, such as 2A in 2A104J
Film capacitors and some others put a two-character voltage code in front of the value. It gives the highest voltage the capacitor is rated for, so choose one rated above the highest voltage in your circuit. The most common codes are:
| Code | Voltage | Code | Voltage |
|---|---|---|---|
| 0J | 6.3 V | 1J | 63 V |
| 1A | 10 V | 2A | 100 V |
| 1C | 16 V | 2D | 200 V |
| 1E | 25 V | 2E | 250 V |
| 1V | 35 V | 2G | 400 V |
| 1H | 50 V | 2J | 630 V |
The calculator knows the full list, from 0E (2.5 V) to 3A (1,000 V). Put together, 2A104J is 2A (100 V), 104 (100 nF) and J (±5%): a 100 nF capacitor rated at 100 V and within 5% of its marked value. Some capacitors print the voltage in full instead, for example 104J 100V; the calculator reads that too.
Electrolytic capacitors
Electrolytic capacitors are large enough for the value to be printed in full, in microfarads, with the voltage: for example 100µF 25V. They are polarised. A stripe along the can, marked with minus signs, shows the negative lead, and on a new capacitor the positive lead is usually the longer one. Connected the wrong way round, an electrolytic capacitor can fail with a bang and a swollen or burst top, so check the stripe before you solder it.
pF, nF and µF
1 nF = 1,000 pF, and 1 µF = 1,000 nF = 1,000,000 pF. Parts lists use all three units, so the same capacitor can appear as 10,000 pF, 10 nF or 0.01 µF. The calculator shows all three for every value. For what capacitors do in a circuit, and how to combine them in series and parallel, read capacitors: what they are and how they work.
Questions people ask
What does 104 mean on a capacitor?
100,000 pF, which is 100 nF or 0.1 µF. The first two digits (10) are the value and the third (4) is the number of zeros, in picofarads.
Is 104 the same as 0.1 µF?
Yes. 104 is 100,000 pF, and 100,000 pF is 0.1 µF (or 100 nF).
What does the letter after the number mean?
It is the tolerance. J means the real value is within 5% of the marked value, K within 10% and M within 20%. A letter and digit in front of the number, such as 2A, is the voltage code.
More for electronics: the LED resistor calculator, what resistors are and how they work, and the other free tools.
Sources: KEMET ceramic capacitor datasheet (the capacitance code, the 8 and 9 rule, tolerance letters); Nichicon, part numbering (voltage codes); TDK, marking and ordering code system for film capacitors (codes such as 10n and 1µ5, tolerance H); RKM code (Wikipedia: the letter in place of the decimal point, IEC 60062); Elcircuits, reading polyester and ceramic capacitor codes (the 2A104J example, 630 V and 1,000 V codes); Electronics2000, capacitor markings; SparkFun, polarity of electrolytic capacitors. Every value in the tables was worked out with the calculator’s own code and checked with tests.
Use this calculator on your own site
You are welcome to use this calculator on your own website. Copy the code below into a Custom HTML block in WordPress, or into any web page. It needs no other files. We only ask that you keep the link to Braindumps at the bottom.
<!-- Braindumps capacitor code calculator: reads codes such as 104, 473J, 2A104J and 4n7, and finds the code for a value. Self-contained: no external files. -->
<div id="bd-capc">
<style>
#bd-capc{--bd-red:#d63333;--bd-line:rgba(127,127,127,.35);--bd-soft:rgba(127,127,127,.08);font:inherit;color:inherit;max-width:760px;margin:1.5em 0}
#bd-capc *{box-sizing:border-box}
#bd-capc [hidden]{display:none!important}
#bd-capc fieldset{border:1px solid var(--bd-line);border-radius:10px;padding:14px 16px 6px;margin:0 0 14px;min-width:0}
#bd-capc legend{font-weight:700;padding:0 6px}
#bd-capc .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0 14px}
#bd-capc label{display:block;font-size:.92em;margin-bottom:10px}
#bd-capc input,#bd-capc select{width:100%;padding:9px 10px;margin-top:4px;border:1px solid var(--bd-line);border-radius:6px;font:inherit;background:transparent;color:inherit}
#bd-capc #bd-capc-code{font-size:1.25em;letter-spacing:.04em;text-transform:none}
#bd-capc select option{color:#000;background:#fff}
#bd-capc .chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
#bd-capc .chips button{padding:5px 12px;border:1px solid var(--bd-line);border-radius:999px;background:transparent;color:inherit;font:inherit;font-size:.9em;cursor:pointer}
#bd-capc .chips button:hover{border-color:var(--bd-red)}
#bd-capc .result{border:2px solid var(--bd-red);border-radius:10px;padding:12px 16px;background:var(--bd-soft);margin:0 0 14px}
#bd-capc .big{font-size:1.6em;font-weight:700;margin:0 0 4px}
#bd-capc table{width:100%;border-collapse:collapse;margin:8px 0 0}
#bd-capc td{padding:6px 0;border-bottom:1px solid var(--bd-line)}
#bd-capc td:last-child{text-align:right;font-variant-numeric:tabular-nums;font-weight:700}
#bd-capc .warn{margin:10px 0 0;padding:8px 12px;border-left:4px solid var(--bd-red);background:var(--bd-soft);font-size:.92em}
#bd-capc details{margin-top:8px}
#bd-capc summary{cursor:pointer;font-weight:700}
#bd-capc pre{white-space:pre-wrap;font-size:.85em;margin:8px 0 0;background:transparent;border:0;padding:0}
</style>
<fieldset>
<legend>Read a code</legend>
<label>Code printed on the capacitor<input id="bd-capc-code" type="text" value="104" autocomplete="off" autocapitalize="off" spellcheck="false" placeholder="For example 104, 473J, 2A104J or 4n7"></label>
<div class="chips" aria-label="Example codes">
<button type="button" data-c="104">104</button><button type="button" data-c="473J">473J</button><button type="button" data-c="2A104J">2A104J</button><button type="button" data-c="4n7">4n7</button><button type="button" data-c="229">229</button><button type="button" data-c="106">106</button>
</div>
</fieldset>
<div class="result" aria-live="polite">
<p class="big" id="bd-capc-big"></p>
<table><tbody>
<tr><td>In picofarads</td><td id="bd-capc-pf"></td></tr>
<tr><td>In nanofarads</td><td id="bd-capc-nf"></td></tr>
<tr><td>In microfarads</td><td id="bd-capc-uf"></td></tr>
<tr><td>Tolerance</td><td id="bd-capc-tol"></td></tr>
<tr><td>Voltage rating</td><td id="bd-capc-volt"></td></tr>
</tbody></table>
<div class="warn" id="bd-capc-warn" hidden></div>
<details><summary>Show the working</summary><pre id="bd-capc-working"></pre></details>
</div>
<fieldset>
<legend>Find the code for a value</legend>
<div class="grid">
<label>Value<input id="bd-capc-val" type="number" min="0" step="any" value="4.7" inputmode="decimal"></label>
<label>Unit<select id="bd-capc-unit">
<option value="1">pF</option>
<option value="1000" selected>nF</option>
<option value="1000000">µF</option>
</select></label>
</div>
</fieldset>
<div class="result" aria-live="polite">
<p class="big" id="bd-capc-rbig"></p>
<table><tbody>
<tr><td>Three-digit code</td><td id="bd-capc-r3"></td></tr>
<tr><td>Letter code</td><td id="bd-capc-rl"></td></tr>
<tr><td>Same value in pF, nF and µF</td><td id="bd-capc-rall"></td></tr>
</tbody></table>
<div class="warn" id="bd-capc-rwarn" hidden></div>
</div>
<p class="bd-credit" style="font-size:.85em;opacity:.75;margin:10px 0 0">Capacitor code calculator by <a href="https://braindumps.co.uk/capacitor-code-calculator/">Braindumps.co.uk</a></p>
<script>
(function () {
"use strict";
/* BEGIN CALC */
// Tolerance letters: KEMET (B to G, J, K, M, Z) and TDK film capacitors (H).
var TOL = {
B: "±0.1 pF", C: "±0.25 pF", D: "±0.5 pF", F: "±1%", G: "±2%", H: "±2.5%",
J: "±5%", K: "±10%", M: "±20%", Z: "+80% / −20%"
};
// Voltage codes: Nichicon's rated voltage codes, with 2J and 3A as used on film capacitors.
var VOLT = {
"0E": 2.5, "0G": 4, "0L": 5.5, "0J": 6.3, "1A": 10, "1C": 16, "1D": 20, "1E": 25, "1V": 35, "1H": 50,
"1J": 63, "1K": 80, "2A": 100, "2Q": 110, "2B": 125, "2C": 160, "2Z": 180, "2D": 200, "2P": 220,
"2E": 250, "2F": 315, "2V": 350, "2G": 400, "2W": 450, "2H": 500, "2L": 550, "2X": 600, "2J": 630, "3A": 1000
};
var UNIT = { P: 1, N: 1000, U: 1e6 };
function clean(x) { return Number(x.toPrecision(12)); }
// Reads a marking. Returns {ok, pf, tol, volt, steps} or {ok:false, reason}.
function decode(text) {
var s = String(text || "").replace(/\s+/g, "").replace(/µ|μ/g, "U");
if (!s) { return { ok: false, reason: "empty" }; }
var steps = [], volt = null, tol = null, m;
// A voltage written out after the code, such as 104J 100V or 4n7 50V.
m = s.match(/(\d+(?:\.\d+)?)V$/i);
if (m && s.length > m[0].length) {
volt = parseFloat(m[1]);
s = s.replace(m[0], "");
steps.push(m[0].toUpperCase() + " = rated " + volt + " V");
}
// A two-character voltage code in front of a number code, such as 2A in 2A104J. It must be
// followed by two or three digits, so that letter codes such as 2p2 (2.2 pF) are not read as one.
m = s.toUpperCase().match(/^([0-3][A-Z])(\d{2,3}[A-Z]?)$/);
if (m && VOLT] !== undefined) {
volt = VOLT];
steps.push(m[1] + " = voltage code for " + volt + " V");
s = s.slice(2);
}
var up = s.toUpperCase();
// A tolerance letter at the end, such as J in 473J.
m = up.match(/^(.*\d)([BCDFGHJKMZ])$/);
if (m) {
tol = m[2];
up = m[1];
steps.push(tol + " = tolerance " + TOL[tol]);
}
var pf = null;
if ((m = up.match(/^(\d{3})$/))) {
var sig = parseInt(up.slice(0, 2), 10), d = parseInt(up[2], 10);
if (d === 9) {
pf = clean(sig * 0.1);
steps.unshift(up + ": " + sig + " × 0.1 = " + pf + " pF (a third digit of 9 means multiply by 0.1)");
} else if (d === 8) {
pf = clean(sig * 0.01);
steps.unshift(up + ": " + sig + " × 0.01 = " + pf + " pF (a third digit of 8 means multiply by 0.01)");
} else {
pf = clean(sig * Math.pow(10, d));
steps.unshift(up + ": " + sig + (d === 0 ? " with no zeros" : " followed by " + d + " zero" + (d === 1 ? "" : "s")) + " = " + fmtNum(pf) + " pF");
}
} else if ((m = up.match(/^(\d{1,2})$/))) {
pf = parseInt(m[1], 10);
steps.unshift(up + ": a number with only one or two digits is the value in picofarads = " + pf + " pF");
} else if ((m = up.match(/^(\d*)([PNU])(\d*)$/)) && (m[1] + m[3]).length > 0) {
var num = parseFloat((m[1] || "0") + "." + (m[3] || "0"));
pf = clean(num * UNIT]);
var unitName = m[2] === "P" ? "pF" : m[2] === "N" ? "nF" : "µF";
steps.unshift(text.replace(/\s+/g, "") + ": the letter stands for the unit (" + unitName + ") and sits where the decimal point goes, so " + num + " " + unitName);
} else if ((m = up.match(/^(\d+(?:\.\d+)?)(P|N|U)F$/))) {
pf = clean(parseFloat(m[1]) * UNIT]);
steps.unshift("Value written out: " + m[1] + " " + (m[2] === "P" ? "pF" : m[2] === "N" ? "nF" : "µF"));
} else if (/R/.test(up)) {
return { ok: false, reason: "r" };
} else {
return { ok: false, reason: "unknown" };
}
if (!(pf > 0)) { return { ok: false, reason: "unknown" }; }
return { ok: true, pf: pf, tol: tol, volt: volt, steps: steps };
}
// Finds the three-digit code and the letter code for a value in picofarads.
function encode(pf) {
if (!(pf > 0)) { return { ok: false, reason: "input" }; }
var out = { ok: true, pf: clean(pf), code: null, letter: null, why: "" };
var sig, d;
if (pf < 0.1 - 1e-12) {
out.why = "small";
} else if (pf < 1 - 1e-12) {
sig = Math.round(pf * 100); d = 8;
if (Math.abs(sig - pf * 100) > 1e-6 || sig < 10) { out.why = "figures"; } else { out.code = String(sig) + d; }
} else if (pf < 10 - 1e-12) {
sig = Math.round(pf * 10); d = 9;
if (Math.abs(sig - pf * 10) > 1e-6) { out.why = "figures"; } else { out.code = String(sig) + d; }
} else {
d = Math.floor(Math.log10(pf) + 1e-9) - 1;
sig = Math.round(pf / Math.pow(10, d));
if (sig >= 100) { sig = Math.round(sig / 10); d += 1; }
if (Math.abs(sig * Math.pow(10, d) - pf) > pf * 1e-9) { out.why = "figures"; }
else if (d > 7) { out.why = "large"; }
else { out.code = String(sig) + d; }
}
// Letter code: the unit letter takes the place of the decimal point (4n7 = 4.7 nF).
var units = [["p", 1], ["n", 1000], ["µ", 1e6]];
var u = pf >= 1e6 ? units[2] : pf >= 1000 ? units[1] : units[0];
var v = clean(pf / u[1]);
var parts = String(v).split(".");
if (parts[0].length + (parts[1] ? parts[1].length : 0) <= 3) {
out.letter = parts[1] ? (parts[0] === "0" ? "" : parts[0]) + u[0] + parts[1] : parts[0] + u[0];
}
return out;
}
function fmtNum(x) {
var s = String(clean(x));
if (/e/.test(s)) { return s; }
var p = s.split(".");
p[0] = p[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return p.join(".");
}
function inUnits(pf) {
return { pf: fmtNum(pf) + " pF", nf: fmtNum(pf / 1000) + " nF", uf: fmtNum(pf / 1e6) + " µF" };
}
function bestUnit(pf) {
if (pf >= 1e6) { return fmtNum(pf / 1e6) + " µF"; }
if (pf >= 1000) { return fmtNum(pf / 1000) + " nF"; }
return fmtNum(pf) + " pF";
}
/* END CALC */
function $(id) { return document.getElementById("bd-capc-" + id); }
function read() {
var r = decode($("code").value), warn = $("warn");
warn.hidden = true;
if (!r.ok) {
$("big").textContent = r.reason === "empty" ? "Type the code printed on the capacitor." : "That code was not recognised.";
["pf", "nf", "uf", "tol", "volt"].forEach(function (k) { $(k).textContent = "–"; });
$("working").textContent = "";
if (r.reason === "r") {
warn.textContent = "An R marks the decimal point (2R2 = 2.2). The unit depends on the part: µF on electrolytic capacitors, pF on small ceramic ones. Check the part's datasheet.";
warn.hidden = false;
} else if (r.reason === "unknown") {
warn.textContent = "Try the digits only (for example 104), a code with a letter for the unit (for example 4n7), or a full marking such as 2A104J.";
warn.hidden = false;
}
return;
}
var u = inUnits(r.pf);
$("big").textContent = bestUnit(r.pf) + (r.tol ? " " + TOL[r.tol] : "") + (r.volt ? ", " + r.volt + " V" : "");
$("pf").textContent = u.pf; $("nf").textContent = u.nf; $("uf").textContent = u.uf;
$("tol").textContent = r.tol ? TOL[r.tol] + " (" + r.tol + ")" : "not shown";
$("volt").textContent = r.volt ? r.volt + " V" : "not shown";
var msgs = [];
if (r.tol && "BCD".indexOf(r.tol) >= 0 && r.pf >= 10) { msgs.push("Letters B, C and D give the tolerance in picofarads and are normally used only on values under 10 pF. Check the reading."); }
if (r.pf >= 1e9) { msgs.push("That is 1,000 µF or more. Capacitors this large have their value printed in full: check the marking."); }
if (msgs.length) { warn.textContent = msgs.join(" "); warn.hidden = false; }
$("working").textContent = r.steps.join("\n") + "\n1 nF = 1,000 pF, and 1 µF = 1,000 nF = 1,000,000 pF.";
}
function find() {
var val = parseFloat($("val").value), mult = parseFloat($("unit").value), w = $("rwarn");
w.hidden = true;
var e = encode(val * mult);
if (!e.ok) {
$("rbig").textContent = "Type a value above zero.";
["r3", "rl", "rall"].forEach(function (k) { $(k).textContent = "–"; });
return;
}
$("r3").textContent = e.code || "none";
$("rl").textContent = e.letter || "none";
var u = inUnits(e.pf);
$("rall").textContent = u.pf + " = " + u.nf + " = " + u.uf;
$("rbig").textContent = e.code ? "Look for " + e.code + (e.letter ? " or " + e.letter : "") : "No three-digit code for this value";
if (!e.code) {
w.textContent = e.why === "figures" ? "A three-digit code holds two significant figures, so this value has no exact code. Standard capacitor values have two figures, for example 4.7 nF (472)."
: e.why === "large" ? "Values of 1,000 µF and more have no three-digit code: such capacitors have the value printed in full."
: "Values under 0.1 pF have no three-digit code.";
w.hidden = false;
}
}
$("code").addEventListener("input", read);
$("val").addEventListener("input", find);
$("unit").addEventListener("change", find);
Array.prototype.forEach.call(document.querySelectorAll("#bd-capc .chips button"), function (b) {
b.addEventListener("click", function () { $("code").value = b.getAttribute("data-c"); read(); });
});
read();
find();
})();
</script>
</div>