Ping and Jitter: How to Measure Latency Variation
Two connections can report the same average ping and behave nothing alike. One delivers every probe in a steady 24 ms. The other swings between 18 ms and 90 ms and still lands on an average that looks respectable in a screenshot. The mean is useful, but it does not describe the tail of the distribution or the order in which delays occur.
A ping test answers two questions. Did the target reply, and how long did the round trip take. Neither answer says which direction the delay happened in, and neither says whether a call, a game session or a database query will feel fine on that path.
That gap between what the tool measures and what an operator needs to know is where most latency arguments go wrong. Closing it takes a bounded measurement, a stated definition of variation, and a clear line between what the numbers support and what they don't.
Table of Contents
- What Ping and Jitter Actually Measure
- How to Measure Round-Trip Variation From a Client
- Reading Results Without Overclaiming
- Why Average Ping Hides Variation Under Load
- Telling Packet Loss Apart From Rate Limiting
- Setting Alert Thresholds That Hold Up
- Confirm the Pattern on One Host Before Scaling
What Ping and Jitter Actually Measure
Ping measures round-trip time. Jitter is a looser term for how much that time moves around, and the word means different things to different tools.
Ping RTT is the elapsed time between an ICMP Echo Request leaving the client and the matching Echo Reply arriving back. It measures the round trip, including endpoint processing; it cannot isolate either one-way delay.
A reported 40 ms is therefore not 20 ms out and 20 ms back. It is the forward path, the return path, endpoint processing at both ends and any queueing in between, summed into one number. The reply carries no breakdown of the parts, so no ping result can tell you which segment contributed what.
A courier makes ten runs between two depots. Nine take 20 minutes, one takes 40. The average of 22 minutes looks acceptable, but the customer waiting on that tenth parcel experiences something the average never predicted. Both the average and the slowest delivery are real; they answer different questions. Latency reports need the same distinction.

