Methodology & testing
Last updated 2026-11-10
Engineerly's calculators are safety-adjacent: a wrong current or voltage drop can lead to an undersized cable or a generator that cannot start its motors. This page explains how the calculations are built and checked, so you can decide how far to trust them.
1. Standard formulas only
Every calculator uses the textbook relationship for its topic: the power triangle, three-phase power with the √3 factor, I²R scaling of transformer load loss, Q = P(tan φ1 − tan φ2) for capacitors, resistivity with a linear temperature coefficient, Peukert's law, and the energy-balance method for PV. No proprietary curve fitting or hidden factors are involved. Where a generic engineering value is needed, such as a part-load fuel curve, a motor starting multiple or a reactance per metre, it is shown on screen as an editable default and explained as such.
2. Assumptions visible next to the result
Each result panel lists the assumptions it rests on (balanced load, conductor temperature, constant load, efficiency) and a warning box covering the main ways the estimate can mislead. Every calculator page also has sections on limitations and references. The references name only standards and texts that genuinely cover the topic. We avoid quoting clause numbers unless we are confident they are stable across editions.
3. Calculation code separated from the page
The mathematics lives in small TypeScript modules with no user-interface code. The pages only collect inputs, validate them and display what those modules return, including the substituted steps. One set of functions is therefore both tested and shown to you.
- Full double precision is kept internally. Rounding happens only for display, normally to 4–5 significant figures.
- Inputs are validated before calculating: power factor and efficiency must be greater than 0 and no more than 1, counts must be whole numbers, and ranges are bounded. Commas are rejected as decimal separators so that "1,5" cannot be silently misread.
- Unit conversions use exact or conventional constants: 1 hp = 745.7 W, 1 ft = 0.3048 m, 1 US gal = 3.785411784 L, 1 kcmil = 0.506707479 mm².
4. Automated tests against hand calculations
Each module has a test suite, run with Vitest, that checks its output against independently worked examples. These were calculated by hand from the formula, not produced by the code under test, and the working is written in the test file. The test run must pass before the site is built. The check values are:
| Calculator | Case | Expected |
|---|---|---|
| Line current | 100 kW, 400 V, PF 0.8 (three-phase) | 180.42 A |
| Line current | 500 kVA, 415 V | 695.60 A |
| Line current | 5 kW, 230 V, PF 0.9 (single-phase) | 24.155 A |
| Line current | 100 kW, 230 V line-to-neutral, PF 0.8 | 181.16 A |
| Line current | 10 hp, 400 V, PF 0.85, η 0.9 | 14.070 A |
| kVA / kW | 1000 kVA, PF 0.8 | 800 kW, 600 kVAr, 36.87°, 1443.4 A at 400 V |
| kVA / kW | 40 kW and 50 kVA | PF 0.8, 30 kVAr, 217.39 A at 230 V |
| Fuel | 100 kW set, 75 % load, 0.24 L/kWh, k 1.03 | 18.54 L/h, 148.32 L/day (8 h), 26.97 h from 500 L |
| Fuel | 100 kW, 200 g/kWh, 0.835 kg/L | 0.23952 L/kWh, 23.952 L/h |
| Fuel | Curve interpolation at 60 % and extrapolation at 10 % | 1.084 and 1.568 |
| Generator sizing | 10 kW PF 1 + 15 kW PF 0.85 DOL 6× + 7.5 kW PF 0.8 soft 3× | Running 48.75 kVA; peak start 124.26 kVA; 125 kVA |
| Generator sizing | Same with 10 % derate, starting capability 2 | 69.04 kVA start requirement; 75 kVA |
| Battery | 200 Ah, 12 V, DoD 0.8, η 0.9, 500 W | 3.456 h |
| Battery (Peukert) | 100 Ah C20, k 1.2, 10 A, DoD 0.5 | 8.7055 h to empty; 4.3528 h |
| Battery | 4S2P of 12 V 100 Ah | 48 V, 200 Ah, 9.6 kWh |
| Voltage drop | 3-ph, Cu 16 mm², 70 °C, 32 A, 50 m, 400 V, PF 0.85, X 0.08 mΩ/m | 3.1539 V, 0.7885 % |
| Voltage drop | 1-ph, Cu 2.5 mm², 20 °C, 16 A, 30 m, 230 V, PF 1 | 6.6205 V, 2.8785 %; 2 % limit → 4 mm² (1.799 %) |
| AWG | 10 AWG and 4/0 AWG from d = 0.127 × 92^((36 − n)/39) | 2.5882 mm / 5.2612 mm²; 11.684 mm / 107.22 mm² |
| Transformer | 1000 kVA 11 kV/415 V, 750 kVA PF 0.9, P0 1700 W, Pk 10 500 W | 52.486 A / 1391.2 A; 5906.25 W; η 98.886 %; η_max at 40.24 % |
| PF correction | 100 kW, PF 0.70 → 0.95, 400 V, 50 Hz | 69.152 kVAr; 458.58 µF delta, 1375.7 µF star; 206.20 → 151.93 A |
| PF correction | 10 kW single-phase, PF 0.8 → 1.0, 240 V, 60 Hz | 7.5 kVAr, 345.39 µF |
| Solar PV | 5000 Wh/day, 5 PSH, derate 0.75, 400 W panels, 2 days, 48 V, DoD 0.5, η 0.9 | 1333 Wp → 4 panels; 462.96 Ah; 26.25 A controller |
Further tests cover edge behaviour: k = 1 in Peukert matching the simple method, parallel conductors halving voltage drop, DC ignoring reactance, panel counts that are exact multiples not being rounded up, the size solver returning nothing when no size qualifies, and input validation messages.
5. What testing cannot do
Tests prove the code computes the formula correctly. They cannot prove the formula suits your situation. Simplified models leave out real effects such as harmonics, unbalance, ageing, voltage dip during motor starting, and installation conditions. That is why every page tells you to verify against the applicable code and manufacturer data, and why the disclaimer matters.
Found an error?
If you believe a result, formula or reference is wrong, please tell us through the contact page with the inputs you used (the shareable link captures them). Corrections are tested and the "last updated" date is changed.