HTTP Cache Expiry Calculator

Enter the Cache-Control, Expires, Date and Age values of a response, the time it was received and the time to check. The calculator gives the freshness lifetime, the current age and whether the response is still fresh.

Type of cache
s
Freshness verdict (at the time to check) —
Freshness lifetime (how long the response can stay fresh; it does not change as time passes)
Freshness lifetime—
Source used—
Current age (the time since the response was generated; it grows as time passes)
Current age—
  Apparent age (time received − Date)—
  Value of the Age header—
  Age when received (the larger of the two above)—
  Time since it was received—
Remaining freshness
Remaining freshness (freshness lifetime − current age)—
Time it becomes stale—

    This is a calculation based on RFC 9111. Real browsers and CDNs do not always behave exactly as the standard describes. The response delay is taken as 0.

    What this calculator does

    It covers one part of RFC 9111, the HTTP caching standard: the freshness calculation. That is the part that decides whether a stored response may be reused without checking with the origin server. Validation (ETag, If-Modified-Since, 304), Vary and request-side Cache-Control are not covered.

    Freshness is not a refresh and not a deletion

    A response being stale only means that a cache may not reuse it without checking first. It does not mean that the browser screen refreshes by itself, and it does not mean that the file on the origin server is changed or deleted. Likewise, a response being fresh does not mean the file on the server has not changed. The Expires header, the standard says, "does not imply that the original resource will change or cease to exist at, before, or after that time". This calculator only works out the time arithmetic of the cached copy.

    Freshness lifetime and current age

    Which value sets the freshness lifetime

    Following section 4.2.1 of RFC 9111, the first match is used:

    Order Shared cache (CDN, proxy) Private cache (browser)
    1 s-maxage (s-maxage is not used)
    2 max-age max-age
    3 Expires − Date Expires − Date
    4 If none is present, there is no explicit expiration Same

    How the current age is calculated

    The formulas are from section 4.2.3 of RFC 9111:

    This calculator does not ask for the time the request was sent, so it takes the response delay (the time from sending the request to receiving the response) as 0. On a connection with a large delay, the calculated age can be smaller than the real one. The standard also allows using the Age header plus the delay alone.

    Rules for the input

    Other Cache-Control directives

    They are not used in the calculation, but they are shown as notes about reuse.

    Examples

    Input Result
    max-age=3600, no Age, 1,800 s after it was received Freshness lifetime 3,600 s, current age 1,800 s, 1,800 s remaining (fresh)
    The same, at exactly 3,600 s Current age 3,600 s. It equals the freshness lifetime, so it is stale
    max-age=3600, Age=600, just received Current age 600 s, 3,000 s remaining
    Shared cache with s-maxage=60, max-age=3600 Freshness lifetime 60 s (max-age is ignored)

    Things to know

    Sources and checks

    The following was checked against the full text of the standards on November 1, 2026:

    This calculator follows those sections for freshness only. Passing this calculation is not a claim that a product or a server conforms to the standard.

    Frequently asked questions

    What happens when both max-age and Expires are present?

    max-age takes priority and Expires is ignored (RFC 9111, section 5.3).

    Does s-maxage apply to a browser?

    s-maxage is a directive for shared caches. A private cache (a browser) does not use it.

    What is the Age header?

    It is the number of seconds, written by a cache along the way, since the response was generated or last checked at the origin. This calculator uses it to find the current age.

    Does a stale response disappear or refresh by itself?

    No. Stale only means a cache must check before reusing it. It does not refresh the screen or change anything on the origin server.

    How can I check a time?

    The Unix Timestamp Converter and the Cron Expression Calculator may help.