DEV Community

Cover image for Correct tables, wrong answer: the hidden defaults that make two calculators disagree
Andrii Zhukovskyi
Andrii Zhukovskyi

Posted on Edited on Originally published at zhukovskyi.space

Correct tables, wrong answer: the hidden defaults that make two calculators disagree

In short. My wire-size app had the right code tables and still put a kitchen range on the wrong breaker, because one default belonged to a different kind of job. Calculators rarely disagree because of the math; they disagree because of defaults the user never sees. One 50 A electrical circuit, run through those defaults, comes out as four different wire sizes. If your app computes anything, put the assumptions next to the answer.

I make Electrician Calc, a phone app that sizes wire and breakers by the US National Electrical Code (NEC) or the international IEC 60364. Getting the tables right was the easy part. The hard part was everything around them.

The bug that wasn't in the math

Before the US launch I ran a user test: an AI agent played a licensed residential electrician, read only the store page and tried a real job. A 40 A kitchen range, 240 V, 60 ft away, on NM-B cable (Romex).

Every number it checked was correct. The answer was still wrong: the app put the range on a 50 A breaker.

The cause was two defaults. "Continuous load" was on, so the app multiplied the current by 1.25, which the code requires for loads that run at full current for 3 hours or more, such as EV chargers. A range is not one of those: its elements cycle. And the wire type defaulted to THHN in conduit, which is commercial wiring. Both settings were reasonable for a commercial job and wrong for a house.

Nothing in the code was broken. The defaults described someone else's job.

One circuit, four wire sizes

To see how far defaults alone can move an answer, take one circuit: 50 A at 240 V, copper, 130 ft one way, say a welder outlet in a detached shop. The code tables are fixed. Only the assumptions change:

What the calculator assumes Answer Why
75 °C column, not continuous, no voltage drop check 8 AWG, 50 A breaker 8 AWG is 50 A at 75 °C
The same, with a 5% voltage drop limit 8 AWG, 50 A breaker 8 AWG drops 4.2%
The same, with a 3% voltage drop limit 6 AWG, 50 A breaker 6 AWG drops 2.7%
60 °C column (NM-B cable) 6 AWG, 50 A breaker 8 AWG is only 40 A at 60 °C
Continuous load, 75 °C column 6 AWG, 70 A breaker 50 × 1.25 = 62.5 A
Continuous load, 60 °C column 4 AWG, 70 A breaker 6 AWG is 55 A at 60 °C
130 ft typed as a 260 ft round trip, 3% limit 3 AWG, 50 A breaker The voltage drop doubles

Ampacities are from NEC Table 310.16; voltage drop is the usual K-factor formula with K = 12.9 for copper.

Every row except the last follows the code for the conditions it assumes. The last one is a typing mistake that looks exactly like a result. A user who compares two apps sees 8 AWG in one and 6 AWG in the other and concludes one of them is broken.

The defaults that matter

These are the settings that changed the answer, and most calculators show few of them:

  • Which column of the table. The code table has 60, 75 and 90 °C columns. Which one applies depends on the terminals and the cable type, not on the wire's own rating.
  • Continuous or not. A 1.25 multiplier that some tools apply to everything and some to nothing.
  • Voltage drop limit. 3%, 5% or no check at all, and checked at the breaker rating, the load, or 80% of the breaker.
  • Voltage drop method. Resistance at 20 °C instead of operating temperature reports about 20% less drop, enough to move a borderline run one size.
  • One-way or round-trip length. The formula already doubles the length for the return wire. Type the round trip and it doubles twice.
  • Material and wire type. Copper or aluminum, conduit or cable.
  • Special rules. Derating for heat and crowded conduits, an 83% rule for house services, motors and air conditioners sized from their nameplates.

None of these is exotic. Each one is a legitimate input, and each one, hidden, turns into "the app is wrong".

What I changed

  • Defaults for the audience. In US mode the app now starts residential: not continuous, NM-B cable. The continuous-load switch sits next to the current field, off by default, so the 1.25 is a visible decision instead of a silent one.
  • Assumptions on screen. Column, wire type and voltage drop limit are inputs you can see, not settings three menus away.
  • The working with every answer. Each result lists its steps: the column it read, the 1.25 if applied, the derating, the voltage drop and the ground wire. A user can check it, and an electrician can show it to the inspector.
  • Wording that cannot be read as an instruction. One step used to say "voltage drop ≤ 3% first met by 10 AWG". It was a lower bound and read like "install 10 AWG". It now says "10 AWG or larger keeps the voltage drop within 3%", and a final step names the size to install.

The general lesson

If your app calculates anything (a dose, a loan payment, a paint quantity, a wire size), your users will compare it with another tool. When the answers differ, they will not open your settings to find out why. They will decide which app is wrong.

  1. Every default is a claim about who the user is. Pick it for the audience the store page speaks to.
  2. Put the assumptions that change the answer next to the answer.
  3. Show the working. A number with its steps is something people trust and share; a bare number is something they argue with.
  4. Test with someone playing your actual user on a real task, not with your own test data. My tables passed every unit test; the range on a 50 A breaker only showed up when someone tried to wire a house.

The full electrician version, with the code sections for every row, is here: 8 AWG or 6 AWG for 50 amps? Why two wire size calculators give different answers. The other guides in the set (voltage drop, wire sizing step by step, the 125% rule, conduit and box fill) are at zhukovskyi.space/blog/guides. The app is Electrician Calc, on Google Play and the App Store; Wire Size and Voltage Drop are free.

Originally published at zhukovskyi.space.

Top comments (1)

Collapse
 
gautamtalksdev profile image
Gautam K •

Right tables, wrong answer because of a hidden default is a great example. Defaults are decisions nobody remembers making. Surfacing them in the output, even as one line, would make the error obvious to the user.