Skip to content

Private beta opens Oct 29.Request your invite

We're open. Sign in and try an open-weight model free

Bearer Club

Free tool

AI Token Calculator

Paste your prompt or text to estimate token count and API input cost. See your context window usage and cost across all pricing tiers side by side.

Content type

Quick examples

List: $10.00 in / $50.00 out per 1M tokens

0

Characters

0

Words

0

Tokens (est.)

Save up to 30% on every token.

Bearer Club membership gives you wholesale prices on all 69 models with one API key.

Join Bearer Club

Token estimates use a character-based heuristic tuned per content type. Exact counts vary by model tokenizer. For production budgeting, measure with your actual model.

About this tool

What is this LLM Token Counter?

The AI Token Calculator is a free LLM token counter that lets you count the tokens in any text and immediately see what those tokens cost across the entire Bearer Club model catalog. You paste text β€” a system prompt, a document chunk, a code file, or a sample conversation β€” and the tool shows you the token count, the context window fill percentage for each model, and the input cost at list price, Member price, and Executive price.

Tokens are how language model APIs measure and charge for text. Every call you make is billed based on the number of input tokens (the text you send) and output tokens (the text the model returns). Knowing the token count in your prompts before you deploy is the difference between a cost estimate that holds and a production bill that surprises you.

The calculator supports four content types β€” English, Code, CJK (Chinese/Japanese/Korean), and Mixed β€” each with its own tokenization heuristic. This matters because a 500-character CJK document can cost 4-6x more tokens than 500 characters of English, and code with heavy symbol density tokenizes differently from prose.

Who it helps

Built for anyone writing prompts or processing text at scale

Developers writing system prompts

A system prompt is billed on every single API call. If your system prompt is 2,000 tokens and you make 1 million calls per month, that is 2 billion tokens just from the prompt β€” before any user message. Knowing the token count before you ship lets you optimize the most expensive static text in your application.

Teams building document and RAG pipelines

You are chunking PDFs, contracts, or codebases and passing them into a context window. Each chunk has a token count that determines whether it fits, what it costs, and how many you can include before hitting the model's limit. Measure first.

Engineers working with multilingual content

English text tokenizes at roughly 1 token per 4 characters. CJK text (Chinese, Japanese, Korean) tokenizes very differently β€” often 1-2 tokens per character. If your app serves non-English users, your per-call cost can be 2-3x higher than what English benchmarks suggest.

Anyone evaluating model context windows

You have a document and a list of models. Does it fit in Claude Haiku's 200k context? Does it fit in GPT-4o-mini's 128k? Paste the document, see the token count, and the context window bar shows you the percentage used for every model in the catalog.

Step-by-step guide

How to use the token calculator

  1. 01

    Paste your text

    Paste any text into the input area β€” a system prompt, a user message, a document chunk, a code file, or any combination. The token count updates as you type.

  2. 02

    Pick the content type

    Choose English, Code, CJK (Chinese/Japanese/Korean), or Mixed. Each content type uses a different tokenization heuristic. English is the default and works well for most Latin-script text. Switch to Code for source files, SQL, or JSON. Use CJK for ideographic text.

  3. 03

    Try a quick example

    If you do not have sample text handy, use one of the five quick examples β€” Tweet, Email, Blog post, Code snippet, or System prompt. Each loads a realistic text sample so you can see how different content types tokenize.

  4. 04

    Read the context window bar

    The context window section shows how full your text would make each model's context window. A green bar means plenty of room. As the bar fills, context-sensitive features (like long conversation history) become constrained.

  5. 05

    Review the all-models cost table

    The table below the input shows what your token count costs across all 69 models, sortable by list cost, member cost, or savings. Click any row to select that model for the context window view.

  6. 06

    Take the number to the cost calculator

    Once you have your input token count, go to the LLM API Cost Calculator and enter it alongside your expected output tokens and monthly call volume. That is where you project total monthly spend.

Use cases

When token counting saves you money

