From Al Williams on Hackaday:
At DC and low frequency, we can pretend wires are perfect conductors. At radio frequencies, though, there are many effects that you need to take into account for wires and cables. One of these is characteristic impedance. If you have a marked cable, you can look it up on the Internet, of course. But what if you don’t know what kind of wire it is? With help from [The Offset Volt], you can measure it as he shows in the video below.
This is one of those things that used to take exotic test equipment like an LCR bridge, but these days meters that measure inductance and capacitance are commonplace. The trick is simple: measure the capacitance and then short one end of the cable and measure the inductance.
Once you have those numbers, it is easy to do a little math and determine the impedance. It doesn’t matter how long the cable is. The length will change the individual readings, but the ratio of the two readings will remain relatively constant.