TLDR
- Every token counter shows a number, but not all numbers match your bill. The post sorts six free tools by how they count: OpenAI-style tokenizers, provider endpoints, and browser calculators with prices.
- The six are OpenAI Tokenizer, Tiktokenizer, Anthropic count_tokens, Gemini count_tokens, Aiven, and Token Calculator. We read their pages and docs and didn't rank them by accuracy.
- Turning a count into a price takes one formula. A 2,000-token prompt returning 500 tokens costs $0.009 on Sonnet 5.5, or $90 for 10,000 calls.
- Counts and bills differ for three reasons. Newer Claude models count about 30 percent more tokens (so $90 becomes $117), tools and system prompts add hidden tokens, and output length is unknown until the model answers.
- Unmeshed isn't a token counter. It caps each agent's monthly spend and logs the cost of every run, so you can check your estimate against what happened.
A token counter tells you how many tokens a prompt uses, and you've probably pasted a prompt into one, got a number, and wondered if it matches the number on your invoice.
Sometimes it does. Sometimes it's off by a lot, and the reason depends on which tool you used and which model you're billed on. So we read the pages and docs for six free tools as of November 12, 2026, sorted them by how they count, and worked out how to turn a count into a price. We didn't rank them by accuracy, because we didn't run them against each other.
If you want the bigger picture on spending fewer tokens, we wrote about token efficiency separately. This post is about the step before that, which is knowing the number in the first place.
We build workflow software, so we'll say where Unmeshed fits near the end. Okay, let's get into it.
1. What Is a Token Counter?
A token counter is a tool that shows how many tokens a piece of text uses for a given AI model. Models read and bill in tokens, which are small chunks of text, so the count tells you how much of the context window a prompt uses and what it will cost.
That's the whole idea. You paste text in, a number comes out, and the number is what you get billed on. Let's start with what a token even is.
What Counts as a Token
A token is a small piece of text, often a short word, part of a longer word, or a punctuation mark. A tokenizer splits your text into these pieces, and you count them to count tokens. Models read tokens, not letters or words, which is why prices use them.
Think of tokens as the chunks a model bites text into. A short common word is often one chunk. A long or unusual word might be a few. That's why counting words alone won't get you there.
The 4 Characters Rule and Tokens to Words

OpenAI's help center gives a rough rule for English: 1 token is about 4 characters and 100 tokens is about 75 words. Google says about 4 characters too. Treat both as estimates, since code and other languages usually take more tokens for the same length.
So if you're wondering how many tokens a page has, a 750-word page is roughly 1,000 tokens on that rule. It's a starting point. Both OpenAI and Google say it's a rough guide, and the tools below exist because rough isn't good enough once money is involved.
Why the Same Text Gives Different Counts
Each model family uses its own tokenizer, so the same sentence can count differently on different models. Anthropic says its newer models produce about 30 percent more tokens for the same text than older ones. A count is only right for the model it was made for.
This is the thing most people miss. There's no single universal count. If a tool counts with one tokenizer and you pay on another, the number you see is a guess dressed up as a fact.
2. How Do You Tell an Exact Count From an Estimate?
A count is exact only when the tool runs the same tokenizer the model uses. Open tokenizers can do that for OpenAI models. For closed models, a tool either asks the provider for the count or approximates it. Check which one your tool does before you budget.
Picture a laundromat that charges by the pound. You can eyeball your pile and guess, but the machine weighs it, and the machine sets the price. Your counter is the scale you step on before you get to the counter. A good scale matches the store's scale. A bad one is close and still wrong.
Open Tokenizers and Closed Ones
OpenAI publishes tiktoken, an MIT-licensed library you install with pip, so tools can count OpenAI tokens exactly. Google says Gemini's tokenizer is not public, so a third party Gemini count is an estimate. Anthropic offers a counting endpoint instead of a library.
You can get tiktoken on GitHub and install it with pip install tiktoken. For Claude and Gemini, a tool that isn't the provider has to approximate. That's fine for planning, and not fine for a final budget.
Provider Counters Versus Browser Calculators
Provider counters ask the provider's own system for the count, so they sit closest to your bill, but they need an API key. Browser calculators need nothing and add prices, but some use a reference tokenizer or an approximation. Use calculators to plan and providers to confirm.
Same rule as the laundromat. Weigh at home to plan, then trust the store's scale on the day. Now let's meet the six tools.

