OpenAI token calculator — GPT-5.6, GPT-4.1 & GPT-4o
Paste a prompt below to get the exact OpenAI token count, computed with the same tokenizer OpenAI's models use, then see the API cost across every current GPT model.
Cost by provider
Pick a model per provider — the cost updates instantly using the token counts above.
Current rates, per 1M tokens
Reference table for every model in the calculator above. Figures are USD.
| Provider | Model | Context | Input | Cached input | Output |
|---|
Frequently asked questions
What does this tool actually calculate?
It counts the tokens in the text you paste, estimates how many tokens a typical reply will use based on the output size you pick, and multiplies both by each provider's published per-token rate to show an approximate API cost.
What is a token?
A token is a chunk of text a language model reads at a time — often a word, part of a word, or a punctuation mark. English text averages roughly four characters per token, so a 1,000-word document is usually somewhere around 1,300–1,500 tokens.
How accurate is the token count?
OpenAI counts are computed with the same tokenizer OpenAI's models use, so they're exact. Other providers don't publish a tokenizer that runs in a browser, so those figures are close estimates based on character density — usually within a few percent of the real count.
Why does output cost more than input?
Generating new text takes more computation than reading existing text, so most providers price output tokens several times higher than input tokens — often 3 to 6 times as much on flagship models.
How current is the pricing?
Rates are entered manually from provider documentation and reviewed periodically. Providers change pricing without much notice, so confirm against the provider's own pricing page before budgeting a production workload.
Does this work for code or non-English text?
You can paste anything. Code and non-English text often tokenize less predictably than English prose, so treat the estimate as directional rather than exact for those cases.