A wire size calculator picks the right conductor gauge (AWG) for a circuit by checking both things that matter: it must safely carry the current (ampacity) and it must not drop too much voltage over the run (usually kept under 3%). It returns the larger of the two — the safe choice — and tells you which one governed.
Long runs are where people undersize: a wire that's fine for the amps at 20 ft can drop too much voltage at 120 ft. This catches that.
Ampacity: the smallest gauge whose rated current meets the load. Voltage drop: the smallest gauge keeping 2 × K × amps × distance ÷ circular-mils under the limit (K ≈ 12.9 copper, 21.2 aluminium; default 3%). The recommendation is the larger of the two. Simplified ampacities; no derating or continuous-load factor applied.
A 20 A, 120 V circuit run 50 ft in copper needs about 10 AWG — here voltage drop governs, not just the amps.