3. Which Free Token Counter Tools Are Worth Using?
Six free options cover most needs. OpenAI Tokenizer and Tiktokenizer for OpenAI-style counts, Anthropic and Gemini count_tokens endpoints for the closest provider numbers, and Aiven and Token Calculator for counts with a price. We read each page and its docs on November 12, 2026.
We picked tools that cost nothing to try, show their limits, and cover the big three model families. Here's how they compare at a glance.
| Tool | Best For | Count Type | Needs a Key | Shows Cost |
|---|---|---|---|---|
| OpenAI Tokenizer | Seeing how OpenAI text splits | OpenAI's own tool | No | No |
| Tiktokenizer | OpenAI-style tokens with a whitespace view | Open source tokenizer | No | No |
| Anthropic count_tokens | Claude counts before you budget | Estimate close to billed | Yes | No |
| Gemini count_tokens | Gemini input counts | Input only | Yes | No |
| Aiven | Many models and cost per call | Exact or approximate, labeled | No | Yes |
| Token Calculator | A quick count with a price | One reference tokenizer | No | Yes |
One extra worth a mention is the pricepertoken.com counter. It estimates tokens and compares input prices across many models, and it says its counts are estimates. We left it out of the six because it overlaps with the two calculators below.
OpenAI Tokenizer
OpenAI Tokenizer is OpenAI's own page for seeing how text splits into tokens, and it is the tool OpenAI's help center points to for exact counts. It works as a GPT tokenizer for OpenAI models. It does not tell you the price, so pair it with a rate.
You'll find it linked from the OpenAI help center and at platform.openai.com. It's the natural first stop if you're billed by OpenAI, since it's from the company that sets the price.
Tiktokenizer
Tiktokenizer is a free open-source web tokenizer built by dqbd and hosted on Vercel. It defaults to GPT-4o, shows the token count, and has a show whitespace toggle so you can see spaces and line breaks that cost tokens. It does not show prices.
The whitespace view is the useful part. Extra spaces and line breaks in a prompt are easy to miss, and this shows them. You can open Tiktokenizer in your browser, and the code is on GitHub. If you'd rather count in code, tiktoken does the same job in Python.
Anthropic count_tokens
Anthropic's count_tokens endpoint is a Claude counting tool that returns the input count for a message before you send it. It is free but rate-limited, needs an API key, and returns an estimate. It counts system prompts, tools, images, and PDFs, but not server tools or the MCP connector.
Anthropic says the actual count can differ by a small amount, and that you should recount against the model you plan to use. Rate limits depend on your tier, from 5,000 requests a minute on Start to 20,000 on Scale. Details are in the token counting docs.
Gemini count_tokens
Gemini's count_tokens call counts input only. The usage fields on the response give the rest. Google says a token is about 4 characters, an image costs 258 tokens, and audio costs 32 tokens per second. It works as a Gemini counting tool for planning, and it needs an API key.
That image and audio detail matters if you send more than text, because a counter that only reads text will miss it. Google lays it out in the Gemini token docs.
Aiven
Aiven's free tool works as a simple LLM cost calculator. Paste text, pick from 16 models, and see tokens, cost per call, cost at scale, and context window use. It labels counts as exact or approximate, and says text stays in your browser. No signup needed.
The compare view is handy, since it shows the same text across several models side by side. One thing to watch. When we looked on November 12, 2026, its model list showed older Claude versions than Anthropic's docs do, so check the rate against the provider's page. You can try the Aiven tool yourself.
Token Calculator
Token Calculator is a free token counter online that shows tokens, words, characters, and an estimated input cost for one model per provider. It says it uses one reference tokenizer, so the billed count can differ. Paid API access is optional, at $1.99 a month.
It says plainly that provider tokenization, message formatting, and tool definitions can change the billed total, which we respect. It listed Claude Sonnet 5.5 at $2 per million input tokens on our visit, which matches Anthropic's docs. Find it at token-calculator.net.
4. How Do You Turn a Token Count Into a Prompt Cost?

