Skip to content
Tools

LLM token and cost calculator

Count the exact tokens in any text, then price it against any model at any rate, at whatever volume you expect to run. The tokenizer runs in your browser, so a confidential prompt stays confidential.

Runs in your browser. Nothing you paste is uploaded.

This never leaves your browser. There is no server on this page.

Tokens

...

Counted with o200k_base, the tokenizer used by GPT-4o and GPT-5. Anthropic and Google tokenize slightly differently, so read their counts as within roughly ten to twenty percent.

Characters
341
Words
55
Characters per token
0
Of a 1M context
0.00%

What it costs

Rates are dollars per million tokens and every one is editable. Change them to match whatever your provider charges today.

ModelIn $/MOut $/MPer callPer dayPer month
Claude Opus 5$0.01$12.50$375
Claude Sonnet 5$0.0075$7.50$225
Claude Haiku 4.5$0.0025$2.50$75.00
Your model$0$0$0

0

Input tokens per call

500

Output tokens per call

500K

Tokens per day

15M

Tokens per month

A token is not a word and it is not a character. It is a fragment that the model learned to treat as one unit, which is why English prose lands near four characters per token, code lands lower, and a language the tokenizer saw less of during training can cost several times more to say the same thing.

The number that surprises people is not the price of one call. It is the price of one call multiplied by production. A prompt that costs two hundredths of a cent is free until it runs a hundred thousand times a day, and then it is a line item somebody asks you to defend. That is the column on the right, and it is the reason this tool asks for your volume rather than just counting.

Two habits pay for themselves immediately. Trim the system prompt before you trim anything else, because it is on every single call forever. And check whether you actually need the largest model, since the gap between tiers is usually five times the price for a difference your task may not be able to detect.

Questions people arrive with

How many tokens is my prompt?
Paste it above and the count is exact, not estimated. It uses o200k_base, the same tokenizer the current OpenAI models use, running in your browser. As a rough rule English runs about four characters per token, but code, JSON and non-English text are all considerably denser than that.
How much does an LLM API call cost?
Input tokens times the input rate plus output tokens times the output rate, and the output rate is usually five times the input one. The calculator above prices any text against current published rates and multiplies it out to whatever daily volume you expect, which is the number that actually matters.