Capacitor Parallel Calculator

for (let i = 1; i <= 10; i++) {
document.write(`

µF
nF
pF

`);
}


Capacitor Series Calculator

for (let i = 1; i <= 10; i++) {
document.write(`

µF
nF
pF

`);
}


function calculateParallelCapacitance() {
let total = 0;
for (let i = 1; i 0 ? `Equivalent Capacitance: ${formatCap(total)}` : “Please enter at least one capacitor.”;
}

function calculateSeriesCapacitance() {
let reciprocalSum = 0;
let validCount = 0;
for (let i = 1; i 0 ? 1 / reciprocalSum : 0;
document.getElementById(“seriesResult”).innerText =
validCount > 0 ? `Equivalent Capacitance: ${formatCap(total)}` : “Please enter at least one capacitor.”;
}

function formatCap(value) {
if (value >= 1e-6)
return (value / 1e-6).toFixed(3) + ” µF”;
else if (value >= 1e-9)
return (value / 1e-9).toFixed(3) + ” nF”;
else
return (value / 1e-12).toFixed(3) + ” pF”;
}


(adsbygoogle = window.adsbygoogle || []).push({});