What Is Latency and Ping?

Category: Networking & IP ยท Updated 2026-11-08

Latency is the time it takes for a piece of data to travel from one point on a network to another, usually measured in milliseconds. Ping is a small utility that measures latency by sending a short signal to a destination and timing how long the reply takes to come back, a figure called round-trip time (RTT). Lower latency generally means a more responsive website or connection.

Latency vs. ping vs. bandwidth

Latency is the delay itself, the time a signal takes to travel one way or round trip across a network. Ping is the tool, and informally the measurement it produces, usually reported in milliseconds (ms) as round-trip time. Bandwidth is a different thing entirely: it describes how much data can move per second, not how quickly any single piece of it arrives. A connection can have high bandwidth and still feel slow to respond if latency is high, the way a wide highway with a very long on-ramp still delays the first car.

What affects latency

FactorEffect
Physical distanceSignals travel at a large but finite speed, so farther servers add delay
Number of network hopsEach router a packet passes through adds a small amount of processing time
Network congestionBusy links queue packets, increasing delay at peak times
Connection typeFiber and wired connections are typically lower latency than satellite or congested Wi-Fi
Server processing timeA slow application or database adds delay on top of pure network travel time

How to measure latency with ping

Most operating systems include a ping command that sends several small packets to a destination and reports the time for each round trip, along with the minimum, average, maximum and any packet loss.

ping example.com

PING example.com (93.184.216.34): 56 data bytes
64 bytes from 93.184.216.34: icmp_seq=0 ttl=56 time=18.432 ms
64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=17.981 ms
64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=19.204 ms

--- example.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss
round-trip min/avg/max = 17.981/18.539/19.204 ms

As a rough guide, under about 20 ms is considered excellent for a nearby server, 20 to 100 ms is typical and usually unnoticeable for browsing, and above 150 to 200 ms starts to feel sluggish, which matters most for real-time uses such as video calls or online gaming.

Why latency matters for a website

  • Every request a browser makes, for the page, images, scripts and fonts, pays the latency cost at least once, so high latency adds up across many small files.
  • A visitor far from your server will feel more delay than one nearby, which is one reason a CDN or a data center close to your audience helps.
  • Secure connections add extra round trips during the TLS handshake, so latency affects HTTPS setup time too.
  • Database queries and API calls inside your own infrastructure also have latency, which is why keeping an application server close to its database matters.

How to reduce latency

  1. Choose a hosting data center location close to most of your visitors.
  2. Use a CDN so static files are served from an edge location near the visitor instead of the origin server.
  3. Reduce the number of separate requests a page makes, since each one pays a round trip.
  4. Keep application servers and databases in the same data center or region to avoid unnecessary internal latency.
  5. Use a wired connection instead of Wi-Fi when testing or diagnosing latency on your own end.

Frequently asked questions

What is a good ping time?

For general browsing, under about 50 ms is very good and 100 ms is still acceptable. Real-time activities like online gaming or video calls benefit from staying under roughly 50 to 100 ms, since delays become noticeable above that.

Is lower latency always better?

Yes, lower latency means a faster-feeling response for any single request. The practical limit is physical distance and network conditions, so the realistic goal is keeping latency as low as the geography and infrastructure allow.

Does high latency mean my internet is slow?

Not necessarily in terms of bandwidth. You can have a high-bandwidth connection with high latency, for example over satellite internet, where large files still download reasonably fast but every individual request feels delayed.

Why does ping show different times for the same server?

Network conditions change moment to moment due to congestion, the specific route packets take, and load on intermediate routers. Small variations are normal; large, inconsistent spikes can indicate a network problem.

Can a CDN reduce latency?

Yes. A CDN caches content at edge servers closer to visitors, so requests travel a shorter physical distance than going all the way to the origin server, which lowers latency for cached content specifically.

What causes packet loss during a ping test?

Packet loss usually comes from network congestion, a failing or overloaded router along the path, a weak Wi-Fi signal, or a firewall rate-limiting or blocking ICMP traffic. Occasional loss under 1% is common; higher rates point to a real problem.

Related topics