Distance sets a floor. Light in optical fibre travels at about 200,000 km per second, so a round trip between Stockholm and New York, about 6,300 km apart, can’t take less than about 63 ms, and real routes add more. Every network hop, congested link and queue adds to it.
Latency multiplies. Opening an HTTPS connection takes round trips for TCP and then TLS before the request is even sent, so a far-away server feels slow even when it answers at once. CDNs and edge caches cut this by answering from nearby.
Ping measures latency with ICMP echo requests; the connect time in an HTTP or port check measures it for TCP.
Formula
Minimum round-trip time ≈ 2 × distance ÷ 200,000 km/s
Example:
Stockholm to New York: 2 × 6,300 km ÷ 200,000 km/s ≈ 63 ms.