Works on this device
Packet Loss Calculator
Find the share of packets that a network lost. Type how many packets were sent and how many came back, or run ping on your own computer and paste what it printed. For ping output the page also finds runs of lost packets in a row, and it shows what a loss does to a TCP download.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to test for packet loss with ping
- Windows: open Command Prompt (cmd) and type
ping -n 100 example.com. For a test that runs until you stop it, typeping -t example.comand press Ctrl+C at the end: ping then prints the statistics. - macOS: open Terminal and type
ping -c 100 example.com. Linux: open a terminal and typeping -c 100 -O example.com(-O prints a line for each packet with no answer). - Use the name or the address you want to test, such as your router or a server you use. More packets give a fairer figure: 100 packets take about 100 seconds.
- Copy everything ping printed, with the statistics lines at the end, choose Output of the ping command here and paste it. Then choose Calculate.
The formulas
- Packet loss (%) = (packets sent − packets that came back) ÷ packets sent × 100.
- Runs of consecutive losses: the packets in order, each one either back or lost. A run is a group of lost packets with no reply between them. The page counts the runs, gives the longest run and lists the runs by length.
- Effect on TCP (Mathis and others, 1997): largest rate = (MSS ÷ (RTT × √p)) × C, where MSS is the largest segment size, RTT the round-trip time, p the share of packets lost and C a constant: √(3/2), about 1.22, in the paper, √(3/4), about 0.87, with delayed acknowledgements, or a value you type.
Worked example
Ping sent 10 packets and 7 echo replies came back. The loss is (10 − 7) ÷ 10 × 100 = 30%. In order, the packets were: back, back, lost, lost, back, back, lost, back, back, back. That is 2 runs of losses: one of 2 packets and one of 1 packet.
Effect on TCP: with 1% loss, a round-trip time of 50 ms, an MSS of 1,460 bytes and C = √(3/2), the largest rate is 1,460 ÷ (0.05 × 0.1) × √(3/2) = 292,000 × 1.224745 = 357,626 bytes per second, which is about 2.86 Mbit/s.
How the ping output is read
- Windows:
Reply from ... time=21msis a packet that came back.Request timed out.is a lost packet. OtherReply fromlines, such asDestination host unreachable., are error messages: no echo reply came back, but Windows counts them as received in its statistics. The page shows both figures. - Linux and macOS:
64 bytes from ... icmp_seq=1 ... time=24.1 msis a packet that came back. The sequence numbers (icmp_seq) give the order: a number with no line is a lost packet.Request timeout for icmp_seq 3(macOS) andno answer yet for icmp_seq=3(Linux with -O) are lost packets. - The statistics line gives the number of packets sent. Lost packets after the last line are counted, but their places are not known.
- Duplicate replies, marked (DUP!), are not new packets and are not counted.
Limits you should know
- This page measures nothing and sends nothing. It works out figures from the counts or the text you give it. To test a connection live, use the Ping Test.
- Some routers and servers answer ping slowly or not at all when they are busy, so some loss in a ping test can come from the device that answers, not from the network.
- Only English ping output is read. For other languages, type the counts in the first option.
- The Mathis formula is an upper limit for one long TCP transfer with light loss that is spread out. With heavy loss or bursts, real TCP is slower. The Network Throughput Calculator turns the formula round and adds the other limits of a connection.
- For the jitter of the same ping output, use the Network Jitter Calculator.