| Model | Input tokens | $ in / 1M | $ out / 1M | Per call | 1,000 calls | Context window |
|---|---|---|---|---|---|---|
Claude Opus 5.5 Claude-style estimate | ~84 | $0.0103 | $10.34 | fits <0.01% used | ||
Claude Sonnet 5.5 Claude-style estimate | ~84 | $0.0052 | $5.17 | fits <0.01% used | ||
Claude Haiku 5.5cheapest Claude-style estimate | ~84 | $0.0003 | $0.2584 | fits <0.01% used | ||
GPT-5.4 GPT-style estimate | ~75 | $0.0077 | $7.69 | fits <0.01% used | ||
GPT-5 GPT-style estimate | ~75 | $0.0051 | $5.09 | fits 0.02% used | ||
GPT-style estimate | ~75 | $0.0016 | $1.58 | fits 0.06% used |
Prices are US dollars per million tokens and can change, so edit any rate to match the provider's current pricing page. The table uses the standard text rate. Cached input is counted at 10 percent of the input rate and batch jobs at 50 percent, which match the usual discounts, but the extra cost of writing a cache and any long-prompt surcharge (some models charge more above 100,000 or 272,000 tokens) are not included. Images, audio and tool calls are priced differently.
Token Counter and AI Cost Calculator
What's included
Features
About this tool
Know What a Prompt Will Cost Before You Send It
AI APIs charge by the token, and the context window is counted in tokens too, but a prompt is written in words. That gap is where surprise bills and "input too long" errors come from. This counter turns your text into an estimated token count, then shows what the call would cost on Claude, GPT and a model of your own, and how much of each context window it fills.
Paste a system prompt, a document or a chunk of code, set the reply length you expect and the number of times you will run it, and the table does the arithmetic: cost per call, total cost, the cheapest listed model, and whether input plus reply fits. Two sliders cover the things that change a real bill most: how much of the prompt is read from the cache, and whether the job can run as a cheaper batch. It is useful for budgeting an app that calls a model thousands of times, for deciding whether a long document needs to be split, and for comparing a small model against a large one before you commit.
The counts are estimates. The tool splits your text the way a byte-pair tokenizer tends to, with short words as one token, longer words split into pieces, digits grouped in threes, one token per punctuation mark, and heavier counts for code-like symbols, emoji and non-Latin scripts. It lands within roughly 10 to 15 percent for ordinary English, which is close enough to plan with. Use the provider's own token-count endpoint when you need the exact number.
Prices move quickly, so every rate and context size is a field you can edit, and the defaults were reviewed on 2026-11-20. Everything runs in your browser, your text is never uploaded, and your last session is remembered on your device only. If you are writing the prompt itself, AI Prompt Studio helps you structure it, and Word Counter, Markdown Editor and Diff Checker are handy for tidying and comparing the text first.
Step by step
How to Use
- 1Paste your prompt or textPaste the system prompt, the question and any documents or code you plan to send, or use Open file to load a text, Markdown, JSON or code file. The Sample menu loads a support prompt, a long article, a code file or JSON if you just want to see how it works. The counter updates as you type and nothing leaves your browser.
- 2Read the token estimateThe pills under the box show characters, words, lines and an estimated token count in two styles: GPT-style and Claude-style. Claude-style runs a little higher for the same English text. Three cards underneath show the size in pages, the cheapest cost per call and the cheapest total.
- 3Set the reply lengthOutput tokens cost several times more than input tokens, so say how long the answer will be. Tap Short, Paragraph, A page, Long or Code file, or type your own number. A short answer is around 200 tokens, a page of writing around 800, and a long code file can pass 4,000.
- 4Choose how many callsSet how many times the same prompt will run, or tap 1, 100, 1k, 10k or 100k calls. The table shows the cost of one call and the total for all of them, with the cheapest listed model marked.
- 5Add prompt caching and batch pricingIf the start of your prompt is the same on every call, drag the cache slider to the share of input that will be read from the cache, which is billed at about a tenth of the normal input rate. Tick Batch API if the job can wait, which is usually about half price.
- 6Check the context windowEach row shows how much of that model's context window the input uses and whether input plus reply fits. If a row says too long, trim the text or pick a model with a larger window.
- 7Edit the prices if they have changedEvery rate and context size in the table is an editable field, and the last row is a model you can name yourself. Prices change often, so check the provider's pricing page and type in the current numbers. Your text and settings are remembered in this browser for next time.
- 8Copy the summaryCopy summary puts the estimate and the per-call cost for every model on your clipboard, ready to paste into a ticket, a budget note or a chat with your team.
Real-world uses
Common Use Cases
Got questions?
Frequently Asked Questions
Paste it into the box and the estimate appears straight away. As a rough guide, one token is about four characters or three quarters of a word in English, so 1,000 words is close to 1,300 tokens. Code, numbers and non-English text usually use more tokens per character, which is why pasting the real text beats guessing from the word count.
No, it is an estimate. The counter walks through your text the way a byte-pair tokenizer tends to split it, but it does not download or run the providers' own tokenizers, so expect it to land within roughly 10 to 15 percent for ordinary English. Before a large or expensive job, use the provider's own token-count endpoint to get the exact figure.
Each model family uses its own tokenizer, so the same sentence is cut into different numbers of pieces. The Claude-style estimate here is scaled up a little from the GPT-style one because Claude tokenizers tend to produce somewhat more tokens for the same English text. The gap varies with the content, so treat the difference as a guide, not a rule.
Cost per call is input tokens times the input price plus output tokens times the output price, with both prices given per one million tokens. The total is that figure multiplied by your number of calls. Output tokens are priced higher than input tokens on most models, which is why the reply length setting matters.
The defaults were reviewed on 2026-11-20 against the providers' pricing pages and press coverage, but API prices change often and some models charge more above a long-prompt threshold. Every rate in the table is editable, so check the provider's pricing page and type in the numbers that apply to you. The Reset rates button restores the defaults.
It is the most text a model can take in and answer in a single request, counted in tokens. Your input and the reply have to fit together. The table shows how much of each model's window your input uses and flags rows where input plus the expected reply would not fit.
Prompt caching lets a provider reuse the repeated start of your prompt, such as a long system prompt, and bill that part at a much lower rate. The cache slider assumes cached input costs about 10 percent of the normal input rate. Batch APIs run your requests later and are usually about half price, so ticking Batch API halves the total. The extra cost of writing a cache the first time and any long-prompt surcharge are not included, and images, audio and tool calls are priced differently, so change the rate fields if those apply to you.
No. The counting runs entirely in your browser, and the text is not uploaded or stored. You can paste private prompts or internal documents without them leaving your computer.
Remove repeated instructions, drop boilerplate such as long signatures and legal footers, send only the relevant part of a document, and ask for a shorter reply format such as a list or JSON with fixed fields. Prompt caching helps when the same long prefix is reused, and a smaller model is often enough for simple tasks.
Yes. The last row is your own model: rename it, then set its input price, output price and context window. It uses the GPT-style estimate, which is a reasonable default for most other model families.