Five measures get confused constantly, and the confusion starts with direction. Ping uses ICMP, not TCP or UDP, so a firewall rule that permits the application port says nothing about whether a probe gets through; the explanation of which port ping uses covers that split. The table below keeps the five measures separate.
| Metric | What It Covers | Path Direction | Main Limit |
|---|---|---|---|
| Ping RTT | Time from Echo Request to Echo Reply | Round trip | Includes return path and endpoint processing |
| Average RTT | Mean of probe times in one run | Round trip | Hides spikes and bursts |
| RTT variation | Spread between fast and slow probes, such as p95 minus p50 | Round trip | Not RFC 3393 jitter |
| IP packet delay variation | Difference between one-way delays of a packet pair | One direction | Needs one-way timing data |
| ICMP probe loss | Share of transmitted requests without a matching reply by the observation cutoff | Round trip; failed direction unknown | Filtering, rate limiting, endpoint behavior and actual packet loss can all cause missing replies |
Ping output can support the first three rows when individual RTT samples are retained. For one-way IP packet delay variation, measurements are needed at both endpoints. Strict clock synchronization is not always required: a constant clock offset cancels when two one-way delays are subtracted, although clock skew, drift and timestamp errors still matter. RFC 3393 discusses these limits in sections 2.7.1 and 5. A client-only ping log cannot reconstruct those one-way measurements.
Everything in this article comes from one client-to-target path across one sample window. Change either and the numbers change with them. Basic latency commands and their flags are covered in the network latency measurement guide, a useful reference if the flags in the examples ahead look unfamiliar.
How to Measure Round-Trip Variation From a Client
A ping test is only as useful as the record kept alongside it. Run the procedure from the device and network users use, against the server the application connects to, not a router three hops away.
Before starting, record the client, OS, ping implementation, target hostname and resolved IP, address family, payload size, and start/end times. On Linux, check ping -V: the commands and parser below target iputils ping, not BusyBox, macOS or Windows output. Probe only an endpoint you are allowed to test. These commands do not change configuration, but they do send traffic; schedule the separate upload test to avoid disrupting users.
Capture an idle baseline. Replace
target.examplewith the application endpoint. On Linux:date -u LC_ALL=C ping -n -c 300 -i 1 -W 2 -w 330 target.example > idle-1.txt 2>&1 printf 'ping exit code: %s\n' "$?" date -uThe one-second interval requests roughly five minutes of samples;
-w 330caps ping's measurement at 330 seconds.-W 2controls the wait in the absence of responses; it is not a strict two-second timeout applied independently to every probe once responses arrive. Name resolution can fail before measurement starts. Check the transmitted count and errors instead of assuming every run completed. The iputils documentation describes these options and exit codes: code 1 can reflect unanswered probes, while code 2 indicates another error.On Windows, use
ping /n 300 /w 2000 target.example > idle-1.txtin Command Prompt, or the same command with2>&1in PowerShell. Here/wis a per-reply timeout in milliseconds. Elapsed time can exceed five minutes when replies time out. See the Windows ping reference. Keep Windows runs separate: default payload sizes and displayed time precision differ from Linux, andtime<1msis a bound, not an exact zero.Repeat without overwriting evidence. Save the next idle captures as
idle-2.txtandidle-3.txt. Keep the same target IP, address family and observation point; record any change instead of pooling unlike runs.Calculate the distribution from valid replies. Report p50, p95, p99 and p95 minus p50 with a stated percentile method. Never insert zero RTT for an unanswered request. If comparing consecutive probes, keep sequence numbers so a missing reply does not turn two nonadjacent probes into a consecutive pair.
Read the ping summary. In iputils,
mdevis the population standard deviation of RTT, not a standardized one-way jitter measure. Duplicate replies can contribute to ping's RTT statistics; investigate duplicates before comparing that summary with a deduplicated calculation.Repeat under controlled load. Upload a test file you control from the same client, then capture
loaded-1.txt,loaded-2.txtandloaded-3.txt. Record upload rate and start/stop times. Stop the upload after the test. Compare each run before pooling samples, and repeat at another busy period.Cross-check the actual service. Follow the guide to pinging a TCP port and record whether the connection succeeds, times out or is refused. These are different outcomes. A TCP handshake still does not measure a complete application transaction.
Separate loss from collection failure. A completed 300-request run with 30 unanswered requests reports 10% ICMP probe loss, even if its remaining RTTs are low. A missing log, DNS error or interrupted run has incomplete coverage; preserve that limitation rather than reporting a healthy window.
The RFC 3393 text defines IP packet delay variation using a selected pair of one-way delays. As an illustrative calculation, delays of 25 ms and 40 ms differ by 15 ms; this is our example, not a quoted test from the RFC. Subtracting two RTTs instead gives RTT difference, not the RFC's one-way metric.
Calculate percentiles from an iputils capture
Save this as rtt_stats.py, then run python3 rtt_stats.py idle-1.txt 300. It uses nearest-rank percentiles: sort the successful replies and select position ceil(p × N), counting from one. The script rejects partial or inconsistent captures and censored timings. It ignores explicitly marked duplicate replies, reports loss separately, and compares only adjacent sequence numbers. It has been checked with synthetic logs; the example is not a measurement of your network.
import math
import re
import sys
from pathlib import Path
log = Path(sys.argv[1]).read_text()
expected = int(sys.argv[2])
summaries = re.findall(
r"(\d+) packets transmitted, (\d+) (?:packets )?received", log
)
if len(summaries) != 1 or expected <= 0:
raise SystemExit("Need one complete iputils run and a positive count")
sent, received = map(int, summaries[0])
if sent != expected or not 0 <= received <= sent:
raise SystemExit("Incomplete run or invalid summary; inspect the log")
samples = {}
duplicates = 0
for line in log.splitlines():
m = re.search(
r"bytes from .*icmp_seq=(\d+).*time([=<])([0-9.]+)\s*ms", line
)
if not m:
continue
if "(DUP!)" in line:
duplicates += 1
continue
seq, relation, raw = m.groups()
seq, value = int(seq), float(raw)
if relation != "=" or not math.isfinite(value) or value < 0:
raise SystemExit("Inexact/invalid RTT; do not substitute zero")
if seq in samples or not 1 <= seq <= sent:
raise SystemExit("Unexpected sequence number; inspect the log")
samples[seq] = value
if len(samples) != received:
raise SystemExit("Reply count differs from parsed samples; inspect format")
print(f"sent={sent} replies={received} duplicates_ignored={duplicates}")
print(f"ICMP probe loss={100 * (sent - received) / sent:.2f}%")
if not samples:
raise SystemExit("No valid RTTs; percentiles are undefined")
values = sorted(samples.values())
def percentile(p):
return values[math.ceil(p * len(values)) - 1]
p50, p95, p99 = (percentile(p) for p in (0.50, 0.95, 0.99))
print(f"p50={p50:.3f} p95={p95:.3f} p99={p99:.3f} ms")
print(f"p95-p50={p95 - p50:.3f} ms")
changes = [abs(samples[i] - samples[i - 1])
for i in sorted(samples) if i - 1 in samples]
if changes:
print(f"Adjacent pairs={len(changes)}; "
f"mean absolute RTT difference={sum(changes)/len(changes):.3f} ms")
else:
print("No adjacent successful pairs; RTT difference is undefined")
Keep the original log even when this parser refuses it. An explicit error is safer than silently treating a different output format as zero loss. Percentiles summarize received replies only, so packet loss can bias the observed latency distribution.

