Here is the content for an page. This includes the HTML, CSS, and JavaScript for a fully functional tool, along with explanatory text for SEO and user guidance. File Name: conduit-size-calculator.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>Electrical Conduit Size Calculator | NEC Compliant Fill Chart</title> <meta name="description" content="Free NEC-based electrical conduit size calculator. Determine minimum conduit size (EMT, PVC, Rigid) for copper and aluminum wires. Supports THHN, THWN, XHHW."> <style> * box-sizing: border-box; body font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; background: #f0f4f8; margin: 0; padding: 20px; color: #1a2a3a; .container max-width: 1100px; margin: 0 auto; background: white; border-radius: 28px; box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15); overflow: hidden; padding: 20px 24px 40px 24px; h1 font-size: 1.9rem; margin-top: 0.2rem; margin-bottom: 0.2rem; color: #0b3b5f; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; h1 small font-size: 0.8rem; font-weight: normal; background: #e9ecef; padding: 4px 12px; border-radius: 40px; color: #2c3e50; .badge background: #1e5f7a; color: white; padding: 4px 12px; border-radius: 30px; font-size: 0.8rem; display: inline-block; .intro background: #eef2fa; padding: 16px 20px; border-radius: 24px; margin: 20px 0 24px 0; border-left: 5px solid #2c7da0; font-size: 1rem; line-height: 1.4; .calculator-grid display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; .input-panel flex: 1.2; min-width: 260px; background: #f9fbfd; padding: 20px; border-radius: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); .result-panel flex: 1; min-width: 260px; background: #ffffff; border-radius: 24px; padding: 20px; border: 1px solid #dce5ef; box-shadow: 0 6px 14px rgba(0,0,0,0.03); .form-group margin-bottom: 20px; label font-weight: 600; display: block; margin-bottom: 8px; font-size: 0.9rem; color: #1f5068; select, input width: 100%; padding: 12px 14px; font-size: 1rem; border: 1.5px solid #cbd5e1; border-radius: 18px; background: white; transition: 0.2s; font-family: inherit; select:focus, input:focus border-color: #2c7da0; outline: none; box-shadow: 0 0 0 3px rgba(44,125,160,0.2); .wire-entry background: #ffffff; border-radius: 20px; padding: 12px; margin-bottom: 12px; border: 1px solid #e2e8f0; .wire-header display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: bold; .wire-controls display: flex; gap: 10px; flex-wrap: wrap; .wire-controls select, .wire-controls input flex: 1; padding: 8px 10px; font-size: 0.85rem; .btn-remove background: #ffe6e5; border: none; border-radius: 40px; padding: 6px 12px; font-size: 0.75rem; font-weight: bold; cursor: pointer; color: #b91c1c; .btn-add background: #e2f0f5; border: none; border-radius: 40px; padding: 10px 16px; font-weight: 600; cursor: pointer; margin: 8px 0 12px 0; width: 100%; font-size: 0.9rem; color: #1f5e7a; button background: #2c7da0; color: white; border: none; border-radius: 40px; padding: 12px 20px; font-weight: bold; font-size: 1rem; cursor: pointer; width: 100%; transition: 0.2s; button:hover background: #1f5e7a; .result-card text-align: center; margin: 15px 0; .conduit-size-result background: #e6f4ea; border-radius: 60px; padding: 20px; font-size: 2rem; font-weight: 800; color: #166534; margin: 20px 0; border: 1px solid #b8e0c2; .warning background: #fff3e0; border-left: 6px solid #f4a261; padding: 12px; border-radius: 16px; font-size: 0.85rem; margin: 15px 0; .fill-percent font-size: 1.2rem; font-weight: 600; hr margin: 24px 0; border: none; border-top: 2px dotted #cbd5e1; .note font-size: 0.85rem; color: #4a627a; background: #f8fafc; padding: 16px; border-radius: 20px; table width: 100%; border-collapse: collapse; font-size: 0.8rem; th, td text-align: left; padding: 8px 6px; border-bottom: 1px solid #e2e8f0; @media (max-width: 700px) .container padding: 16px; .conduit-size-result font-size: 1.5rem; </style> </head> <body> <div class="container"> <h1> 📏 Electrical Conduit Size Calculator <small>NEC Chapter 9 Table 1 & 4</small> </h1> <div class="intro"> ✅ <strong>How it works:</strong> Enter your wire gauges (AWG or kcmil), insulation type (THHN, THWN, XHHW), and number of conductors. The tool calculates the total cross-sectional area, applies NEC fill rules (40% for >2 wires, 31% for 2 wires, 53% for 1 wire), and suggests the smallest standard trade size conduit (EMT, PVC, Rigid, IMC). </div> <div class="calculator-grid"> <div class="input-panel"> <div class="form-group"> <label>📌 Conduit Type (Material)</label> <select id="conduitType"> <option value="EMT">EMT (Electrical Metallic Tubing)</option> <option value="PVC">PVC Schedule 40</option> <option value="RIGID">Rigid Metal Conduit (RMC)</option> <option value="IMC">IMC (Intermediate Metal Conduit)</option> </select> </div> <div class="form-group"> <label>⚡ Wire / Conductor Setup</label> <div id="wiresContainer"></div> <button type="button" class="btn-add" id="addWireBtn">+ Add another conductor</button> </div> <div class="form-group"> <label>📐 Spare / Future capacity (%)</label> <input type="number" id="sparePercent" value="0" step="5" min="0" max="50">% <small style="display:block;">Adds extra fill capacity for future wires</small> </div> <button id="calculateBtn">🔧 Calculate Minimum Conduit Size</button> </div>
<div class="result-panel"> <h3 style="margin-top:0;">📊 Result</h3> <div class="result-card"> <div id="resultArea"> <div class="conduit-size-result" style="background:#f1f5f9; color:#2d3e50;"> -- / -- </div> <div id="fillDetails"></div> </div> </div> <div class="warning" id="warningMsg" style="display:none;"></div> <div class="note"> <strong>⚡ NEC Fill Reference (typical):</strong> <ul style="margin:8px 0 0 16px; padding-left:0;"> <li>1 conductor → 53% max fill</li> <li>2 conductors → 31% max fill</li> <li>3+ conductors → 40% max fill</li> </ul> <small>*Based on standard THHN/THWN area values. Actual conduit fill depends on insulation and jamming rules.</small> </div> </div> </div> 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> Here is the content for an page
function getFillPercentLimit(numWires) if (numWires === 1) return 0.53; if (numWires === 2) return 0.31; return 0.40; // 3+ wires Determine minimum conduit size (EMT, PVC, Rigid) for
// 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
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; ); );