Transparent approximation
The page labels cl100k_base as an estimate so you can distinguish useful planning data from provider-side billing totals.
Estimate Gemini-compatible text tokens and API cost locally, with a clear note about what a browser-side approximation can and cannot do.
Local token pieces update 0.5 seconds after you stop typing.
Paste text above to see how the selected local encoder splits it into tokens.
Local calculation. Your text stays in this browser. Nothing is uploaded or stored by Tokens Calculator.
Compare the same text using the available local encodings and current list-price estimates.
| Model | Tokens | Input / 1M | Input cost |
|---|---|---|---|
| GPT-4oOpenAI | 0 | $2.50 | $0.000000 |
| GPT-4OpenAI | 0 | $30.00 | $0.000000 |
| Claude 3.5 SonnetAnthropic | 0 | $3.00 | $0.000000 |
| Claude Sonnet 4.6Anthropic | 0 | $3.00 | $0.000000 |
| Gemini 2.5 FlashGoogle | 0 | $0.30 | $0.000000 |
| Gemini 2.5 ProGoogle | 0 | $1.25 | $0.000000 |
Claude and Gemini counts are useful approximations using cl100k_base; provider tokenizers can differ by model version and text.
The page labels cl100k_base as an estimate so you can distinguish useful planning data from provider-side billing totals.
The Gemini 2.5 Pro reference changes at 200K input tokens, matching the standard published rate tiers in pricing.ts.
No API key, network request, or provider call is required to count the text you paste here.
Paste the text portion of a prompt or response into the calculator.
Choose Gemini 2.5 Flash or Gemini 2.5 Pro to apply its configured list-price rate.
Review the local cl100k_base approximation and input or output estimate before confirming a provider-specific count.
No. This static tool uses cl100k_base as a useful browser-side text approximation because it intentionally ships only local open BPE encodings. Google’s exact Gemini count can differ.
The selector includes Gemini 2.5 Flash and Gemini 2.5 Pro standard text rates. Gemini 2.5 Pro switches to a higher standard rate above 200K input tokens, which the local estimate accounts for.
No. It is a fully local browser calculator. It does not call Google, submit your content, or require an API key.
Model pricing, context tiers, tools, audio or media inputs, caching, taxes, and regional terms can affect a real invoice. Follow the provider link before making a production budget decision.
Every tool runs token counting in your browser. Keep your text local while you move between calculators and guides.
Not affiliated with Anthropic, OpenAI or Google.