Overview
Calculates conductor size and voltage drop for DC cable circuits per IEC 60364, IEC 60287, and AS/NZS 3008. Designed for solar PV string-to-inverter, battery-to-inverter, general DC distribution, critical loads, and motor circuit applications. The calculator determines the minimum conductor cross-sectional area based on both voltage drop and current-carrying capacity (ampacity), applying temperature, grouping, and installation method derating factors, then selects the larger of the two results as the final conductor size.
Input Parameters
System Parameters
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
system_voltage |
Number | 48 V | 1 – 2000 V | DC system nominal voltage |
continuous_current |
Number | 100 A | min 0.1 A | Maximum continuous operating current |
cable_length |
Number | 3 m | min 0.1 m | One-way cable length (source to load) |
max_voltage_drop_percent |
Number | 3% | 0.1 – 10% | Maximum acceptable voltage drop percentage |
safety_factor |
Number | 1.25 | 1.0 – 2.0 | Multiplier applied to continuous current to obtain design current |
application_type |
Enum | Battery to Inverter | — | Solar PV String to Inverter / Battery to Inverter / DC Distribution (General) / Critical Loads / Motor Circuits |
Cable & Installation Parameters
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
installation_method |
Enum | Open Air (Clipped Direct) | — | Open Air (Clipped Direct) / Enclosed in Conduit / Buried Direct in Ground / Cable Tray (Perforated) / Enclosed Trunking |
insulation_type |
Enum | XLPE | — | PVC / XLPE / EPR / Silicone |
conductor_temp_rating |
Enum | 75 °C | — | Maximum conductor temperature rating: 75 °C or 90 °C |
conductor_operating_temp |
Number | 70 °C | 20 – 90 °C | Assumed conductor operating temperature for resistance calculation |
ambient_temperature |
Number | 30 °C | −20 – 80 °C | Ambient temperature at installation location |
num_grouped_circuits |
Integer | 1 | 1 – 20 | Number of circuits bundled together (affects grouping derating) |
Output Results
| Output | Unit | Description |
|---|---|---|
design_current_a |
A | Design current after applying safety factor \(I_{design} = I \times k_s\) |
min_size_voltage_drop_mm2 |
mm² | Minimum conductor CSA required to meet voltage drop limit |
selected_conductor_size_mm2 |
mm² | Final selected standard conductor size (larger of VD and ampacity requirements) |
actual_voltage_drop_volts |
V | Actual voltage drop with selected conductor |
actual_voltage_drop_percent |
% | Actual voltage drop as percentage of system voltage |
voltage_drop_margin_percent |
% | Margin between actual and maximum allowable voltage drop |
temperature_correction_factor |
— | Temperature derating factor \(C_t\) |
grouping_correction_factor |
— | Grouping derating factor \(C_g\) |
installation_method_factor |
— | Installation method correction factor \(C_c\) |
combined_derating_factor |
— | Combined derating \(C_t \times C_g \times C_c\) |
tabulated_ampacity_a |
A | Base tabulated ampacity for selected conductor |
adjusted_ampacity_a |
A | Ampacity after applying all derating factors |
ampacity_margin_percent |
% | Percentage margin between adjusted ampacity and design current |
current_loading_percent |
% | Design current as percentage of adjusted ampacity |
conductor_resistance_ohm_per_km |
Ω/km | Conductor resistance at operating temperature |
copper_resistivity_operating |
Ω·mm²/m | Copper resistivity at operating temperature |
power_loss_w |
W | Power dissipated in the cable |
power_loss_percent |
% | Power loss as percentage of delivered power |
voltage_drop_compliant |
Boolean | Whether voltage drop is within the limit |
ampacity_compliant |
Boolean | Whether adjusted ampacity exceeds design current |
overall_compliant |
Boolean | Both voltage drop and ampacity requirements met |
Formulas
Design Current
Where \(I_{continuous}\) is the maximum continuous operating current (A) and \(k_s\) is the safety factor (default 1.25).
Resistivity at Operating Temperature
Where \(\rho_{20} = 0.017241\) Ω·mm²/m (copper at 20 °C) and \(\alpha = 0.00393\) /°C. This adjusts resistivity from the reference temperature of 20 °C to the actual conductor operating temperature.
Minimum Conductor CSA from Voltage Drop
Where the factor of 2 accounts for both positive and negative conductors in a DC circuit, \(L\) is one-way cable length in metres, and \(V_{drop,max} = V_{system} \times V_{d\%,max} / 100\).
Conductor Resistance per Kilometre
Where \(A\) is the conductor cross-sectional area in mm².
Actual Voltage Drop
Where \(L\) is one-way cable length in metres. Division by 1000 converts the length–resistance product from m·Ω/km to Ω.
Voltage Drop Percentage
Temperature Correction Factor
Where \(T_{max}\) is the conductor temperature rating (75 or 90 °C), \(T_{ref} = 30\) °C is the reference ambient temperature, and \(T_{ambient}\) is the actual ambient temperature. Per IEC 60287.
Grouping Correction Factor
\(C_g\) is read from a lookup table based on the number of grouped circuits and whether the installation is enclosed or open air:
| Circuits | Enclosed | Open Air |
|---|---|---|
| 1 | 1.00 | 1.00 |
| 2 | 0.80 | 0.88 |
| 3 | 0.70 | 0.82 |
| 4 – 6 | 0.65 | 0.77 |
| 7 – 9 | 0.60 | 0.73 |
| 10 – 20 | 0.50 | 0.68 |
Installation Method Correction Factor
| Method | \(C_c\) |
|---|---|
| Open Air (Clipped Direct) | 1.00 |
| Cable Tray (Perforated) | 0.95 |
| Buried Direct in Ground | 0.90 |
| Enclosed in Conduit | 0.80 |
| Enclosed Trunking | 0.75 |
Adjusted Ampacity
The design current must not exceed the adjusted ampacity: \(I_{design} \leq I_{adjusted}\).
Final Conductor Selection
The selected conductor is the larger of the size required for voltage drop compliance and the size required for ampacity compliance, rounded up to the next standard size.
Power Loss
Power dissipated as heat in the cable conductors (watts).
Ampacity Table — Copper 75 °C (Reference: 30 °C Ambient, Single Circuit)
| CSA (mm²) | Enclosed (A) | Open Air (A) |
|---|---|---|
| 1.0 | 13.5 | 17 |
| 1.5 | 17.5 | 22 |
| 2.5 | 24 | 30 |
| 4 | 32 | 40 |
| 6 | 41 | 51 |
| 10 | 57 | 70 |
| 16 | 76 | 94 |
| 25 | 101 | 119 |
| 35 | 125 | 148 |
| 50 | 151 | 180 |
| 70 | 192 | 232 |
| 95 | 232 | 282 |
| 120 | 269 | 328 |
| 150 | 309 | 379 |
| 185 | 353 | 434 |
| 240 | 415 | 514 |
| 300 | 477 | 593 |
| 400 | 542 | 674 |
| 500 | 621 | 772 |
| 630 | 716 | 891 |
Worked Examples
The 3 examples below are the validation cases for this calculation. Each one was produced by the calculation engine from the inputs shown, every figure was checked against the independent reference quoted at the end of the example, and the same cases are run against every engine build (see validation scorecard, tool fe_calc_cable_size; worked examples for every calculation).
| # | Case | Cable | Idesign (A) | Iadjusted (A) | Vd (%) | Governing | Result |
|---|---|---|---|---|---|---|---|
| 1 | 48 V battery to inverter, 100 A over 3 m, PVC | 35 mm² Cu PVC | 125.0 | 140.6 | 0.92 | current-carrying capacity | PASS |
| 2 | 600 V DC 30 kW in conduit, three grouped circuits at 40 °C | 35 mm² Cu XLPE | 62.5 | 73.5 | 0.61 | current-carrying capacity | PASS |
| 3 | 24 V solar array, 20 A over 15 m: voltage drop governs | 25 mm² Cu XLPE | 25.0 | 136.8 | 2.58 | voltage drop | PASS |
Example 1 — 48 V battery to inverter, 100 A over 3 m, PVC
Short, heavy DC run: voltage drop needs only 10.7 mm² but the derated ampacity for the 125 A design current needs 35 mm².
Given: 48 V DC, continuous current 100 A, route 3 m one way; copper PVC (75 °C) installed unenclosed (engine method “Cable Tray (Perforated)”), 1 circuit, ambient 30 °C (default), safety factor 1.25 (default), voltage-drop limit 3 % (default), conductor resistance at 70 °C (engine default).
| Design current | I = 100.00 A (given); Idesign = 100.00 × 1.25 = 125.00 A |
|---|---|
| Voltage-drop minimum | Vdrop,max = 3 / 100 × 48 = 1.440 V; ρ(70 °C) = 0.017241 × (1 + 0.00393 × 50) = 0.020629 Ω·mm²/m; Amin = 2 × 0.020629 × 125.00 × 3 / 1.440 = 10.74 mm² → next standard size 16 mm² |
| Derating | Ct = √((75 − 30) / (75 − 30)) = 1.000; Cg = 1.00 (1 circuit, open air); Cc = 0.95 (Cable Tray (Perforated)); F = 1.000 × 1.00 × 0.95 = 0.9500 |
| Ampacity | Itab,req = 125.00 / 0.9500 = 131.6 A; first size ≥ 16 mm² with a tabulated rating above it: 35 mm² (open-air column 148.0 A = 148.00 A). Iadjusted = 148.00 × 0.9500 = 140.60 A vs Idesign 125.00 A (loading 88.9 %) PASS |
| Voltage drop | Rc = 0.020629 × 1000 / 35 = 0.5894 Ω/km; Vd = 2 × 125.00 × 0.5894 × 3 / 1000 = 0.442 V = 0.921 % of 48 V, limit 3 % PASS |
| Power loss | Ploss = 0.442 × 125.00 = 55.3 W |
| Result | 2/2 checks pass → PASS; 35 mm² copper; power loss 55.3 W; governing: current carrying capacity. DC engine: voltage drop is calculated at the design current (load × safety factor), which is conservative; no short-circuit or earth-fault checks are made. |
| Reference | calcs/test_c0019 TestDefaultParameters (48 V, 100 A, 3 m, 75 °C → 35 mm²); hand: design 1.25 × 100 = 125 A; ρ70 = 0.017241 × (1 + 0.00393 × 50) = 0.020629 Ω·mm²/m; ΔV = 2 × 125 × 0.020629 × 3 / 35 = 0.442 V = 0.921 %. (validation case c0019-48v-100a-3m-pvc) |
Example 2 — 600 V DC 30 kW in conduit, three grouped circuits at 40 °C
Temperature, grouping and conduit factors multiply to 0.51, so ampacity sets 35 mm² although voltage drop would allow 10 mm².
Given: 600 V DC, load 30 kW, route 50 m one way; copper XLPE (90 °C) installed conduit (engine method “Enclosed in Conduit”), 3 circuits, ambient 40 °C, safety factor 1.25 (default), voltage-drop limit 3 % (default), conductor resistance at 70 °C (engine default).
| Design current | I = 30 kW × 1000 / 600 V = 50.00 A; Idesign = 50.00 × 1.25 = 62.50 A |
|---|---|
| Voltage-drop minimum | Vdrop,max = 3 / 100 × 600 = 18.000 V; ρ(70 °C) = 0.017241 × (1 + 0.00393 × 50) = 0.020629 Ω·mm²/m; Amin = 2 × 0.020629 × 62.50 × 50 / 18.000 = 7.16 mm² → next standard size 10 mm² |
| Derating | Ct = √((90 − 40) / (90 − 30)) = 0.9129; Cg = 0.70 (3 circuits, enclosed); Cc = 0.80 (Enclosed in Conduit); F = 0.9129 × 0.70 × 0.80 = 0.5112 |
| Ampacity | Itab,req = 62.50 / 0.5112 = 122.3 A; first size ≥ 10 mm² with a tabulated rating above it: 35 mm² (enclosed column 125.0 A × 1.15 (90 °C) = 143.75 A). Iadjusted = 143.75 × 0.5112 = 73.49 A vs Idesign 62.50 A (loading 85.1 %) PASS |
| Voltage drop | Rc = 0.020629 × 1000 / 35 = 0.5894 Ω/km; Vd = 2 × 62.50 × 0.5894 × 50 / 1000 = 3.684 V = 0.614 % of 600 V, limit 3 % PASS |
| Power loss | Ploss = 3.684 × 62.50 = 230.2 W |
| Result | 2/2 checks pass → PASS; 35 mm² copper; power loss 230.2 W; governing: current carrying capacity. DC engine: voltage drop is calculated at the design current (load × safety factor), which is conservative; no short-circuit or earth-fault checks are made. |
| Reference | Hand calculation on the DC engine's method (calcs/test_c0019 factor tests): I = 30 kW / 600 V = 50 A, design 62.5 A; Ct = √((90−40)/(90−30)) = 0.9129, Cg = 0.70 (3 enclosed circuits), Cc = 0.80 (conduit); 25 mm² gives 101 × 1.15 × 0.5112 = 59.4 A < 62.5 A, 35 mm² gives 125 × 1.15 × 0.5112 = 73.49 A; ΔV = 2 × 62.5 × 0.589 Ω/km × 0.05 km = 3.68 V = 0.614 %. (validation case c0019-600v-30kw-conduit-grouped) |
Example 3 — 24 V solar array, 20 A over 15 m: voltage drop governs
Low-voltage DC: the 3 % limit is only 0.72 V, so 25 mm² is set by voltage drop while the open-air ampacity is barely used.
Given: 24 V DC, continuous current 20 A, route 15 m one way; copper XLPE (90 °C) installed unenclosed (engine method “Open Air (Clipped Direct)”), 1 circuit, ambient 30 °C (default), safety factor 1.25 (default), voltage-drop limit 3 % (default), conductor resistance at 70 °C (engine default).
| Design current | I = 20.00 A (given); Idesign = 20.00 × 1.25 = 25.00 A |
|---|---|
| Voltage-drop minimum | Vdrop,max = 3 / 100 × 24 = 0.720 V; ρ(70 °C) = 0.017241 × (1 + 0.00393 × 50) = 0.020629 Ω·mm²/m; Amin = 2 × 0.020629 × 25.00 × 15 / 0.720 = 21.49 mm² → next standard size 25 mm² |
| Derating | Ct = √((90 − 30) / (90 − 30)) = 1.000; Cg = 1.00 (1 circuit, open air); Cc = 1.00 (Open Air (Clipped Direct)); F = 1.000 × 1.00 × 1.00 = 1.000 |
| Ampacity | Itab,req = 25.00 / 1.000 = 25.0 A; first size ≥ 25 mm² with a tabulated rating above it: 25 mm² (open-air column 119.0 A × 1.15 (90 °C) = 136.85 A). Iadjusted = 136.85 × 1.000 = 136.85 A vs Idesign 25.00 A (loading 18.3 %) PASS |
| Voltage drop | Rc = 0.020629 × 1000 / 25 = 0.8252 Ω/km; Vd = 2 × 25.00 × 0.8252 × 15 / 1000 = 0.619 V = 2.579 % of 24 V, limit 3 % PASS |
| Power loss | Ploss = 0.619 × 25.00 = 15.5 W |
| Result | 2/2 checks pass → PASS; 25 mm² copper; power loss 15.5 W; governing: voltage drop. DC engine: voltage drop is calculated at the design current (load × safety factor), which is conservative; no short-circuit or earth-fault checks are made. |
| Reference | Hand calculation on the DC engine's method (help page Formulas): design 1.25 × 20 = 25 A; ρ70 = 0.017241 × (1 + 0.00393 × 50) = 0.020629 Ω·mm²/m; Vmax = 0.03 × 24 = 0.72 V; Amin = 2 × 0.020629 × 25 × 15 / 0.72 = 21.49 mm² → 25 mm²; Rc = 0.020629 × 1000 / 25 = 0.8252 Ω/km; ΔV = 2 × 25 × 0.8252 × 15 / 1000 = 0.619 V = 2.579 %; ampacity 119 A (open air, 25 mm²) × 1.15 (90 °C) × Ct 1.00 × Cg 1.00 × Cc 1.00 = 136.85 A ≥ 25 A. (validation case c0019-24v-solar-20a-15m-vd) |
Standards & References
- AS/NZS 3008.1.1:2017 — Electrical installations — Selection of cables — Cables for alternating voltages up to and including 0.6/1 kV (ampacity tables and derating factors)
- IEC 60364-5-52 — Low-voltage electrical installations — Selection and erection of electrical equipment — Wiring systems
- IEC 60287 — Electric cables — Calculation of the current rating (temperature correction factor formula)
- AS/NZS 5033 — Installation and safety requirements for photovoltaic (PV) arrays (solar-specific voltage drop limits)
- IEC 62548 — Photovoltaic (PV) arrays — Design requirements
- Standard conductor sizes per IEC 60228: 1.0, 1.5, 2.5, 4, 6, 10, 16, 25, 35, 50, 70, 95, 120, 150, 185, 240, 300, 400, 500, 630 mm²
Tips & Limitations
Tips
- Low-voltage DC systems (12 V, 24 V, 48 V) are highly sensitive to voltage drop — even short runs may require large conductors.
- The default safety factor of 1.25 is standard practice for continuous DC loads per NEC 210.19 and AS/NZS 3000.
- For solar PV, a 2% voltage drop limit from string to inverter is common best practice; for battery systems, 3% is typical.
- DC circuits have no reactance component, so voltage drop depends only on resistance — this makes temperature a significant factor.
- When ampacity governs the selection (common at low voltages), the actual voltage drop will be well below the limit.
- For currents exceeding the largest single conductor (630 mm²), consider parallel conductors — the calculator provides recommendations in the warnings.
- A 90 °C conductor rating provides approximately 15% more ampacity than 75 °C for the same conductor size.
Limitations
- Copper only — aluminium conductors are not currently supported. For aluminium, resistivity is approximately 1.6× that of copper.
- Steady-state only — fault current withstand and short-circuit sizing are not considered. Use a separate short-circuit calculator for protective device coordination.
- No harmonic derating — DC circuits do not have harmonics, but if the DC source contains ripple (e.g., rectified AC), additional derating may be required.
- Single cable pair — parallel conductor sizing is calculated as a recommendation only, not a full parallel circuit analysis.
- Temperature correction factor is clamped between 0.1 and 1.5 — extreme ambient temperatures outside −20 to 80 °C are not supported.
- Operating temperature must not exceed the conductor rating, and ambient temperature must not exceed the operating temperature. The calculator will reject invalid combinations.
Developer Guide
Architecture
File layout:
components/c0019_dc_cable_sizing/component.py— Component registration, parameter schema, SVG diagram generator, QR code generatorcomponents/c0019_dc_cable_sizing/calculations.py— Pure calculation functions, constants, ampacity lookup tables (no Django dependencies)components/c0019_dc_cable_sizing/equations.py— MathJax equation builders for PDF/HTML rendering (unified articles pattern)components/c0019_dc_cable_sizing/excel_generator.py— Excel report generator (openpyxl workbook)
The calculator class is DCCableSizingCalculator,
extending ElectricalCalculator. It validates parameters
then delegates to the pure function
calculate_dc_cable_sizing(data).
Constants:
COPPER_RESISTIVITY_20C = 0.017241Ω·mm²/mCOPPER_TEMP_COEFFICIENT = 0.00393/°CSTANDARD_CONDUCTOR_SIZES— 20 sizes from 1.0 to 630 mm²AMPACITY_TABLE_75C— enclosed and open-air ratings for each standard size
Registered as:
calc_type='dc_cable_sizing'
Code Paths
Key functions in calculations.py:
| Function | Purpose |
|---|---|
calculate_dc_cable_sizing(data) |
Main entry point — orchestrates the full sizing workflow and returns results dict |
calculate_resistivity_at_temp(temperature) |
Copper resistivity adjusted to operating temperature |
calculate_resistance_per_km(conductor_size_mm2, temperature) |
Conductor resistance in Ω/km |
calculate_voltage_drop(current, resistance_per_km, length_m) |
DC voltage drop for two-conductor circuit |
get_temperature_correction_factor(ambient_temp, conductor_rating) |
Temperature derating factor \(C_t\) per IEC 60287 |
get_grouping_correction_factor(num_circuits, installation_method) |
Grouping derating factor \(C_g\) |
get_installation_method_factor(installation_method) |
Installation method correction factor \(C_c\) |
get_tabulated_ampacity(conductor_size_mm2, installation_method, conductor_rating) |
Lookup base ampacity from table (with 90 °C adjustment) |
find_next_standard_size(calculated_size_mm2) |
Round up to next standard conductor size |
calculate_parallel_conductors(design_current, max_single_conductor_size) |
Parallel conductor recommendation for high currents |
Key functions in component.py:
| Function | Purpose |
|---|---|
DCCableSizingCalculator.validate_parameters() |
Validates voltage, current, length, VD%, and temperature constraints |
DCCableSizingCalculator.calculate() |
Prepares data dict and delegates to pure calculation function |
generate_cable_sizing_diagram_svg(parameters, results) |
SVG visualisation of voltage drop and current capacity bars |
Calculation flow (10 steps):
- Design current = continuous current × safety factor
- Max voltage drop in volts = VD% × system voltage / 100
- Resistivity at operating temperature
- Minimum CSA from voltage drop formula
- Round up to next standard size
- Calculate derating factors: \(C_t\), \(C_g\), \(C_c\)
- Required tabulated ampacity = design current / combined derating
- Find smallest standard size meeting ampacity requirement
- Final size = max(VD-sized, ampacity-sized)
- Calculate actual performance, power loss, and compliance status
Testing
Running tests:
pytest calcs/test_c0019_dc_cable_sizing.py -v
Worked examples: the examples above are generated from the MCP validation corpus (mcp_public/validation/cases/fe_calc_cable_size/) by
python manage.py generate_help_examples --tool fe_calc_cable_size, which writes
help/_dc_cable_sizing_examples.html; calcs/test_help_examples.py fails if the committed fragment is stale.
Key test scenarios:
- Low-voltage high-current (48 V, 100 A) — ampacity-governed
- High-voltage low-current (600 V, 10 A) — voltage-drop-governed
- Elevated ambient temperature derating
- Multiple grouped circuits derating
- Enclosed installation method derating
- 90 °C rated conductor vs 75 °C
- Edge cases: very short cable, very long cable, maximum current
- Validation: operating temp exceeding rating, ambient exceeding operating temp
How to extend:
- To add aluminium support, create a parallel ampacity table
(
AMPACITY_TABLE_AL_75C) and add aconductor_materialparameter to the schema. - To add new insulation types, extend the
insulation_typeenum and add corresponding ampacity adjustments. - To support parallel conductor sizing as a first-class output,
integrate
calculate_parallel_conductors()into the main calculation flow. - Write tests covering new lookup values and edge cases.