Skip to content
Calcrivo

OAuth Token Lifetime Calculator

Balance OAuth access and refresh token lifetimes against token endpoint load and the revocation delay they create.

Inputs

minutes
days
users
hours
calls

Token Refreshes per User per Day

7

Token Endpoint Requests per Day

140,000

Average Token Endpoint Rate

1.620req/s

Revocation Delay

1h

API Calls Served per Access Token

40

Token Exposure Score

48/ 100

Exposure Level

Medium

Step by step

  1. Values used

    Access token lifetime = 60 minutes; Refresh token lifetime = 90 days; Daily active users = 20,000 users; Active session hours per user per day = 8 hours; API calls per user per hour = 40 calls

  2. OAuth Token Lifetime

    refreshes per user per day = ceil(active session minutes ÷ access token lifetime) − 1, and token endpoint load = refreshes × daily active users.

  3. Revocation delay

    revocation delay = access token lifetime, because a bearer token stays valid until it expires unless the resource server introspects every call.

  4. Token Refreshes per User per Day

    = 7

  5. Token Endpoint Requests per Day

    = 140,000

  6. Average Token Endpoint Rate

    = 1.620 req/s

  7. Revocation Delay

    = 60

  8. API Calls Served per Access Token

    = 40

  9. Token Exposure Score

    = 48 / 100

How it works

Access token lifetime sets both the refresh rate and the revocation delay, and the two pull in opposite directions. Halving the lifetime doubles token endpoint traffic but halves how long a stolen or revoked token keeps working, since resource servers that only validate signatures cannot know a token was withdrawn. This one number decides how long a compromised session survives after you disable the account, and teams routinely discover during an incident that a 24-hour access token means a 24-hour eviction delay.

Formulas

OAuth Token Lifetime

refreshes per user per day = ceil(active session minutes ÷ access token lifetime) − 1, and token endpoint load = refreshes × daily active users.

access token lifetime
How long a bearer token is accepted by resource servers
refresh token lifetime
How long a client may keep minting new access tokens

Revocation delay

revocation delay = access token lifetime, because a bearer token stays valid until it expires unless the resource server introspects every call.

introspection
Per-call token status check that trades latency for immediate revocation

Frequently Asked Questions

How is OAuth Token Lifetime calculated?

refreshes per user per day = ceil(active session minutes ÷ access token lifetime) − 1, and token endpoint load = refreshes × daily active users. Access token lifetime sets both the refresh rate and the revocation delay, and the two pull in opposite directions. Halving the lifetime doubles token endpoint traffic but halves how long a stolen or revoked token keeps working, since resource servers that only validate signatures cannot know a token was withdrawn.

Why does OAuth Token Lifetime matter?

This one number decides how long a compromised session survives after you disable the account, and teams routinely discover during an incident that a 24-hour access token means a 24-hour eviction delay.

What values do I need to enter?

This calculator takes 5 inputs: Access token lifetime, Refresh token lifetime, Daily active users, Active session hours per user per day, API calls per user per hour. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

What is a sensible access token lifetime?

Sixty minutes is the common default and is what Microsoft Entra ID issues (randomised between 60 and 90 minutes to avoid stampedes). Five to fifteen minutes is appropriate for high-value APIs, and anything beyond a few hours should be paired with token introspection so revocation is not deferred.

How can I revoke access faster without shortening the token?

Have resource servers call the introspection endpoint, or use short-lived tokens with a revocation-checked refresh, so the identity provider is consulted while the session continues. Continuous access evaluation, which pushes revocation events to resource servers, achieves the same result without per-call latency.

You might also need