Free browser token calculator
Token Calculator for LLMs
Use this token counter to count tokens locally for prompts, documents, code, JSON, and chat messages, then estimate LLM API cost across major providers.
Paste text to count tokens
Token visualization
Pieces appear as the local tokenizer reads your text.
Token summary
Cost snapshot
Paste text to turn the pricing table into exact estimated costs for your prompt.
What is a token calculator?
A token calculator, sometimes called a token counter, estimates how much text an LLM will process before you send a request. Tokens are the units used for context limits and API billing, so the count matters for prompts, documents, code, JSON, and chat transcripts. Token-Calculator.net runs the browser calculator locally, shows word and character counts alongside tokens, and turns the same count into estimated input, cached-input, and output costs for major model providers.
Use it when you need to check whether a prompt fits a context window, compare model cost before an API call, trim repeated instructions, or explain usage to a product or finance team.
Prompt planning
Estimate token count before a user prompt, system prompt, or multi-turn chat goes to an LLM.
Document checks
Paste policy text, research notes, transcripts, or long-form content to judge request size.
Code and JSON
Measure structured data, code snippets, logs, and payloads that often use tokens differently from prose.
Cost comparison
Use one token count to compare OpenAI, Claude, and Gemini pricing before choosing a model.
How to use the token calculator
- 1Paste the text you want to measureUse a prompt, document excerpt, code snippet, JSON payload, or chat message.
- 2Read the token, word, and character countThe calculator updates locally in the browser and keeps the text on your device.
- 3Compare estimated LLM costUse the token count with OpenAI, Claude, and Gemini pricing rows to estimate input, cached-input, and output cost.
- 4Adjust the prompt before using an APIShorten repeated instructions, split long context, or choose a lower-cost model when the estimate is too high.
Token calculator by use case
The main calculator works for general LLM planning. These focused guides explain provider and conversion-specific cases without changing how the browser calculator works.
Compare Token Costs
Compare input, cache-read, and output pricing across major LLM providers. Long-context tiers are applied automatically. Estimates use standard paid text rates and exclude cache writes and storage, Batch, Flex, Priority, tools, and media charges.
Full model pricing table
Rates update the estimates above as soon as you paste text.| Model | Provider | Context | Current rate / 1M tokens | Estimated cost | Pricing tier |
|---|---|---|---|---|---|
| GPT-5.6 Sol | OpenAI | 1,050K / 128K | Input $5 Cache read $0.5 Output $30 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard Long context after 272K input: input $10, cache read $1, output $45. |
| GPT-5.6 Terra | OpenAI | 1,050K / 128K | Input $2.5 Cache read $0.25 Output $15 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard Long context after 272K input: input $5, cache read $0.5, output $22.5. |
| GPT-5.6 Luna | OpenAI | 1,050K / 128K | Input $1 Cache read $0.1 Output $6 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard Long context after 272K input: input $2, cache read $0.2, output $9. |
| GPT-5.5 | OpenAI | 1,050K / 128K | Input $5 Cache read $0.5 Output $30 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard Long context after 272K input: input $10, cache read $1, output $45. |
| GPT-5.5 Pro | OpenAI | 1,050K / 128K | Input $30 Cache read Not offered Output $180 | Input $0.0000 Cache read Not offered Output $0.0000 | Standard Long context after 272K input: input $60, cache read Not offered, output $270. |
| GPT-5.4 | OpenAI | 1,050K / 128K | Input $2.5 Cache read $0.25 Output $15 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard Long context after 272K input: input $5, cache read $0.5, output $22.5. |
| GPT-5.4 Mini | OpenAI | 400K / 128K | Input $0.75 Cache read $0.075 Output $4.5 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| GPT-5.4 Nano | OpenAI | 400K / 128K | Input $0.2 Cache read $0.02 Output $1.25 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| GPT-5.4 Pro | OpenAI | 1,050K / 128K | Input $30 Cache read Not offered Output $180 | Input $0.0000 Cache read Not offered Output $0.0000 | Standard Long context after 272K input: input $60, cache read Not offered, output $270. |
| Claude Fable 5 | Anthropic | 1M / 128K | Input $10 Cache read $1 Output $50 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| Claude Sonnet 5 | Anthropic | 1M / 128K | Input $2 Cache read $0.2 Output $10 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| Claude Mythos 5 (limited availability) | Anthropic | 1M / 128K | Input $10 Cache read $1 Output $50 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| Claude Opus 4.8 | Anthropic | 1M / 128K | Input $5 Cache read $0.5 Output $25 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| Claude Sonnet 4.6 | Anthropic | 1M / 128K | Input $3 Cache read $0.3 Output $15 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| Claude Haiku 4.5 | Anthropic | 200K / 64K | Input $1 Cache read $0.1 Output $5 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
| Gemini 3.6 Flash | 1,048K / 65K | Input $1.5 Cache read $0.15 Output $7.5 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard | |
| Gemini 3.5 Flash | 1,048K / 65K | Input $1.5 Cache read $0.15 Output $9 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard | |
| Gemini 3.5 Flash-Lite | 1,048K / 65K | Input $0.3 Cache read $0.03 Output $2.5 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard | |
| Gemini 3.1 Pro Preview | 1,048K / 65K | Input $2 Cache read $0.2 Output $12 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard Long context after 200K input: input $4, cache read $0.4, output $18. | |
| Gemini 3.1 Flash-Lite | 1,048K / 65K | Input $0.25 Cache read $0.025 Output $1.5 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard | |
| Gemini 2.5 Pro | 1,048K / 65K | Input $1.25 Cache read $0.125 Output $10 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard Long context after 200K input: input $2.5, cache read $0.25, output $15. | |
| Gemini 2.5 Flash | 1,048K / 65K | Input $0.3 Cache read $0.03 Output $2.5 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard | |
| Gemini 2.5 Flash-Lite | 1,048K / 65K | Input $0.1 Cache read $0.01 Output $0.4 | Input $0.0000 Cache read $0.0000 Output $0.0000 | Standard |
Token Calculator FAQ
Quick answers for token counts, local browser processing, model price comparisons, and prompt planning.
Learn how token counts affect cost
These guides explain AI tokens, tokenization, word-to-token ratios, cached input pricing, context windows, and prompt optimization without crowding the calculator page.
Need token counts in your app?
Use the paid Token-Calculator.net API for metered token, character, and word counts with key-based access. The browser calculator remains free; API access requires an active subscription.