How to measure length of coax with NanoVNA

Coax length is measured using the transform function and the S11 port of the NanoVNA. What we get is either the length of the cable or the distance to the first fault in the cable. Velocity factor of the cable has to be known to calculate the stop frequency to be set in the stimulus menu of the NanoVNA. Stop Frequency (MHz) = [5850/Maximum expected distance (m)] * Velocity Factor