Multiply input tokens by the input rate, add output tokens times the output rate, and divide by one million. A token cost calculator does the same math for you. The count is the easy half. The rate has to come from the provider's pricing page for the exact model.
Any LLM cost calculator is doing this one line behind the scenes. Once you see it, you can check any tool's math by hand, and you'll catch the day a calculator's rate is out of date.
Cost Per Token for Input and Output
Cost per token is tiny, so providers quote it per million tokens, with input and output priced separately. On Anthropic's current models, output costs five times input. A long answer costs more than a long question, so count both sides of the call.
Say a model charges $2 per million input tokens. That's $0.000002 per token, which sounds like nothing. A prompt with 2,000 tokens costs $0.004. Multiply by thousands of calls a day, and it stops being nothing.
A Worked Example on Four Claude Models
Take a 2,000-token prompt that returns 500 tokens. On Sonnet 5.5, that costs $0.009 per call, or $90 for 10,000 calls. On Haiku 5.5, it is $4.50, and on Opus 5.5 it is $180. Rates are Anthropic's, dated November 11, 2026.
| Model | Per Call | 10,000 Calls | 10,000 Calls With 30 Percent More Tokens |
|---|---|---|---|
| Haiku 5.5 | $0.00045 | $4.50 | $5.85 |
| Sonnet 5.5 | $0.009 | $90 | $117 |
| Opus 5.5 | $0.018 | $180 | $234 |
| Fable 5.2 | $0.036 | $360 | $468 |
The last column assumes the same text counts 30 percent more tokens on a newer tokenizer, so 2,600 in and 650 out. This is arithmetic on a stated assumption, not a measurement. The rates are in Anthropic's pricing docs. For ways to bring the bill down, see our post on cutting costs.
Using an OpenAI API Cost Calculator the Same Way
An OpenAI API cost calculator follows the same two steps. Count tokens with a GPT counter, then plug in the rate OpenAI lists for your model. Take that rate from OpenAI's pricing page, not from a third-party table, because third-party rates can lag.
Then run the same formula. Input tokens times the input rate, plus output tokens times the output rate. If you want more ways to bring the number down once you have it, our guide to cost optimization covers nine techniques.
5. Why Does Your Token Counter Disagree With Your Bill?

A count can disagree with your bill for three reasons. The model uses a different tokenizer than the tool, hidden tokens such as tools and system prompts ride along, and output length is unknown until the model answers. Recount with the provider's counter to close most of the gap.
None of these mean your tool is broken. They mean a count is a measurement of text, and a bill is a measurement of everything the model handled.
A Newer Tokenizer Can Add 30 Percent
Anthropic says Claude 4.7 and later models use a newer tokenizer that produces about 30 percent more tokens for the same text. A count from an older tool, or a rule of thumb, can undercount. In our worked example, that moves Sonnet 5.5 from $90 to $117 per 10,000 calls.
That's a 30 percent jump from nothing but a tokenizer change. It's the cleanest example of why you recount whenever you change models.
Hidden Tokens From Tools, Images, and System Prompts
Tool definitions, images, and system prompts all count toward the context window and the bill. Anthropic adds 286 tokens for its tool use system prompt on current models, and Google counts an image as 258 tokens. A counter that only sees your visible text will miss these.
This is why a prompt that looks short can still fill the context window. If your agent carries three tools and a long system prompt on every call, those tokens are in every bill. Anthropic's endpoint counts tools and system prompts, which is one reason to use it.
Output Tokens You Cannot Count Ahead
You can count what you send, but you cannot count what the model writes until it writes it. Gemini's count_tokens counts input only, and the usage fields on the response report the rest. For budgeting, set a maximum output length and price the worst case.
Since output costs more per token than input on the Claude models we priced, a gap between your estimate and your bill often hides here. Price the long answer, not the short one.
6. Which Token Counter Should You Use?
Use a browser tool for a fast check, a provider counter before a big run, and a library or endpoint inside your code. No single tool fits every job. Whatever you pick, recount with the provider's own tool before you commit to a budget.
Here's how we'd match the job to the tool.
For a Quick Check
For a quick check, open Tiktokenizer or the OpenAI Tokenizer for OpenAI-style text, or Aiven when you want a price too. They need no account and answer in seconds. Treat the result as a plan, and remember some models are approximations.
This is the moment to tighten a prompt, too. If you're trimming words to save tokens, our guide to prompt optimization shows how to audit and fix a prompt without losing quality.
Before a Big Run or a Launch
Before a big batch or a launch, count with the provider's own endpoint, Anthropic's count_tokens for Claude or Gemini's count_tokens for Gemini, then price it with the rate on the provider's page. Add a margin for output tokens and retries.
A browser tool got you to the right ballpark. The provider's counter gets you closer. Then add a cushion, because retries and long answers always cost something.
Inside Your Code or Pipeline
Inside code, use tiktoken for OpenAI counts or call the provider's counting endpoint, so every request gets checked before it goes out. That lets you block or trim a prompt that is too big. It also keeps the count next to the call, in your logs.
Counting in code is how you stop a bad prompt from running ten thousand times. It's a small check that saves a large bill.
7. How Does Unmeshed Help After the Count?

