The NEC doesn’t mandate a specific voltage drop limit - it recommends 3% for branch circuits and 5% total for feeder plus branch circuit in the informational notes to 210.19 and 215.2. That informational note status means it’s not enforceable, but it’s still the standard of care. Undersized wire for long runs causes real problems - dim lights, equipment running hot, motor burnout, and callbacks.
The formula: VD = (2 x K x I x L) / CM, where K is the resistivity constant (12.9 for copper, 21.2 for aluminum), I is amps, L is one-way length in feet, and CM is the circular mil area of the conductor. Alternatively: CM = (2 x K x I x L) / acceptable VD. Plug in 3% of your voltage as acceptable drop and solve for the conductor size you need.
In practice: anything over 100 feet at significant amperage, run the numbers. A 20A circuit to a shop 200 feet from the panel on #12 copper will see close to 5% drop - enough to cause issues. Going to #10 costs you maybe $0.30/foot more in wire and saves a callback and a headache. I always include voltage drop calcs in any estimate over 75 feet on critical loads.