Sample size limits tail estimates. With nearest-rank p95, 20 successful replies select the 19th sorted value, while 300 select the 285th. With 300 replies, p99 selects the 297th: a few observations can move it substantially. These are descriptive statistics for the window, not guarantees about future packets.
| Parameter | Example Setting | Limit or Caveat |
|---|---|---|
| Requests per run | 300 | Report successful replies too; the percentile sample size excludes loss |
| Interval | 1 second on Linux | Record actual start/end times and keep implementation fixed |
| Window | About 5 minutes, Linux deadline 330 s | Check the transmitted count; Windows timeouts can lengthen the run |
| Runs | 3 idle and 3 loaded | Separate filenames; same source, destination IP, address family and payload |
| Payload | Keep and record the default | Linux and Windows defaults differ; do not compare them as identical tests |
| Missing replies | Report ICMP probe loss | A missing or incomplete capture is a separate coverage problem |
Reading Results Without Overclaiming
Take a labelled example, not a measurement: 300 probes, zero loss, p50 of 24 ms, p95 of 31 ms, maximum 88 ms. The maximum records a real outlier; investigate its timing and application impact before deciding whether it warrants action. The p95 minus p50 spread, 7 ms here, is the figure to carry forward and compare against the next window.
Read the result pattern by pattern. Each one supports a narrow conclusion and nothing wider, and the unsupported column is where most incident reports overreach.
| Observed Pattern | Allowed Conclusion | Unsupported Conclusion |
|---|---|---|
| Stable RTT, zero loss, idle | Path delay was consistent during this window | Applications will perform well all day on this path |
| Wide p95 minus p50 spread, zero loss | Round-trip delay varied in this window; direction unknown | The forward path is congested |
| Spread rises only during upload | Queueing under load is likely; confirm with a repeated loaded run | Bandwidth is the only cause |
| Loss at an intermediate hop, destination replies normally | The hop may rate-limit ICMP or deprioritize it | The destination is losing packets |
| Missing destination replies and TCP failure | Both tests observed a problem; distinguish timeout, refusal and local errors | Physical packet loss or its location has been proved |
| One high sample in an otherwise stable run | A single spike occurred | A sustained jitter problem exists |
| Complete run with unanswered probes | ICMP probe loss occurred within the capture cutoff | The collector failed or application traffic was necessarily lost |
| Missing log or fewer requests than planned | Measurement coverage is incomplete | The path was healthy for the unobserved time |
A national or global latency median describes a population, not this client-to-server path. Use such figures as context; choose a baseline and acceptance criteria for the actual route, application and busy period.
Reporting rule: every latency figure needs its window, sample count, direction and observation point attached. A bare number invites a conclusion the measurement can't carry.
The same discipline applies inside the team. When someone reports "latency was high," the useful follow-ups are mechanical: which probes, which window, which percentile, from which observation point. A run of 300 one-second probes answers those questions; a screenshot of one ping reply does not. If those fields are missing, collect them before making a broad diagnosis; an application outage can still require immediate action.
Turning these checks into recurring evidence, rather than one-off captures, is where internet connectivity monitoring earns its place, because a single afternoon of good output is not a baseline.
Why Average Ping Hides Variation Under Load
A quiet supermarket till serves each customer immediately. One large order blocks the lane, and everyone behind it waits, even though the till itself never slowed down. Routers queue packets exactly like that checkout lane.
The New Zealand broadband measurement report, published in June 2025, compares idle latency with latency under load. It is an example of why the two conditions should be measured separately, not a baseline for your route. Excess queueing under load can delay interactive packets; a clean idle result does not rule that out.

