About
Why Calculate Token exists, how the numbers are produced, and where they stop being reliable.
Why this exists
Every provider prices per token, and nobody thinks in tokens. The gap between “this prompt looks short” and what it costs at scale is where budgets go wrong — and it is not intuitive, because the same paragraph tokenizes differently on different models, and code tokenizes far worse than prose.
Most calculators ask you to pick a model first. This one counts every model at once, because the useful question is usually not “what does this cost on GPT” but “which of these should I be using”.
How the numbers are produced
- GPT counts are exact and local. The real BPE tokenizer runs in your browser, so the count matches what OpenAI would charge and your text is never transmitted to produce it.
- Claude and Gemini counts are estimates, and say so. Neither Anthropic nor Google publishes a tokenizer that can run in a browser, and neither count is worth a server round trip per keystroke — so both are estimated from character length, using a ratio recorded per provider. Every such row is labelled
estrather than quietly showing an approximation as though it were exact. - Prices are checked against the articles that quote them. A blog post here declares which figures it cites, and the build fails if one drifts from the model catalogue. Changing a price surfaces every article that needs updating instead of leaving stale numbers published.
15 models are currently covered, including long-context tiers — several providers bill the entire request at an elevated rate once it crosses a threshold, which is the single easiest way to be surprised by an invoice. The full mechanics — exact versus estimated counting, how a price is actually calculated, and where this number can diverge from a real invoice — are written up on the methodology page.
What stops a wrong number from shipping
Prices move, models retire, and prose about either goes stale the moment it does. Three checks run on every build rather than relying on someone remembering to update a page:
- Blog posts declare the figures they quote, and the build fails if a quoted price, context window, or retirement date no longer matches the model catalogue — so an old post cannot go on citing a rate the provider changed months ago.
- Per-model write-ups are checked against each other,not just for being present. A superlative like “the cheapest input rate” is recomputed from the current catalogue and the build fails if the page naming it is no longer true, and no long run of words may repeat verbatim across two models’ pages — the check that catches copy that quietly became a template.
- The site tells you when its own numbers are old.The “prices last updated” date is read from the commit history of the pricing table itself, not hand-typed, and a banner appears once that date passes thirty days — this market moves faster than a quarter, so a slower warning would miss it.
Where it stops being reliable
A calculator that oversells itself is worse than no calculator, so: the figures here are estimates of input cost for text you already have. A real bill also includes system prompts, tool definitions, retries, cached input priced differently, and output tokens that do not exist yet. Cached-input pricing is deliberately not modelled, because a cache hit rate depends on how you call the API and cannot be inferred from a block of text.
Use it to compare models and to catch order-of-magnitude mistakes. Verify anything you are going to commit to against your provider’s billing.
Open source
The whole thing is public, including its tests and this page. If a number looks wrong you can read the code that produced it, and the repository is the right place to say so.
Get in touch
Corrections, missing models, and bug reports are all welcome — here is how to reach us. What the service does with your data is set out in the privacy policy.