Distance calculation tool between ports