LLM Token Cost Calculator
Count prompt tokens and see cost per call, per 1,000 calls and per month for current Claude, GPT and Gemini models. Sourced, dated prices; runs in your browser.
Private by design: everything you enter is processed in your browser. It is not sent to our servers.
How to use
- Pick a model. Its input and output prices appear under the form with the date they were checked.
- Paste your prompt to count its tokens, or leave the box empty and type the input token count yourself. Choose “estimate” (characters ÷ 4) or the exact o200k_base count.
- Enter the expected output tokens and how many calls you make per day.
- Read the cost per call, per 1,000 calls, per day and per 30-day month. Use “Copy share link” to send the exact settings to a colleague.
Worked example
A support bot calls Claude Sonnet 5.5 about 1,000 times a day. Each call sends roughly 2,000 input tokens (instructions plus the customer message) and gets about 500 tokens back.
| Model | Claude Sonnet 5.5 |
|---|---|
| Input price | $2 per 1M tokens |
| Output price | $10 per 1M tokens |
| Input / output tokens | 2,000 / 500 |
| Calls per day | 1,000 |
Result
| Cost per call | $0.009 |
|---|---|
| Per 1,000 calls | $9.00 |
| Per day | $9.00 |
| Per 30-day month | $270.00 |
| Share of cost from input | 44.4% |
Input: 2,000 × $2 ÷ 1,000,000 = $0.004. Output: 500 × $10 ÷ 1,000,000 = $0.005. Total $0.009 per call. Prices checked on the date shown beside the tool; this example is recalculated from the live data file every time the site is built.
How it works
Cost per call is input tokens × input price + output tokens × output price, with prices quoted per 1,000,000 tokens. Everything else is multiplication: per 1,000 calls is 1,000 × the per-call cost, per day is calls per day × per-call cost, and a month is modelled as 30 days.
Token counting has two methods. “Estimate” is the number of characters divided by four, rounded up. That is a rough rule of thumb for English prose, not a tokenizer. “o200k_base” runs the open-source js-tiktoken library in your browser and returns an exact token count for that specific encoding.
Neither method is guaranteed to match the tokenizer of the model you selected, and this page does not claim which tokenizer each listed model uses. Anthropic, for example, states that its newer tokenizer produces roughly 30% more tokens for the same text than earlier ones. For billing-exact numbers use the provider’s own token-counting endpoint, then type the result into the input tokens field.
Some models have more than one price. Claude Haiku 5.5, for instance, is priced higher when a prompt exceeds 100,000 tokens; the calculator applies that tier automatically and tells you when it does. Cached-input prices are covered by the Prompt Caching Calculator.
Common errors
inputTokens must be a whole number of 0 or more.- Token counts cannot be negative or fractional. Remove the decimal point or minus sign.
Token counts above 10,000,000,000 are not supported.- Check for an extra zero. No model accepts a prompt that large.
Calls per day above 1,000,000,000 are not supported.- Enter a realistic daily call count.
Loading the o200k_base tokenizer… (never finishes)- The tokenizer file failed to load, usually because you are offline and have not opened this page before. Switch to “estimate” or reload with a connection.
Text is too long (limit 2,000,000 characters).- Count a representative excerpt and scale up, or enter the token count manually.
Limits
- Only the models in the data file appear. A model is added only after its price can be read from the provider’s official page; models that could not be verified are left out and listed in the project’s unresolved-items document.
- Prices are standard, pay-as-you-go, per-token list prices. Batch discounts, regional uplifts, fast modes, free tiers, tool-use charges (such as web search) and negotiated discounts are not modelled.
- OpenAI prices shown are the short-context rates; the source page also lists higher long-context rates that this calculator does not apply. Gemini prices exclude context-cache storage fees.
- A month is 30 days. Thinking or reasoning tokens that a provider bills as output must be included in your output token estimate.
- Estimated token counts can be far off for code, non-English text and numeric data.
Privacy
Your prompt is tokenized in your browser tab. The only thing the page may download is the open-source tokenizer table (from this site, not a third party), and only if you choose o200k_base. No account is needed, no cookies are set and no analytics run. See thePrivacy Policy. The “Copy share link” button puts your settings after the “#” in the address; browsers do not send that part to servers, and the page’s canonical address never includes it.
FAQ
Where do the prices come from?
From each provider’s official pricing page. Every price in the data file records its source URL and the date it was checked, and the page shows the oldest of those dates under the tool.
Why does my invoice differ from this estimate?
Common reasons: token counts differ from the estimate, thinking tokens were billed as output, caching or batch discounts applied, tool charges were added, or a long-context tier applied.
Is the estimate accurate for code?
Not reliably. Code, JSON and non-English text usually need more tokens than characters ÷ 4 suggests. Use the exact count or the provider’s token counter.
Do you store my prompt?
No. There is no server component; the calculation runs entirely in your browser and nothing is sent anywhere.
Why is a model I use missing?
Its price could not be verified from an official page when the data was last checked. It is deliberately left out rather than guessed.
Related
Embed this tool
Paste this snippet into your own page or docs to show the tool inline. The embedded view works the same way (everything runs in the visitor’s browser) and carries a small link back to MakeTools.
Sources
- js-tiktoken / tiktoken (open-source tokenizer) – checked 2026-10-14
- ai.google.dev/gemini-api/docs/pricing – checked 2026-10-14
- developers.openai.com/api/docs/pricing – checked 2026-10-14
- platform.claude.com/docs/en/about-claude/pricing – checked 2026-10-14
Page last updated 2026-10-14. Written by Prajyot Mulik; see the editorial policy.