How to Find the Latency of Your Internet Connection



Programming


In this article, we show how to test the latency of your internet connection.

Latency is the amount of time it takes for your computer network to communicate with the server that hosts the website you are trying to connect to. This includes the amount of time to send the server a request and get back the data requested (which is usually a website).

One of the most popular ways to tell how long it takes to communicate with a server which hosts any particular website is to ping the server.

The ping command is present across multiple operating systems, including Windows and Linux.

If you open the command line terminal and type in, ping, then you'll see how long it takes for your network to communicate with the network of the website you are trying to communicate with.

The ping command tells you how long it takes to communicate and get a response back from a server.

This is shown below on a Windows PC.

Finding out the latency of your internet connection

So we ping this website, learningaboutelectronics.com, the site that you're on right now.

Notice that when we run the ping command, it pings the website multiple times. This is because communicating with a web server is variable. Not everytime your network communicates with another internet network will it take the same amount of time. Therefore, the ping command does it a few times, 4 times as you can see above, and then it displays the minimum time it took to communicate and get a response from the web server.

Notice that the latency is defined as the round trip time and it is specified in milli-seconds.

The ping command returns to us the minimum time it takes and the maximum time it takes to communicate with the web server. In this case, the shortest time it takes is 15ms and the longest time it takes is 17ms, with the average being 16ms. So, on average, it takes 16ms for our home computer network to communicate with the network hosting learningaboutelectronics.com

You can also see the number of packets that is sent and received, which is 4. No sent or received packets were lost.

So this is one good way to measure your current internet network's latency. Again, latency is how long it takes for your network to send a packet to a network and receive a packet back from a network (two-way communication).

It's one important measurement for how good or strong an internet service is.


Related Resources

How to Randomly Select From or Shuffle a List in Python



HTML Comment Box is loading comments...