Frequently Asked Questions
How does the NTP (Network Time Protocol) Clock Offset (θ) & Round-Trip Delay (δ) Calculator perform the calculation?
It evaluates Offset θ = [ (t₂ − t₁) + (t₃ − t₄) ] / 2; RoundTripDelay δ = (t₄ − t₁) − (t₃ − t₂) directly in your browser and renders three custom SVG charts in real time.
What does the out-of-order timestamps message mean?
It means the four readings cannot come from a real exchange. The server must send no earlier than it receives, the client must receive no earlier than it sends, and the client's total wait must cover the server's holding time. Any of these failing stops the calculation. Recheck which reading went in which field, and confirm all four are in milliseconds on the same timeline.
Does a large offset mean my network is slow?
Not by itself. Offset measures how far apart the two clocks are, and delay measures the network. A machine with a badly set clock on a fast LAN can show a large offset with a tiny delay. A slow network mainly widens the uncertainty, because the offset can be wrong by up to half the delay if the path is lopsided.
How accurate is the offset for the default exchange?
Within half the round-trip delay, so 12 ms plus or minus 30 ms. That bound only assumes nothing travels backwards in time. If you know the path is symmetric, such as a direct cable, the true figure is close to 12 ms. If one direction is much slower, such as an asymmetric broadband link, the true offset can sit anywhere in that band.
Can I use this for PTP or another time protocol?
The four-timestamp arithmetic is the same in Precision Time Protocol, which also derives offset and delay from a request, two remote readings and a reply. The numbers will be far smaller, often well under a millisecond, and PTP hardware stamps packets at the network interface to shrink errors. Enter the values in milliseconds with decimals and the formulas still apply.
Why does my NTP client report a different offset from this calculation?
A daemon does not report one exchange. It filters several samples, prefers those with the lowest delay, and may combine several servers before quoting an offset. It may also apply corrections for its own polling. This tool shows the raw figure from the single exchange you entered, so expect it to bounce around more than the smoothed number in a peer listing.
What does the one-way delay line tell me?
It is half the round-trip delay, which is 30 ms for the defaults. It is not a measured one-way time, since NTP cannot measure each leg separately. Treat it as the average leg if the path were symmetric, and as the maximum possible error on the offset if it is not. Real one-way times can differ a lot in each direction.
Should I worry about a server processing time of several milliseconds?
Not for accuracy, since the tool removes it from the delay and it does not touch the offset, provided the server stamped t2 and t3 correctly. A busy server holding requests for a long time may stamp less precisely, though. A processing time far above the 2 ms default on a server that is usually quick is a hint to try another server.
Why does the offset change when only the client receive time changes?
Because t4 appears in both formulas. A later t4 lengthens the delay and makes the return leg look longer, and the averaging spreads that extra time evenly across both legs. On a zero-based timeline, moving t4 from 62 to 82 ms turns a 12 ms offset into 2 ms and a 60 ms delay into 80 ms.
Is it safe to step a production clock by the offset shown here?
Treat this as an analysis tool, not a control input. A single sample can be wrong by up to half its delay, and stepping a server clock can upset logs, databases and scheduled jobs. Normal practice is to let an NTP daemon slew the clock gradually using many samples. Use this page to understand or explain a measurement before changing anything.
How do I spot a timestamp entered in the wrong field?
Gross mistakes such as a reply arriving before its request are caught with an out-of-order message. Subtler ones are not. The processing time, t3 minus t2, should be small, like the 2 ms default. The delay should be no longer than you would expect for the path. An offset far larger than any plausible clock error usually points to mixed units or a wrong base value.
Four timestamps from one NTP exchange
An NTP query is a single round trip, and four clock readings come out of it. The client notes its own time when the request leaves, t1. The server notes its time when the request arrives, t2, and again when the reply leaves, t3. The client notes its own time once more when the reply comes back, t4. Two of those readings come from the client clock and two from the server clock, and the whole trick of NTP is that the two clocks never have to agree for the arithmetic to work.
The defaults describe a plausible exchange: t1 = 1000 ms, t2 = 1042 ms, t3 = 1044 ms and t4 = 1062 ms. From those the calculator reports a clock offset of 12 ms, a round-trip delay of 60 ms, a one-way delay of 30 ms and a server processing time of 2 ms. The sentence below the result says the server clock is +12 ms relative to the client.
Some references number the timestamps t0 to t3 rather than t1 to t4. The formulas are identical once you map them across: the first client reading, the server receive, the server transmit and the final client reading, in that order.
Working the default: 12 ms offset, 60 ms delay
Offset is the average of two differences. The outbound leg, t2 minus t1, is 1042 minus 1000, or 42 ms. The return leg, t3 minus t4, is 1044 minus 1062, or minus 18 ms. Their sum is 24 and half of that is the 12 ms offset.
Delay is the time the client waited minus the time the server spent holding the packet. The client waited t4 minus t1, which is 62 ms. The server held the packet for t3 minus t2, which is 2 ms. Subtract and you get the 60 ms round-trip delay, which the tool halves to 30 ms for the one-way figure.
Why does this work when the clocks disagree? Each leg mixes real travel time with the clock difference. On the outbound leg the offset is added; on the return leg it is subtracted. Averaging the two legs cancels the travel time if it is the same both ways, and leaves the offset. Adding the two legs instead cancels the offset and leaves the travel time. That is why only differences matter. Enter 0, 42, 44 and 62 instead of the defaults and the answer is still 12 ms and 60 ms.
Which way the sign points
A positive offset means the server clock reads ahead of the client clock. The client should move its clock forward by that amount. With the defaults the server is 12 ms ahead, so a client that trusted this server would advance itself by 12 ms.
Make the server reading earlier and the sign flips. With t1 = 0, t2 = 10, t3 = 12 and t4 = 62, the offset is minus 20 ms and the delay is still 60 ms. The server now runs 20 ms behind the client, so the client would step or slew back by 20 ms.
This matches the convention used by common NTP tools, where a positive offset in a peer listing means the local clock is behind that peer. If you copy timestamps from a packet capture and the sign looks backwards, check that you have not swapped t2 and t3, or t1 and t4. Swapping the client readings would make the reply arrive before the request left, and the calculator refuses that combination with an out-of-order message rather than printing a figure.
The symmetric-path assumption and its 30 ms error bound
Everything above rests on one assumption: the request and the reply take the same time to travel. When they do, the offset is exact. When they do not, the error shows up in the offset, and the delay figure gives no hint of it.
Here is a concrete case. Suppose the two clocks agree exactly, the request takes 50 ms to reach the server, the server holds it for 2 ms and the reply takes 10 ms back. The readings are t1 = 0, t2 = 50, t3 = 52 and t4 = 62. The calculator reports an offset of 20 ms and a delay of 60 ms. The true offset is zero, so that 20 ms is pure path asymmetry. A perfectly symmetric 30 ms each way, entered as 0, 30, 32 and 62, gives an offset of 0 ms with the same 60 ms delay.
The worst case is when the whole round trip happens in one direction. The offset error can therefore never exceed half the round-trip delay, which is the 30 ms one-way figure shown for the defaults. Read that line as the uncertainty band on the offset: the true offset lies somewhere in 12 ms plus or minus 30 ms. A short, quiet path gives a tight band; a congested or routed path gives a wide one.
Server processing time and why it is excluded
The fourth line, t3 minus t2, is how long the server held the request before answering. For the defaults it is 2 ms. That time is spent inside the server, not on the wire, so it is removed from the delay and has no effect on the offset.
Raise t3 to 1062, so the server holds the request for 20 ms, and the delay falls to 42 ms while the offset becomes 21 ms. The client still waited 62 ms in total, but less of that was network time. Without the server's own two readings, a client would mistake slow server processing for a long network path.
A server cannot send its reply before it receives the request, so the calculator checks the order. If t3 is earlier than t2, if t4 is earlier than t1, or if the client's total wait is shorter than the server's holding time, it stops with a message that the timestamps are out of order. Entering 0, 42, 40 and 62 triggers it. When you see that message, the readings are almost always in the wrong fields or in mixed units.
What moving a single timestamp does
Each input feeds both formulas, so changing one value usually moves offset and delay together. Moving t4 later by 20 ms, so the reply arrives at 82 on a zero-based timeline, lengthens the delay from 60 to 80 ms and cuts the offset from 12 to 2 ms. The extra time is split evenly between the two legs, so half of it comes off the offset.
The page's comparison presets show how the error band scales. A LAN exchange of 1000, 1001.5, 1001.7 and 1002.2 ms gives an offset of 0.5 ms, a delay of 2 ms and a band of plus or minus 1 ms. A long-haul exchange of 1000, 1095, 1096 and 1181 ms gives an offset of 5 ms with a delay of 180 ms, so the true offset could sit anywhere within 90 ms of that figure. The long-haul offset is small, but it is far less certain than the LAN one.
This is also why a single NTP sample is not trusted on its own. Real clients keep the last several exchanges and favour the one with the lowest delay, since it has the narrowest error band. The calculator handles one exchange at a time, so run your best few samples and compare their offsets against their delays.
Getting timestamps into milliseconds
The fields expect plain milliseconds on any consistent timeline. Raw NTP packets carry 64-bit timestamps in seconds and fractions, and packet capture tools often display them as wall-clock times. Before entering them, convert all four to milliseconds and, to keep the numbers small, subtract the same base value from each. Since only differences matter, the offset and delay do not change.
Decimals are accepted. The LAN preset reads 1000, 1001.5, 1001.7 and 1002.2 ms, which gives an offset of 0.5 ms, a round trip of 2 ms and a server processing time of 0.2 ms. The interpretation sentence rounds to two decimal places, so microsecond detail beyond that is shown in the result lines but trimmed in the text.
Do not mix units. A common slip is pasting server timestamps in seconds alongside client readings in milliseconds, which produces offsets of hundreds of milliseconds or more that look real. If the result is far larger than the delay would allow, check units before anything else.
The server behind the 12 ms answer
The calculator takes only the four timestamps. It does not ask for the server's stratum, which is its distance from a reference clock: a server wired to GPS or an atomic source is stratum 1, a server synchronised from it is stratum 2, and so on. Stratum affects how much a client trusts a server, but it does not enter the offset or delay arithmetic for a single exchange.
What the calculator measures is the offset to whichever server answered. If that server is itself off, the 12 ms you see is relative to its error, not to true time. A low-stratum server on a short, symmetric path gives the most meaningful figure. A high-stratum server over a long route can show a small offset and still be wrong by more than the 30 ms band suggests.
For troubleshooting, the useful comparison is across servers. Query two or three and enter each exchange. If their offsets agree within their error bands, your clock is the problem. If one disagrees badly, the server or its path is.