Loading...
← Other blogs

AI Tools

How many Codex tokens remain? The four-step math behind the percentage

OpenAI reports window allowances in percentages, not raw tokens. Here is how to estimate your remaining headroom.

• 2 min read

How many Codex tokens remain in your account cannot be answered as one exact token count, because OpenAI exposes Codex plan allowances as percentages rather than raw token balances. As UsageAtlas's Codex guide notes, no public endpoint returns an absolute token balance for a plan window, so the practical answer is reading the remaining percentage and converting it into a working estimate from your recent session totals.

Direct formula for estimating tokens left

Pair your Codex usage percentage with the token count from a real coding session:

  1. Check the window percentage before starting work.
  2. Finish a session and read the total tokens used in /status (in the TUI) or in UsageAtlas.
  3. Read the ending window percentage.
  4. Divide tokens used by percentage points consumed, then multiply by the points remaining.

Example: spending 12,000 tokens and seeing the window move from 80% to 76% gives roughly 3,000 tokens per percentage point, meaning 76% corresponds to about 228,000 tokens at that same model mix.

Why the conversion is always an estimate

Factor Effect on tokens per percentage point
Switching models Larger models drain percentage points faster per token
Prompt caching Cached input counts at OpenAI's cached rate rather than full raw sum
Plan window rules Five-hour and weekly limits govern different timeframes

Because OpenAI computes allowances in usage units rather than raw token counters, treat any token conversion as a rough guide for comparing sessions, and plan deadlines around the percentage itself.

Context remaining is not the same number

Every Codex thread also has a conversation context ceiling. Starting a new session resets conversation context and session token counts back to zero, giving the model room to read fresh files. Your window allowance, however, counts all sessions across your account and resets only when the five-hour or weekly timer flips.

Keeping the numbers visible on your desktop

Checking browser dashboards mid-debug breaks focus. UsageAtlas places Codex remaining percentages and reset countdowns next to local token counts on your desktop, alongside Claude Code, Cursor, OpenCode, GitHub Copilot and other coding tools. It is free, open source, local-first and requires no account for local tracking, without reading prompts or responses. Watch both the short five-hour window and the weekly allowance, because the short one can recover while the weekly cap keeps falling underneath. Setting an alert at 20% remaining gives you time to adjust models or wrap up before hitting a hard pause.

FAQ

Does starting a new chat restore my Codex token allowance?

No. A new session resets thread context only. Account-wide five-hour and weekly usage windows only recover when their reset timers arrive.

Where is the official Codex percentage displayed?

The official window percentages live on OpenAI's Codex usage dashboard, while /status shows active session context and tokens inside the CLI.

Are UsageAtlas cost and token estimates exact invoices?

No. UsageAtlas reads local session files to calculate token logs and cost estimates; OpenAI's usage and billing pages remain authoritative.

Originally published on claudegpt.si