GPT-5.4 Token Counter

Estimated token count and cost for GPT-5.4, worked out in your browser.

0 characters0 words
Tokens~95% estimate
0
Estimated cost
Input
$0.00
$2.5/1M tokens
Output
$0.00
$15/1M tokens
Context window0 / 1,050,000
0.00% used

This count is an estimate, not an exact figure

Worth saying up front, because it is the opposite of what people assume about an OpenAI model. GPT-5.4 is counted here with the o200k_base encoding, which is the right family of tokeniser but not a guarantee that the served model tokenises identically.

Treat the number as close rather than authoritative. On ordinary English prose it will be within a few percent. On code, on CJK text and on unusual formatting the drift widens. If you are sizing something against a hard limit, leave headroom.

By contrast the Claude models, o3 and o4-mini on this site are counted exactly, because a real tokeniser for them runs locally.

A million-token window changes which question matters

At 1,050,000 tokens the interesting question stops being whether your input fits and becomes what it costs to send it.

Filling the window once is $2.63 in input alone at $2.50 per million. In a multi-turn conversation you pay that on every turn unless the provider's caching is doing work for you. A long-context workload without caching gets expensive faster than most people plan for.

More detail

The cost shape

$2.50 per million input, $15 per million output. The 6 to 1 ratio means output dominates most conversational bills. A 50,000-token document costs 13 cents to send; a 5,000-token analysis of it costs 8 cents to receive, and the analysis is the part you cannot cache.

If your bill is growing, measure the split before optimising. Shortening prompts is the instinct and is usually the wrong lever.

What is not in this number

The system prompt, tool definitions, per-message framing, and any images. Tool schemas are billed on every request, so an agent with a large toolset carries a substantial fixed input cost before your message is counted at all.

Questions

Why is an OpenAI model only estimated here?

Because a locally-runnable tokeniser matching the served model is not published for it. The o200k_base encoding is the correct family and gets close, but this page labels it an estimate rather than presenting it as exact.

How far off can the estimate be?

Within a few percent for ordinary English prose. Wider on code, on languages that do not use spaces, and on heavily formatted text. Leave headroom if you are sizing against a hard context limit.

Does using the full context window cost a lot?

Yes. Filling 1.05 million tokens is about $2.63 in input alone, and you pay it again on every turn unless caching applies. Long-context workloads are usually caching problems more than they are context problems.

Is my text uploaded to count it?

No. The encoding runs in your browser with a bundled vocabulary. Nothing you paste leaves the page.

Related tools