# Latency, Bandwidth and Ping

> The three numbers that say how fast a line feels: latency, bandwidth and throughput. How ping measures the wait, and which number to fix first.

**Course:** [Computer Networking](https://learn.benibix.com/learn/infrastructure-networking)  
**Time:** 12 min

**After this lesson you can:**

- Tell latency from bandwidth
- Measure latency with ping
- Say which number limits a given task

## Why a fast line can still feel slow

Three numbers say how fast a network is, and they are not the same. Latency is the wait before data arrives, counted in milliseconds. Bandwidth is the most data the line can carry each second. Throughput is how much really gets through. A line can have huge bandwidth and still feel slow, because of latency.

Latency comes mostly from distance and from each box on the way. Light in a glass fibre covers about 200 kilometres every millisecond. So London to New York and back takes at least about 56 milliseconds, and closer to 70 in real life. No upgrade can beat the speed of light.

Bandwidth is counted in bits each second, such as 100 megabits. Files are counted in bytes, and one byte is 8 bits. So a 100 megabit line moves at most about 12.5 megabytes each second. That gap of 8 is the most common cause of a download that looks slower than the plan.

Throughput is what you really get, and it is always below the bandwidth. Other users share the line, packets get lost and sent again, and the far server may be slow. A road is built for so many cars an hour, but how many get through depends on traffic.

The ping command measures latency. It sends a tiny packet to a machine and times how long the answer takes. The result is the round trip, there and back, in milliseconds. Under 20 is excellent for a nearby server. Over 150 makes calls and games feel laggy.

Different tasks need different numbers. A big download needs bandwidth. A web page made of 80 small files needs low latency, because each file costs a round trip. A video call needs a little of both, and above all a steady line.

People often pay for more bandwidth to fix a laggy game. A faster plan rarely cuts the wait, because the game server is just as far away. A server in your own region does far more. Some machines also refuse to answer ping. So no reply does not always mean a machine is down.

```console
$ ping -c 3 emmas-shop.com
64 bytes from 203.0.113.10: icmp_seq=1 ttl=56 time=21.4 ms
64 bytes from 203.0.113.10: icmp_seq=2 ttl=56 time=20.9 ms
64 bytes from 203.0.113.10: icmp_seq=3 ttl=56 time=21.1 ms
```
Three tries, about 21 milliseconds each, there and back. The -c 3 stops it after three.

## Latency, bandwidth and throughput side by side

| Number | What it measures | Counted in | Fix it by |
| --- | --- | --- | --- |
| Latency | The wait before data arrives | Milliseconds | A closer server |
| Bandwidth | The most the line can carry | Megabits a second | A bigger plan |
| Throughput | What really gets through | Megabits a second | Less sharing, fewer losses |

## Which number to fix first

1. **Fix latency.** When pages with many small parts load slowly, or calls and games lag.
2. **Fix bandwidth.** When big downloads and uploads take too long and the line is full.
3. **Fix throughput.** When you get far less than your plan, even though the line is not full.

![A laptop on the left and a server on the right. An arrow marked echo request goes from the laptop to the server, and an arrow marked echo reply comes back. A bracket over both arrows is marked round trip, 21 milliseconds.](https://learn.benibix.com/diagrams/inf2-ping.svg)

### Example: Emma's slow download

Emma pays for 200 megabits. A 1 gigabyte file takes about 50 seconds to download, and she thinks the line is broken.

200 megabits is 25 megabytes a second, so 1 gigabyte needs at least 40 seconds. Her throughput is about 80 percent of the bandwidth, which is normal.

**Words in this lesson:** [Latency](https://learn.benibix.com/term/infrastructure/latency), [Bandwidth](https://learn.benibix.com/term/infrastructure/bandwidth), [Throughput](https://learn.benibix.com/term/infrastructure/throughput), [ping](https://learn.benibix.com/term/infrastructure/ping)

> **The one difference.** Bandwidth is how wide the pipe is. Latency is how long the pipe is, and a wider pipe does not make it shorter.

**Question:** A game lags even after you doubled your internet plan. What is the most likely cause?

**Answer:** High latency to a far-away game server. Lag is a wait, which is latency. A bigger plan widens the pipe but does not shorten the trip, so a closer server is the real fix.

---

Source: https://learn.benibix.com/learn/infrastructure-networking/latency-bandwidth-and-ping
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
