How NTP Works in 5 Minutes
The protocol that keeps billions of devices in sync — explained simply
What Is NTP?
NTP (Network Time Protocol) is one of the oldest internet protocols still in use. Created in 1985, it has a single job: keep your computer's clock accurate by comparing it to reliable time references over the network.
Every device you own — your phone, laptop, smart TV, Wi-Fi router — uses NTP (or a variant) to stay in sync. Without it, your clock would drift by seconds per day, and modern internet services would break down.
Why Accurate Time Matters
You might think "a few seconds off" is no big deal. But many services you rely on daily depend on accurate time:
- Two-factor authentication (2FA) — Google Authenticator, Microsoft Authenticator, and similar apps generate codes based on the current time. If your clock is off by more than 30 seconds, your codes won't work.
- HTTPS / SSL certificates — Your browser checks certificate validity dates. A wrong clock can make valid certificates appear expired (or expired ones appear valid).
- File synchronization — Services like Dropbox, OneDrive, and Google Drive use timestamps to decide which version of a file is newer.
- Online gaming — Multiplayer games rely on synchronized clocks for fair play, hit detection, and anti-cheat systems.
- Banking & payments — Financial transactions require tamper-proof timestamps for regulatory compliance.
The Stratum Hierarchy
NTP organizes time servers in a hierarchy called strata (plural of stratum). Think of it as layers of trust, where each layer is one step further from the ultimate time source:
Atomic clocks, GNSS receivers (GPS, Galileo), radio clocks
Not directly accessible via NTP
Directly connected to Stratum 0 via PPS or serial
Example: RDEM Systems Stratum 1
Sync from Stratum 1 servers over the network
Most public NTP pool servers are Stratum 2
Your computer, phone, router sync from Stratum 2/3 servers
Still accurate within milliseconds
How Synchronization Works
NTP doesn't just ask "what time is it?" — it's much cleverer than that. It needs to account for the time it takes for the message to travel across the network.
The 4-Timestamp Method
Every NTP exchange involves 4 timestamps:
- T1 — Client sends request (client records the time)
- T2 — Server receives request (server records the time)
- T3 — Server sends response (server records the time)
- T4 — Client receives response (client records the time)
From these 4 timestamps, the client can calculate:
- Network delay = (T4 - T1) - (T3 - T2)
- Clock offset = ((T2 - T1) + (T3 - T4)) / 2
Gradual Correction (Slewing)
NTP doesn't suddenly jump your clock forward or backward. Instead, it gently speeds up or slows down your system clock until it matches the correct time. This prevents disruption to running applications that depend on time flowing smoothly.
Only if the offset is very large (typically over 128 ms at startup) will NTP perform an abrupt correction called a step.
What Your Computer Does
Windows
Windows uses the Windows Time Service (w32tm). By default, it syncs with time.windows.com — a Microsoft NTP server. In Active Directory environments, domain controllers handle time sync automatically through the domain hierarchy.
macOS
macOS syncs with time.apple.com by default. You can check and change this in System Settings > General > Date & Time.
Linux
Most Linux distributions use one of three NTP clients:
- chrony — Modern, fast, recommended for most setups
- systemd-timesyncd — Lightweight, built into systemd (Ubuntu default)
- ntpd — Classic NTP daemon, still used on some servers
Smartphones
Both Android and iOS sync time automatically using a combination of NTP and carrier-provided time. This is why your phone almost always shows the correct time.
NTP by the Numbers
NTP is specified in RFC 5905 (NTPv4, published in 2010). The newer security extension, NTS (Network Time Security), is defined in RFC 8915 (2020).
Frequently Asked Questions
What is NTP and what does it do?
NTP (Network Time Protocol) synchronizes computer clocks over the internet. It automatically corrects your system's time by comparing it to highly accurate reference clocks, keeping all devices within milliseconds of the correct time.
How accurate is NTP synchronization?
Over the internet, NTP typically achieves accuracy within 1–50 milliseconds. On a local network (LAN), accuracy can reach sub-millisecond levels. Stratum 1 servers connected directly to GNSS receivers achieve microsecond accuracy.
What are NTP stratum levels?
Stratum levels represent the distance from the reference clock. Stratum 0 is the atomic clock or GNSS receiver itself. Stratum 1 servers connect directly to Stratum 0 sources. Stratum 2 servers sync from Stratum 1, and so on up to Stratum 15. Stratum 16 means "unsynchronized".
Does my computer already use NTP?
Yes, most modern operating systems use NTP by default. Windows uses the Windows Time Service (w32tm), macOS uses timed, and Linux typically uses chrony, systemd-timesyncd, or ntpd. However, these defaults may not always be optimally configured.
What is the NTP Pool?
The NTP Pool Project is a worldwide cluster of volunteer-operated NTP servers. When your system connects to pool.ntp.org, it's automatically directed to a nearby server. Organizations like RDEM Systems contribute servers to this pool.
Test Your NTP Right Now
See your system's current offset against a Stratum 1 GNSS reference. Instant results, no installation required.
A service by RDEM Systems · See also: NTP diagnostics · reference architecture: 12 dual-stack NTP servers (fr)