Pathing equivalent to Vector3.Distance?

I need to compare the paths of two different objects so I can choose the shorter one. Vector3.Distance takes in two Vector3s and returns a float and I can’t seem to figure out a way to achieve a similar result but with calculating the distance of a path.