Electrical Conduit Size — Calculator
let wireCount = 0; let wires = []; // store each wire object size, insulation
// initialization function init() wires.push( size: "12", insulation: "THHN" ); wires.push( size: "12", insulation: "THHN" ); renderWireInputs(); document.getElementById('addWireBtn').addEventListener('click', addWire); document.getElementById('calculateBtn').addEventListener('click', calculateConduit); calculateConduit(); // default calculation electrical conduit size calculator
<hr> <h3>📘 Conduit Fill Reference Table (for common wires)</h3> <div style="overflow-x:auto;"> <table> <thead> <tr><th>Wire Size (AWG/kcmil)</th><th>THHN/THWN Area (in²)</th><th>XHHW Area (in²)</th><th>Trade Size 3/4" EMT (40% fill max area)</th></tr> </thead> <tbody> <tr><td>14 AWG</td><td>0.0097</td><td>0.0123</td><td>0.213 in²</td></tr> <tr><td>12 AWG</td><td>0.0133</td><td>0.0160</td><td>0.213 in²</td></tr> <tr><td>10 AWG</td><td>0.0211</td><td>0.0243</td><td>0.213 in²</td></tr> <tr><td>8 AWG</td><td>0.0366</td><td>0.0410</td><td>0.213 in²</td></tr> <tr><td>6 AWG</td><td>0.0507</td><td>0.0590</td><td>0.346 in² (1" EMT)</td></tr> <tr><td>4 AWG</td><td>0.0824</td><td>0.0937</td><td>0.598 in² (1¼" EMT)</td></tr> </tbody> </table> <p class="note" style="margin-top:8px;">⚠️ Full NEC Chapter 9 Table 4 & 5 used in calculator logic for 1/2" to 4" conduit.</p> </div> </div> let wireCount = 0; let wires = [];
function renderWireInputs() const container = document.getElementById('wiresContainer'); if (!container) return; container.innerHTML = ''; wires.forEach((wire, idx) => const div = document.createElement('div'); div.className = 'wire-entry'; div.innerHTML = ` <div class="wire-header"> <span>🔌 Conductor #$idx+1</span> <button class="btn-remove" data-idx="$idx" type="button">Remove</button> </div> <div class="wire-controls"> <select class="wire-size" data-idx="$idx"> $Object.keys(wireAreas).map(sz => `<option value="$sz" $wire.size === sz ? 'selected' : ''>AWG $sz</option>`).join('') </select> <select class="wire-insulation" data-idx="$idx"> <option value="THHN" $wire.insulation === 'THHN' ? 'selected' : ''>THHN / THWN</option> <option value="XHHW" $wire.insulation === 'XHHW' ? 'selected' : ''>XHHW</option> </select> </div> `; container.appendChild(div); ); // attach remove events document.querySelectorAll('.btn-remove').forEach(btn => btn.addEventListener('click', (e) => const idx = parseInt(btn.getAttribute('data-idx')); wires.splice(idx, 1); renderWireInputs(); ); ); // attach change listeners for dynamic updates document.querySelectorAll('.wire-size').forEach(sel => sel.addEventListener('change', (e) => const idx = parseInt(sel.getAttribute('data-idx')); wires[idx].size = sel.value; ); ); document.querySelectorAll('.wire-insulation').forEach(sel => sel.addEventListener('change', (e) => const idx = parseInt(sel.getAttribute('data-idx')); wires[idx].insulation = sel.value; ); ); 'selected' : ''>
function addWire() wires.push( size: "12", insulation: "THHN" ); renderWireInputs();
const tradeSizes = ["1/2", "3/4", "1", "1 1/4", "1 1/2", "2", "2 1/2", "3", "3 1/2", "4"];
<script> // ---------- AREA DATABASE (sq inches) based on NEC Table 5 (THHN/THWN & XHHW approx) ---------- const wireAreas = // AWG sizes, compact "14": "THHN": 0.0097, "THWN": 0.0097, "XHHW": 0.0123 , "12": "THHN": 0.0133, "THWN": 0.0133, "XHHW": 0.0160 , "10": "THHN": 0.0211, "THWN": 0.0211, "XHHW": 0.0243 , "8": "THHN": 0.0366, "THWN": 0.0366, "XHHW": 0.0410 , "6": "THHN": 0.0507, "THWN": 0.0507, "XHHW": 0.0590 , "4": "THHN": 0.0824, "THWN": 0.0824, "XHHW": 0.0937 , "2": "THHN": 0.1158, "THWN": 0.1158, "XHHW": 0.1320 , "1": "THHN": 0.1562, "THWN": 0.1562, "XHHW": 0.1780 , "1/0": "THHN": 0.1855, "THWN": 0.1855, "XHHW": 0.2110 , "2/0": "THHN": 0.2223, "THWN": 0.2223, "XHHW": 0.2540 , "3/0": "THHN": 0.2679, "THWN": 0.2679, "XHHW": 0.3050 , "4/0": "THHN": 0.3195, "THWN": 0.3195, "XHHW": 0.3650 , "250": "THHN": 0.3970, "THWN": 0.3970, "XHHW": 0.4540 , "350": "THHN": 0.5242, "THWN": 0.5242, "XHHW": 0.6010 , "500": "THHN": 0.7073, "THWN": 0.7073, "XHHW": 0.8120 ;