ARZENTIQ
DEVELOPER & DATA

TTL & Expiry Calculator

When a TTL expires and how long is left — from seconds, a Cache-Control header (max-age, s-maxage, stale-while-revalidate) or an expiry date — and DNS windows.

Expiry instant, remaining time, elapsed time, each Cache-Control directive as its own deadline, and for DNS changes the latest moment a cache honouring the old TTL could still serve it.

Example: max-age=600, s-maxage=3600, stale-while-revalidate=60 set at 10:00: browsers refetch at 10:10 (stale until 10:11), CDNs at 11:00; a DNS record changed under a 24 h TTL may linger a day.

v0.1.0 · last reviewed 20 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Seconds from a moment,
three ways to say it.

How each input style becomes an expiry, what the Cache-Control directives mean, and what the DNS window is.

Expiry arithmetic

A TTL is seconds counted from the moment the value was set (a DNS answer, a cache entry, a token). Expiry = set at + TTL; remaining = expiry − now. "Now" is the moment of calculation unless you pin it, and "set at" defaults to now too, so a bare TTL simply counts forward.

Cache-Control

max-age governs private (browser) caches, s-maxage overrides it for shared caches such as CDNs; stale-while-revalidate and stale-if-error extend serving past max-age while a refresh happens. Each directive is turned into its own deadline. no-store and no-cache are flagged because they change the meaning of the numbers.

DNS old-record window

After a DNS change, resolvers that cached the old record may keep answering with it until their copy’s TTL runs out — at most the previous TTL after your change. That is an upper bound for caches that honour TTLs; some clamp or ignore them, which no calculator can see. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

Last reviewed 20 September 2026. How results are checked: How we verify.