DC: V = I⋅L⋅2⋅R/1000.
Single-phase AC: V = I⋅L⋅2⋅Z/1000.
Three-phase AC: V = I⋅L⋅√3⋅Z/1000.
I = Current in ampere (A).
L = Cable distance in meters (m).
Z or R = Cable impedance or resistance in Ω/km.
Read more here.
Or calculate it with this calculator.