New blogMaking an AI Agent You Can Trust With Money

★ Will this fit in context?

LLM Token Counter

Paste a prompt and see the token count on every major model, the input cost per call, and how much of the context window it eats. Every count says whether it's exact or an estimate.

  • Runs in your browser
  • No signup
306
Characters
54
Words
—
Tokens / word

Tokens per word uses the o200k_base count. Characters count emoji and accented letters as one each.

Tokens

…

✓ Exact

Counted with o200k_base, OpenAI's published tokenizer, in your browser.

Context window used

—

1.05M tokens window on GPT-6.1 Sol.

Input cost per call

—

Per 1,000 calls

—

Every model, same text

ModelTokensAccuracyInput / call
Claude Fable 5.1Anthropic…≈ Estimate—
Claude Opus 5.5Anthropic…≈ Estimate—
Claude Sonnet 5.5Anthropic…≈ Estimate—
Claude Haiku 5.5Anthropic…≈ Estimate—
GPT-6 AstraOpenAI…✓ Exact—
GPT-6.1 SolOpenAI…✓ Exact—
GPT-6 LunaOpenAI…✓ Exact—
Gemini 4 ArgonGoogle77≈ Estimate$0.00015
Gemini 3.8 FlashGoogle77≈ Estimate$0.00006
Gemini 3.1 Flash-LiteGoogle77≈ Estimate$0.00002
Mistral Large 4Mistral…≈ Estimate—
Mistral Small 4Mistral…≈ Estimate—
DeepSeek V4.1 FlashDeepSeek92≈ Estimate$0.00003
DeepSeek V4 ProDeepSeek92≈ Estimate$0.00012
Llama (open weights)Meta…≈ Estimate—

OpenAI rows use o200k_base, exact for that tokenizer. tiktoken hasn't mapped GPT-6 model names yet, so OpenAI hasn't confirmed GPT-6 uses it. Input cost is list price for your text alone, before system prompts, caching or output.

See the tokens

o200k_base

Loading the tokenizer…

Your tokens on GPT-6.1 Sol.

Prompts eating your context window? I build RAG and prompt pipelines that use a fraction of the tokens.

Shrink my prompts
01

What a token is

A token is the chunk of text a model reads and bills by. It can be a word, part of a word, a space plus a word, or punctuation. Here's one sentence split by o200k_base, OpenAI's current published tokenizer:

Founders ship faster when the AI bill isn't a surprise.

55 characters · 10 words · 12 tokens

Notice the leading spaces: “ ship” and “ship” are different tokens. Common English words are one token each, while contractions and punctuation split off. You pay for input tokens on every call, and the context window caps how many fit.

02

Why counts differ by model

Every model family ships its own tokenizer with its own vocabulary, so the same text becomes a different number of tokens. Some providers publish their tokenizer, some expose a counting API, and some do neither. This tool is upfront about which is which:

How each family is counted
FamilyHow we countResult
Claudeo200k_base as a stand-inEstimate
GPTo200k_base tokenizer, in your browserExact
GeminiGoogle's countTokens endpoint (server key), else ~4 chars per tokenExactwith key, elseEstimate
Llamao200k_base as a stand-inEstimate
DeepSeekDeepSeek's published per-character ruleEstimate
Mistralo200k_base as a stand-inEstimate
03

Rules of thumb

Published by the providers themselves, for English text:

  • OpenAI: about 4 characters or three-quarters of a word per token, so about 100 tokens per 75 words. Source
  • Google Gemini: about 4 characters per token; 100 tokens is about 60 to 80 English words. Source
  • DeepSeek: about 0.3 tokens per English character and 0.6 per Chinese character. Source

All three say the same thing in different words: other languages, code and unusual formatting cost more tokens per character. When the number matters, count it rather than estimate it.

04

Questions people actually ask

What is a token?
A token is the chunk of text a language model reads and bills by. It can be a whole word, part of a word, a space plus a word, or punctuation. Each model family splits text with its own tokenizer, so the same sentence can be a different number of tokens on different models.
Which counts on this page are exact?
OpenAI rows are exact for o200k_base, OpenAI's published tokenizer, counted in your browser. Gemini rows are exact when this site's server has a Gemini key and Google's countTokens endpoint answers. Claude, Llama, DeepSeek and Mistral rows are estimates, and each says how it was made.
Is my text sent anywhere?
The o200k_base count runs entirely in your browser. Only if you edit the text (or ask for it) is the text sent to Google's countTokens endpoint through this site's server for exact Gemini counts, and nothing is stored or logged here.
Why do code and non-English text use more tokens?
Tokenizers are trained mostly on English prose, so common English words become single tokens while code symbols, rare words and many other scripts split into several pieces. OpenAI's and Google's docs both note that other languages usually need more tokens per character.
How do I turn tokens into a monthly bill?
Use the Send to cost calculator button. It opens the LLM API Cost Calculator with your token count filled in, where you add traffic, output length and caching.
05

Count by model family

06

More from the workbench

Fine print

Tools: on the house.
Engineer: by the hour.

Counting tokens was free. Spending fewer of them is a project.

I'm Himanshu, an AI and full-stack engineer. I build MVPs, AI agents and the growth plumbing around them for early-stage startups.