This paper proposes a logarithmic transformation of voltages (LTVM) for the power flow in DC grids. This problem is non-linear due to the presence of constant power loads (CPLs), which also introduce a negative resistance effect that can create numerical instability for conventional algorithms. The proposed methodology is applied to dc-microgrids, dc-distribution and multi-terminal high voltage DC transmission (MT-HVDC). Two main approximations are presented and compared in terms of computational performance and the accuracy of the solution. Simulation results performed in Matlab/Octave demonstrate the advantages of the proposed methodology using a complete set of test systems, from low to high voltage applications. The proposed methodology does not require any consideration about the topology of the grid (radial or meshed) or the number of constant power loads. © 2019 Elsevier B.V.