Five situations where knowing your token count before you build changes what you decide.

  • System prompt optimization

    Measure your system prompt before deploying. Even a 500-token reduction at 500,000 calls/month saves $25-$375/month depending on the model β€” often more than the whole user message budget.

  • Context window planning

    Before you decide whether to use a 32k or 128k context model, count the tokens in your largest realistic input. The context bar shows you exactly how much of each model's window your text fills.

  • Per-request cost budgeting

    Paste a sample conversation turn. The all-models table shows you what that one exchange costs at list price vs member price across all 69 models β€” in a single view, sortable by cost.

  • Code and mixed-language content

    Code tokenizes differently from prose: identifiers, brackets, and operators each consume tokens. Switch to Code mode for a more accurate count when your inputs include source files, SQL, JSON, or similar structured text.

  • Prompt engineering research

    Compare two versions of a prompt side by side. Paste version A, record the count, then paste version B. The delta tells you whether the rewrite is cheaper or more expensive per call.

Key concepts

How tokenization works

Tokens are not words

Common English words are usually one token. Uncommon words, compound words, and words in non-Latin scripts often split into two or more tokens. Numbers, punctuation, and code symbols each have their own token representations that do not map 1:1 to characters.

Input and output are billed separately

This tool measures your input token count β€” the text you send to the model. Output tokens (what the model generates) are billed at a different, usually higher rate. Use the LLM Cost Calculator to project combined input plus output cost at your expected completion length.

Context window is a hard limit

Every model has a maximum context window that includes both input and output. If your input tokens plus your expected output tokens exceed the window, the call fails. Models with larger windows (200k+) cost more per token but handle long documents and conversations without truncation.

FAQ

Common questions about tokens and tokenization

What is a token?

A token is the unit of text that language models process. It is not exactly a word or a character β€” it is a chunk of text that the model's tokenizer has learned to treat as a single unit. In English, most common words are one token. Rarer words, long words, and words with punctuation often split into two or three tokens. Numbers, code symbols, and spaces each have their own token representations.

Why do different models have different token counts for the same text?

Different models use different tokenizers. GPT-4 uses tiktoken (cl100k_base). Claude uses a tokenizer trained on Anthropic's data. Llama uses SentencePiece. The same English sentence might be 150 tokens in one tokenizer and 170 in another. This calculator uses per-content-type heuristics that approximate real tokenizer output β€” accurate enough for cost planning but not identical to any single model's tokenizer.

How is CJK text tokenized differently?

Chinese, Japanese, and Korean characters (ideographs) typically map to 1-2 tokens each, while Latin characters in English map to roughly 0.25 tokens per character (4 characters per token). This means a 500-character CJK document can cost 4-6x more tokens than a 500-character English document. Switch to CJK mode in the calculator for a more accurate estimate when your content is primarily ideographic.

What is the context window and why does it matter?

The context window is the maximum number of tokens (input plus output combined) that a model can process in a single API call. If your prompt plus the expected response exceeds the context window, the call will fail or be truncated. For conversational apps, long conversation histories fill the context window over time. For document apps, the document itself may be close to the limit from the start.

How is code text tokenized differently from English prose?

Code contains many short tokens: brackets, operators, punctuation, and common keywords each take a token. Variable names and identifiers split by camelCase boundaries. A 500-character code snippet may tokenize to more tokens than 500 characters of prose because of the high density of multi-token identifiers and symbols. Use Code mode for source files, JSON, SQL, or any structured text.

Does the token count include both input and output?

The Token Calculator measures only the text you paste β€” this is your input token count. Output tokens depend on what the model generates, which you cannot know in advance. Use the LLM Cost Calculator to enter both input and output token estimates together and project your total per-call cost.

Are the costs in the table per call or per month?

The all-models cost table shows the cost for a single call with the number of input tokens you have entered. It is not monthly β€” it is the cost of one API request with that exact token count as input. Multiply by your monthly call volume to get monthly input cost, then add your expected output token cost.

One API key, 69 models

The warehouse club for AI APIs

Bearer Club is a membership that gives you access to every major AI model at wholesale prices through a single API key. No per-model accounts. No separate billing. Member pricing starts at 80% of list price.