Skip to content
Browse tools

Tokens cost

Paste a prompt and see what it actually costs: tokens, how much of the context window it eats, and the bill per request, day and month. Prices are editable presets, because provider rates change more often than any tool can keep up with.

Handles
prose · code · CJK · emoji
Shows
tokens · window · cost
Privacy
never sent anywhere
Step 1

Your prompt

empty
Privacy counted in this page · never sent to a model
Step 2

What it costs

edit any rate · presets are a starting point, not gospel

waiting for text

Nothing measured yet Paste a prompt to estimate its tokens and cost.

What a token actually is

Not a word, not a character

~4 characters · ~0.75 words

Models split text into sub-word chunks. Common words are one token; rarer ones break apart. unbelievable might be three tokens while the is one. A useful rule: 750 words ≈ 1,000 tokens.

Spaces and punctuation count

every character is billed

Leading spaces are usually part of the following token, and newlines, brackets and indentation all cost. This is why minifying JSON before sending it genuinely reduces the bill.

Where the money actually goes

Output costs far more than input

Most providers charge three to five times more per output token. A 200-token question producing a 2,000-token answer is dominated by the answer. If a bill surprises you, check response length before prompt length — and cap it with max_tokens.

Chat history is re-sent every turn

Models are stateless. Turn 20 of a conversation re-sends turns 1–19 as input, so cost grows roughly with the square of the conversation length. Summarise or truncate old turns rather than letting history grow forever.

The system prompt is paid for every call

A 2,000-token system prompt on a million calls a month is two billion input tokens. At $2.50/M that is $5,000 for text you wrote once. Trim it, or check whether your provider offers prompt caching.

Non-English costs more for the same meaning

Tokenisers are trained mostly on English. Chinese and Japanese approach one token per character; some Indic and African scripts fare worse still. The same sentence can cost two to three times more — a real fairness problem, not just a billing quirk.

The window holds both sides

A 128k window is not 128k of input. Prompt plus reply must fit together. Filling 120k with context leaves room for a very short answer, and most clients will silently drop your oldest messages rather than fail loudly.

Bigger is not always dearer

A small fast model that answers in one call can beat a large one that needs three attempts. Compare cost per solved task, not per token — and try the cheap model first.

Rules of thumb worth memorising

ContentRough costNotes
English prose~4 chars / tokenThe baseline every published figure assumes.
Source code~3 chars / tokenPunctuation and indentation split aggressively.
JSON~3 chars / tokenBraces, quotes and colons are each a token. Minify before sending.
Chinese / Japanese~1–1.5 chars / tokenUp to four times more expensive per character than English.
Emoji2–3 tokens eachEncoded as several byte-level pieces.
1 page of text~500 tokensAbout 375 words at normal density.
A 300-page book~150,000 tokensFits in a 200k window — but leaves little room to answer.

Worked scenarios

Support chatbot, 10k conversations/day

800-token system prompt + 150-token question + 300-token answer, five turns average. History re-sending roughly triples input. Around 15M input and 15M output tokens a day — on a mid-tier model, a four-figure monthly bill. Trimming the system prompt to 300 tokens saves about a third of the input cost on its own.

Document summariser, 500 PDFs/day

20-page documents are roughly 10,000 tokens each, with 500-token summaries. That is 5M input and 250k output daily. Here input dominates — the opposite of chat — so a cheaper model with a large window usually wins outright.

Code review on every pull request

A 500-line diff is around 8,000 tokens; add repository context and you are near 20,000 per review. At 100 reviews a day that is 2M input tokens daily. Send only the diff, not whole files, and the figure drops by an order of magnitude.