Token Counter & Cost Preview

Paste text for a fast planning estimate, then compare one call across the source-linked model catalog. Provider tokenizers may produce different counts.

Your text

Estimated input tokens
0

Approximation only


Characters: 0

Words: 0

Lines: 0

Heuristic: CJK characters ≈ 0.7 token each; Latin prose ≈ 4 characters/token; symbol-dense code ≈ 3.3 characters/token. Verify production usage with your provider.

Estimated cost for one call

ModelInput / output per 1MInput estimateOutput estimateTotal / call1,000 calls
This tool does not implement each provider's production tokenizer and excludes caching, taxes, account tiers, and non-token fees. For volume and cache assumptions, use the API cost calculator. Read the full methodology.

How this estimate is produced

The counter runs entirely in your browser. It separates CJK characters from other text and adjusts the character-to-token heuristic when the input contains many symbols, as code often does. The displayed range adds a ±15% planning margin. No pasted text is sent to AI Agent Hub.

Useful for

Early prompt budgeting, comparing concise and verbose prompt versions, estimating retrieved context, and spotting unexpectedly large conversation histories.

Not a tokenizer

Every model family can split text differently. Special tokens, images, audio, tool definitions, and provider message formatting are not reproduced here.

Production check

Before purchasing capacity, compare this estimate with the token usage returned by the exact provider endpoint and model version you will deploy.

Why prompt size changes system cost

Longer input can increase both direct token charges and latency. In an agent, tool results and prior steps may be appended repeatedly, so the final request can be much larger than the user's message. Output length matters independently and is often billed at a different rate.

Privacy and accuracy notes

Frequently asked questions

It is a planning heuristic, not a tokenizer. The page counts CJK characters at roughly 0.7 tokens each, ordinary Latin prose at about 4 characters per token, and symbol-dense code at about 3.3 characters per token. Use it to size a workload, then confirm with your provider's own counting endpoint before budgeting.
No. Each provider ships its own tokenizer, and the same prompt can produce noticeably different counts across models. That is why a token estimate should always be attributed to a specific model rather than treated as a universal figure.
Everything that will actually be sent: the system message, retrieved documents, tool results, few-shot examples, and the conversation history you intend to carry. Estimating only the newest user message is the most common way to undercount.
No. The estimate runs in your browser and your text is not sent to AI Agent Hub servers. The page does load third-party advertising scripts, which operate under their own policies.