How to extend the DC part of my laptop power cable without experiencing voltage problems?

  It is usually better to design these things instead of guessing.

  Let’s suppose we want to keep the voltage drop to 0.2 V over 4 m of cable, and let’s say the laptop uses a maximum of 5 A. (Most laptop PSUs’ output varies by at least that much in normal use.) As for the maximum current consumption, check your power brick’s maximum output and use that instead of 5 A.

  (The target of a maximum 0.2 V drop is a conservative estimate – it’s only 1% of the typical laptop PSU output! In other words most laptops could probably tolerate a considerably greater voltage drop than that. And the 5 A current draw is quite a high estimate especially for many smaller laptops. On the other hand, your power brick’s output might already be a little bit low, and other things might be not right on spec, and we’re adding some splices too… so a conservative estimate isn’t unreasonable here. See the comment discussion.)

  The resistive drop in a conductor is simply E=IxR, where E is the voltage drop in volts, I is the current in amperes, and R is the resistance in ohms.

  Then R=E / I=0.2 V / 5 A=0.04 ohms. You need your round-trip (ie counting both sides) cable resistance to be less than this.

  Each side contributes half, so you need the R of each side to be half of this: 0.02 ohms for 4 m of cable.

  Most wire tables list wire R in ohms/1000 ft or ohms/km. 1000 m / 4 m=250, so multiply both sides by 250 to get 5 ohms per 1 km of wire. We want each side of the cable to have R of no more than that.

  Consulting a standard wire table, it appears that cable with each conductor using 2mm diameter wire will be close enough (R only a few percent high). In AWG the closest standard is 12 gauge.

  That will be some fairly thick cable (in the US we use 12 ga. conductors for 20 A outlets and it is also the heaviest extension cord in anything like common use). And do remember that your splices at each end will likely add some non-insignificant resistance too.

  4 m of very thick extension cord does not seem to me to be very convenient to just take down from a shelf and put back up frequently.

  If your laptop uses significantly less current than that, or if you think you can tolerate a larger voltage drop, then you can use thinner cable. You now have the formulas and the table to find those numbers.

  But I agree with the others – I’d extend the AC.