The practical comparison is between the two windows, not between two providers. Run the idle window, then the loaded window on the same path from the same client, and compare p95 values. A short queueing burst may affect only a minority of probes, while a sustained queue can raise the whole distribution. Compare the median, tail and loss together.
More bandwidth can help when capacity is the bottleneck, but it is not the only variable. Queue management, Wi-Fi contention, traffic scheduling and endpoint load also deserve investigation. A loaded ICMP test reveals a symptom under that test traffic; confirm call or game quality with the application itself. The following third-party video is optional background, not a validated configuration recipe for your network:
The limit is geographic and structural. A probe to a nearby server says nothing about application performance on other routes, over other access networks, or during a different busy period. Treat each measurement as a statement about one path at one time, and the conclusions stay defensible.
Telling Packet Loss Apart From Rate Limiting
Loss at a middle hop is not destination loss. Routers routinely rate-limit or deprioritize ICMP replies addressed to themselves while forwarding everyone else's traffic at full speed, so a repeated hop-probe report showing 40 percent missing replies at hop seven can sit in front of a destination that answers every probe.
This is why a single traceroute reading settles nothing. Work through the checks in order when the earlier runs show missing replies. They send diagnostic traffic without changing network configuration; use only authorized targets.
- Repeat the destination run. Send another 300 probes to the target and count replies. A figure that reproduces across runs is worth investigating; one that appears once may be a burst.
- Test the application port. Open a TCP connection to the service port in the same window. If ICMP disappears but the TCP handshake completes quickly, that TCP exchange succeeded while ICMP replies were missing. This supports investigating protocol-specific handling; it does not prove that no intermittent loss occurred.
- Trace the path. Use
tracerouteon Linux/macOS ortracerton Windows for route context. A few unanswered hop probes are not a reliable loss percentage. If MTR is installed and permitted,mtr -n -r -c 100 target.examplegives a bounded repeated report; see the MTR manual. Normal later-hop and destination replies are compatible with intermediate ICMP rate limiting or deprioritization, not proof of its exact cause. Probe types, routes and return paths can differ. - Sample a different hour. Evening congestion and scheduled backups produce patterns that vanish at other times. One window is a snapshot, not a trend.
- Record probe direction. A client-to-target probe cannot say which direction failed, only that the round trip didn't complete. A reply lost on the return leg looks identical to a request lost on the way out, and the fix for each lives on a different segment.
Report repeated unanswered requests as ICMP probe loss to the destination, with count and cutoff. Its cause may be network loss, filtering, rate limiting or endpoint behavior. RFC 1812 section 4.3.2.8 explicitly allows rate limiting of ICMP errors generated by routers, so missing hop replies cannot be read as a direct measure of forwarded application traffic.
TCP is corroborating evidence, not a prerequisite for observing ICMP probe loss. A TCP timeout can reflect filtering, loss or an unresponsive service; a refusal often means a reachable endpoint rejected that port. Correlate with service logs, interface error/discard counters and a capture at an authorized endpoint when needed.
Report the observed failures first. Name the responsible link, device or policy only when additional evidence supports that attribution.
A fourth suspect appears when degradation is specific to particular traffic rather than the path as a whole: a video stream that stutters while general browsing and the ping run both stay clean. Provider-side shaping belongs on the list alongside loss in that case, because a policy that deprioritizes one class of traffic produces symptoms a clean ICMP test will never show. The ROVE IPTV throttling fixes page lists the stream-side symptoms people report in that situation; treat them as a reason to suspect shaping, not as proof of it, since the client-side probe still cannot distinguish a shaping policy from congestion on the same segment.
The full diagnosis method, including how to localize loss between segments, sits in the packet loss detection guide.
Setting Alert Thresholds That Hold Up
No universal jitter threshold separates healthy from broken. A 20 ms spread can have different consequences depending on the application's latency budget, playback buffer and accompanying loss. Start from application requirements and repeated measurements on the same path.
Use sustained conditions to reduce noisy latency alerts, while keeping outage and severe application-impact signals separate. A single ICMP spike does not establish a sustained problem, but a critical transaction failure may warrant action regardless of the percentile.
This example is a design for a collector that retains raw samples, not a claim that Fivenines exposes native jitter or rolling-percentile rules:
- Define the input. One probe per second, a rolling five-minute window, evaluated once per minute. Record the actual sent/replied counts and use nearest-rank p95 on successful replies. As an illustrative quality gate, require 300 recorded probe outcomes and at least 100 valid RTTs before evaluating latency. Monitor loss separately, including when that gate fails.
- Set a comparable baseline. Derive an accepted p95 baseline from repeated windows on the same route, protocol, payload and source, then compare it with the application's absolute latency budget. An idle baseline alone is insufficient for a service that normally runs under load.
- Require duration. Example: p95 above twice baseline continuously for 10 minutes of valid evaluations opens a latency alert. Clear it only after p95 remains below 1.5 times baseline for 15 minutes. A scheduler must measure elapsed time, not assume a count of irregular evaluations equals minutes. These multipliers and durations need validation for your service.
- Handle missing telemetry explicitly. Three missed scheduled probe outcomes indicate a collection gap; a recorded ICMP timeout is instead a valid failure outcome. Missing or insufficient data resets pending trigger/recovery timers and must not auto-resolve an open alert. Raise a separate coverage signal.
- Keep the diagnoses separate. Route collection failures, observed probe loss and sustained latency to the relevant owner. Overlapping five-minute windows are correlated, so repeated evaluations are not independent confirmations.
A documented baseline makes those comparisons possible, and the approach in the performance baseline guide covers how to record one that stays comparable across weeks.
Before relying on any built-in chart or alert for this, verify what the product measures and at what interval. Not every monitoring tool exposes delay variation natively, and assuming it does leads to a dashboard that looks authoritative and reports something else entirely. Compare the tracked distribution with what users report, and let the user impact decide whether a threshold is set correctly.
Confirm the Pattern on One Host Before Scaling
Pick one client and one target that matter to users. Run the idle and loaded windows, save the raw output with start and stop times, and read the p95 spread and loss count against the interpretation table before drawing any conclusion.
For a complementary outside view, create one ICMP or application check in Fivenines uptime monitoring. The current service offers HTTPS, TCP, ICMP and DNS checks from US East, EU West, AP Southeast and Africa South, with selectable regions and response time per region. Choose the protocol and regions relevant to your users, then confirm a successful check and its response time history.
A remote probe has a different observation point from your local client. Establish its own baseline rather than expecting identical RTTs. Regional response time is not a native jitter chart, and an HTTPS response time is not the same measurement as ICMP RTT.
For a device inside the path, network device monitoring polls explicitly added SNMP v2c/v3 devices through a local host running the Fivenines agent and net-snmp. Use the relevant interface's traffic, errors, discards and link state to add context. These counters do not directly measure jitter or identify every packet's path; verify the interface mapping before correlating them with the client captures.
Keep the manual captures alongside those ongoing checks. Start with one endpoint, review its regional availability and response time, then add interface evidence where you control the device. Configure only alert conditions the selected monitor actually supports and test their delivery. You can open a Fivenines account to run that first check.