How much will this prompt cost? An LLM token calculator that compares Claude, GPT and Gemini
Before you ship an AI feature, you need two numbers: how many tokens your prompt is and what it costs across the models you're considering. My free LLM token and cost calculator counts tokens in your browser, compares the newest Claude, GPT and Gemini models side by side and shows how much of each context window you're using. The model list and prices refresh daily from the models.dev catalogue and get checked against OpenRouter, because prices change faster than blog posts.
At work I build multi-agent workflows on top of LLMs, and the conversation always reaches the same point: "OK, but what does it cost at 50,000 requests a day?" Then someone opens a spreadsheet, someone else opens three pricing pages, and a third person pastes the prompt into a tokenizer that only knows one provider's models.
I wanted one screen that answers it. So I built an LLM token and cost calculator.
How is LLM cost calculated?
Every major provider prices by the million tokens, with separate prices for input and output:
cost per request = (input tokens × input price / 1,000,000)
+ (output tokens × output price / 1,000,000)
total = cost per request × number of requests
Output tokens usually cost around five times as much as input tokens, which is why "please be concise" in a system prompt is also a cost optimisation.
How do the token counters and calculators compare?
| Tool | Good for | Watch out for | Honest assessment |
|---|---|---|---|
| OpenAI Tokenizer | Exact counts for OpenAI models, seeing token boundaries | OpenAI only, no cost comparison | The ground truth for GPT tokens. |
| Tiktokenizer and similar | Visualising how text splits into tokens | Usually OpenAI encodings only | Great for learning why emojis are expensive. |
| Provider token-counting APIs | Exact counts for Claude or Gemini | Need an API key and code | The right call for production budgeting. |
| Pricing comparison tables | Comparing list prices | You still have to count tokens yourself, and some are updated by hand whenever someone remembers | Half the answer. |
| Sidd's token cost calculator | One prompt, every current model, cost and context fit side by side, prices refreshed daily | Claude and Gemini counts are estimates (marked ≈) | The "rough budget in 30 seconds" tool. |
Which models does it compare?
Whatever is newest. A hand-written list goes stale the morning a provider ships something, so the list builds itself. Once a day the site reads the models.dev catalogue and picks, for Anthropic, OpenAI and Google:
- the newest model in each family, so a new Claude Opus replaces the old one without me touching anything
- only chat models that output text and support tool calls, with a real price and a context window
-
previews,, skipped-latestaliases, dated snapshots, image, audio, realtime and embedding models -
families that haven't had a release in 150 days, treated as retired
Then every price is checked against OpenRouter's listing for the same model. If the two disagree by more than 5%, the row gets a small amber "OpenRouter lists…" note, so you know to check before you budget.
flowchart LR
A[models.dev catalogue] --> B[Newest model per family]
B --> C{OpenRouter price<br/>within 5%?}
C -- yes --> D[Show the price]
C -- no --> E[Show the price + amber note]
D --> F["/api/llm-prices, cached for a day"]
E --> F
F --> G[Your browser]Your browser only ever talks to siddsingh.dev. The site does the fetching, caches the result for a day and keeps the last good list if a feed has a bad morning. If the very first load fails, the tool falls back to a built-in list I checked by hand on 21 October 2026, and the note under the table says which one you're looking at.
Here's what the list looked like on 3 November 2026 (standard tier, USD per 1M tokens):
| Model | Provider | Input | Output | Context |
|---|---|---|---|---|
| Claude Fable 5.1 | Anthropic | $10 | $50 | 1M |
| Claude Opus 5.5 | Anthropic | $4 | $20 | 1M |
| Claude Sonnet 5.5 | Anthropic | $2 | $10 | 1M |
| Claude Haiku 5.5 | Anthropic | $0.10 | $0.50 | 1M |
| GPT-6 Astra | OpenAI | $10 | $50 | 1.05M |
| GPT-6.1 Sol | OpenAI | $2 | $10 | 1.05M |
| GPT-6.1 Terra | OpenAI | $1 | $5 | 1.05M |
| GPT-6 Luna | OpenAI | $0.10 | $0.50 | 1.05M |
| Gemini 4 Argon | $2 | $10 | 1M | |
| Gemini 3.8 Flash | $0.75 | $3.75 | 1M | |
| Gemini 3.5 Flash Lite | $0.30 | $2.50 | 1M |
GPT-6.1 Terra came out on 26 October and turned up without me lifting a finger. Gemini 3.8 Flash had the amber note that day: OpenRouter listed it at $0.825 in and $4.125 out.
How accurate are the token counts?
This is the part most calculators gloss over, so I'll be upfront:
- OpenAI models: counted with OpenAI's published
o200k_basetokenizer, running in your browser. These should be very close to what the API bills. - Anthropic models: Anthropic doesn't publish its tokenizer, so the count is the
o200k_basecount scaled by 1.15. Marked with ≈. - Google models: Google doesn't publish Gemini's tokenizer either, so the count uses
o200k_baseas an approximation. Also marked ≈.
An honest ≈ seemed better to me than a precise-looking number that could be wrong.
What does the calculator show?
flowchart LR
A[Paste prompt, doc or code] --> B[Count tokens in the browser]
C[Expected output tokens] --> D
E[Number of requests] --> D
P[Today's price list] --> D
B --> D[Per model: tokens, context fit, cost]
D --> F[Edit any price to match your contract]For each model you get:
- Input tokens for your text, with ≈ where it's an estimate.
- Context fit: what percentage of the model's context window your input plus expected output uses, or a red "Too long" if it doesn't fit.
- Total cost for all your requests, and the per-request cost when you're doing more than one.
- Editable input and output prices, so you can plug in a negotiated rate. Once you edit one, the list stops refreshing for that visit, so your number doesn't vanish under a model swap.
- An amber note on any model where OpenRouter's price disagrees with the catalogue.
The header shows the total token and character count of your text as you type.
Is my prompt sent anywhere?
No. Counting runs in your browser, so the tokenizer never sends your prompt, your system instructions or that customer document you're testing with to anyone. The only request the page makes is for the price list, and that request carries nothing of yours.
What doesn't it do (yet)?
Being honest about scope:
-
Prompt caching discounts. It uses standard list prices. -
Batch API discounts. Same. - Image, audio or video tokens. Text only.
- Models from other providers. It's Anthropic, OpenAI and Google for now.
If you rely on caching or batch pricing, edit the input price to your effective rate and the totals follow.
FAQ
How many tokens is my prompt?
Paste it into the token cost calculator. It shows the count for each model, exact for OpenAI and estimated (≈) for Claude and Gemini.
How many words is 1,000 tokens?
Roughly 750 English words, but it varies with language, code and formatting. Paste your actual text for a real count.
Which is cheaper, Claude, GPT or Gemini?
It depends on the model tier and your mix of input and output. At list prices on 3 November 2026, Claude Haiku 5.5 and GPT-6 Luna were the cheapest at $0.10 in and $0.50 out per million tokens. Paste your prompt to compare for your own case.
How do I calculate the cost of an API call?
Multiply input tokens by the input price and output tokens by the output price, each per million tokens, and add them. The calculator does this for every model and multiplies by your number of requests.
Does my prompt fit in the context window?
The Context column shows the percentage of each model's window your input and expected output use, and marks it "Too long" when it doesn't fit.
Are the prices up to date?
Yes, within a day. The model list and prices refresh daily from the models.dev catalogue and are checked against OpenRouter, and the note under the table shows the date they were checked. A new model can take a few days to reach the catalogue, so check the provider's page before you sign off a budget. Every price is editable.
Why does a model show an "OpenRouter lists" price?
OpenRouter's price for that model differs from the catalogue's by more than 5%. One of them is probably out of date, so check the provider's own pricing page.
Want to try it?
Open the LLM token cost calculator, paste the longest prompt in your codebase and set requests to your daily volume. Then try not to flinch. If you're building prompts with variables, the prompt template playground pairs nicely with it, and all my free tools are here.
Spot a stale price? Email siddhant06137@gmail.com or ping @creatorsidd on X. Planning an AI feature and want a second opinion on cost? Book a 15-minute call.