A token counter tells you what a prompt should cost before you send it. Unmeshed shows what a run did cost after it ran. Each agent can have a monthly spend ceiling, and every model call and its cost is logged. Unmeshed is not a token counter and does not replace the provider's bill.
Here's the gap we see. A count is a forecast. A bill arrives a month later. In between, an agent that loops one time too many can spend your forecast before anyone notices. If you run agents, our agent governance page covers the controls, and our guide to the LLM gateway explains where a gateway fits alongside them.
A Spend Ceiling for Each Agent
A spend ceiling is a monthly limit set per agent. Unmeshed checks spend against the ceiling before a call goes out, so a runaway loop stops at the cap, not on the invoice. You set the number using the same cost math from this post.
Take your per-call cost from the worked example, multiply by the volume you expect, and add a cushion. That's your ceiling. Near the cap, the workflow can throttle the agent or move it to a cheaper model.
A Cost on Every Run
Unmeshed logs every model call, tool call, and cost in the run history. That gives you the cost per run for your own agent, so the estimate from a counting tool can be checked against what happened. You read one place instead of five.
Anthropic's Console stays the authority on the invoice, and we don't pretend otherwise. What we add is the view per agent and per run, and a limit you set before the spend happens. Our free tier includes 1,000 agent calls a month, so you can try it on a small agent first.
Check the Bill Against the Count.
Log the cost of every model call, then compare it with your estimate and set a monthly limit per agent.
Meter My AgentsFinal Thoughts
A token counter gives you a number you can plan with, and the provider's counter gives you the one closest to your bill. Count first, price with the provider's rate, then check the result against runs that already happened. That habit catches most surprises before they reach an invoice.
What stuck with us is how often the count and the bill disagree, and how rarely a tool page says so. Back to the laundromat. Step on the scale at home to plan, and expect the store's scale to read a little differently. The ones who get burned are the ones who never weigh anything.
That's where Unmeshed comes in for the agents you automate, with a ceiling per agent and a cost on every run. This week, pick one prompt you run, count it with the provider's own counter, and price a day of calls. Then you'll know what you're signing up for.
Frequently Asked Questions
Sources
- 1.Token counting, Claude Platform Docs
- 2.Pricing, Claude Platform Docs
- 3.Understand and count tokens, Gemini API Docs
- 4.What are tokens and how to count them?, OpenAI Help Center
- 5.tiktoken, GitHub
- 6.Tiktokenizer
- 7.Token Counter & Calculator, Aiven
- 8.Token Calculator & Counter for LLMs, Token-Calculator.net
- 9.AI Agent Governance, Unmeshed
Counted the tokens but not the bill?
Show us your prompt. We'll help you price a run.
Share the prompt, the model, and how often it runs. We'll walk through the count, the rate, and where a limit would stop a surprise.


