Token and cost calculator

Paste a prompt to estimate its tokens, check it fits each model’s context window, and compare the cost per call, per day and per month. Counts are estimates, not the vendors’ tokenizers, and your text never leaves the browser.

Sign in to save this tool

Paste the prompt you want to price, or open a text file.

Tokens (estimate)≈ 68likely 56–83
Characters239
Words42
Characters per token3.5
About 68 tokens (likely 56–83).

Detected mostly Latin script. This is an estimate from the character mix, not the vendor’s tokenizer — treat it as roughly ±20%. Arabic is counted at its own, lower density because most tokenizers split it into more pieces. For the exact count, use the snippets under “Getting the exact count”.

Assumptions

How long a typical reply is, in tokens.

How many requests your app sends each day. A month is 30 days.

Share of input billed at the cache-read rate. Models with no published cache rate are unchanged.

Cheapest shown
GPT-5 nano⁨$9.70⁩ a month
Most expensive shown
Claude Fable 5.1⁨$1,587⁩ a month164× the cheapest
Add your own rate

For a model that is not listed, another host’s price for open weights, or a rate you negotiated. Prices per million tokens.

Cost by model

Prices as of 2026-09-20, copied from each provider’s pricing page. They change without notice — verify on the vendor’s pricing page before you budget.

Sort by
Providers
30 of 30 models. Prices per million tokens on each provider’s own API, as of 2026-09-20.
ModelRate in / outPer callPer dayPer month
Claude Fable 5.1Anthropic · 1M context≈ 88 input tokens here: this family’s tokenizer produces about 30% more tokens for the same text.$10 / $50cache read ⁨$0.25⁩$0.0529$52.88$1,587
Claude Opus 5Anthropic · 1M context≈ 88 input tokens here: this family’s tokenizer produces about 30% more tokens for the same text.$5 / $25cache read ⁨$0.5⁩$0.0264$26.44$793.26
Claude Opus 4.8Anthropic · 1M context≈ 88 input tokens here: this family’s tokenizer produces about 30% more tokens for the same text.$5 / $25cache read ⁨$0.5⁩$0.0264$26.44$793.26
Claude Sonnet 5Anthropic · 1M context≈ 88 input tokens here: this family’s tokenizer produces about 30% more tokens for the same text.$2 / $10cache read ⁨$0.2⁩$0.0106$10.58$317.30
Claude Sonnet 4.6Anthropic · 1M context$3 / $15cache read ⁨$0.3⁩$0.0122$12.20$366.12
Claude Haiku 4.5Anthropic · 200K context$1 / $5cache read ⁨$0.1⁩$0.00407$4.07$122.04
GPT-6 AstraOpenAI · 1.05M context$10 / $50cache read ⁨$1⁩$0.0407$40.68$1,220
GPT-5.6 SolOpenAI · 1.05M context$4 / $20cache read ⁨$0.4⁩$0.0163$16.27$488.16
GPT-5.6 TerraOpenAI · 1.05M context$2 / $12cache read ⁨$0.2⁩$0.00974$9.74$292.08
GPT-5.6 LunaOpenAI · 1.05M context$0.2 / $1.2cache read ⁨$0.02⁩$0.00097$0.9736$29.21
GPT-5.4OpenAI · 272K context$2.5 / $15cache read ⁨$0.25⁩$0.0122$12.17$365.10
GPT-5.4 miniOpenAI$0.75 / $4.5cache read ⁨$0.075⁩$0.00365$3.65$109.53
GPT-5 nanoOpenAI$0.05 / $0.4cache read ⁨$0.005⁩$0.00032$0.3234$9.70
Gemini 3.1 ProGoogle · 1M contextRises to $4 / $18 on prompts over 200K tokens.$2 / $12cache read ⁨$0.2⁩$0.00974$9.74$292.08
Gemini 3.8 FlashGoogle · 1M contextPromotional rate to 31 December 2026; doubles on 1 January 2027.$0.75 / $3.75cache read ⁨$0.075⁩$0.00305$3.05$91.53
Gemini 3.5 FlashGoogle · 1M context$1.5 / $9cache read ⁨$0.15⁩$0.00730$7.30$219.06
Gemini 3.5 Flash-LiteGoogle$0.3 / $2.5cache read ⁨$0.03⁩$0.00202$2.02$60.61
Gemini 2.5 Flash-LiteGoogleText, image and video input; audio input is priced higher.$0.1 / $0.4cache read ⁨$0.01⁩$0.00033$0.3268$9.80
Grok 4.6xAI · 500K contextDoubles for a request whose prompt reaches 200K tokens.$2 / $6cache read ⁨$0.5⁩$0.00494$4.94$148.08
Grok 4.3xAI · 1M contextDoubles for a request whose prompt reaches 200K tokens.$1.25 / $2.5cache read ⁨$0.2⁩$0.00209$2.08$62.55
DeepSeek V4 ProDeepSeek · 1M contextPeak rate. Half price outside 01:00–04:00 and 06:00–10:00 UTC on weekdays.$1.32 / $3.96cache read ⁨$0.044⁩$0.00326$3.26$97.73
DeepSeek FlashDeepSeek · 1M contextPeak rate. Half price outside 01:00–04:00 and 06:00–10:00 UTC on weekdays.$0.3 / $1.2cache read ⁨$0.006⁩$0.00098$0.9804$29.41
Mistral Medium 3.5Mistral$1.5 / $7.5no published cache rate$0.00610$6.10$183.06
Mistral Small 4Mistral$0.15 / $0.6no published cache rate$0.00049$0.4902$14.71
CodestralMistral$0.3 / $0.9no published cache rate$0.00074$0.7404$22.21
Llama 3.3 70BOpen weights$1.04 / $1.04no published cache rate$0.00090$0.9027$27.08
Qwen3.8 (2.4T-A95B)Open weights$2 / $6no published cache rate$0.00494$4.94$148.08
Qwen3.8 FlashOpen weights$0.15 / $0.47no published cache rate$0.00039$0.3862$11.59
GLM-5.3Open weights$1.4 / $4.4no published cache rate$0.00362$3.62$108.46
Kimi K3Open weights$3 / $15no published cache rate$0.0122$12.20$366.12

Sources

Getting the exact count

A free endpoint that runs the model’s own tokenizer and charges nothing for the call.

Provider
Snippet language
import anthropic

client = anthropic.Anthropic()

count = client.messages.count_tokens(
    model="claude-opus-5",
    messages=[{"role": "user", "content": text}],
)

print(count.input_tokens)

How to use it

  1. Paste your prompt into the text box, or open a text file. The token estimate updates as you type.
  2. Set how many output tokens a typical reply has and how many calls you make per day. Optionally set the share of input served from a prompt cache.
  3. Compare the cost per call, per day and per month in the table. Sort by price or show only the providers you care about.
  4. Add your own rate for a model that is not listed or a price you negotiated.
  5. Before you budget, get the exact count with the provider snippet at the bottom and check the price on the vendor’s pricing page.

Supported formats and limits

  • Token counts are estimates from the mix of scripts in your text (Latin, Arabic, CJK, digits, punctuation), not the vendors’ tokenizers. Expect roughly ±20%; the likely range is shown under the estimate.
  • Arabic is counted at a lower characters-per-token density than English, because most tokenizers split Arabic into more pieces. Code gets an 8% surcharge.
  • Prices are a snapshot taken on 2026-09-20 from each provider’s own pricing page and may have changed since. Each provider’s source page is linked. Cloud marketplaces such as Bedrock and Vertex are not covered.
  • Tiered, promotional and off-peak rates are noted on the row they apply to but not applied automatically. A month is counted as 30 days.
  • Up to 1,000,000 characters of text, text files up to 5 MB, and up to 10 rates of your own.

Examples

  • Check whether a 300-page document fits a model’s context window before you send it.
  • Compare what a support chatbot with 5,000 calls a day would cost on a small model versus a frontier model.
  • See how much more an Arabic system prompt costs than the same prompt in English.

Frequently asked questions

Is the token count exact?

No. Every provider uses its own tokenizer, and shipping all of them would make this page megabytes heavier. The calculator estimates from the character mix and shows a likely range. For an exact count, use the provider’s token-counting API; the page has ready snippets.

Why does Arabic text use more tokens?

Most tokenizer vocabularies were built mainly from English text, so Arabic words break into several pieces and diacritics often cost a token each. The same paragraph can cost around 50% more in Arabic, so the calculator counts Arabic separately instead of applying an English ratio.

Are the prices current?

They were read from each provider’s pricing page on 2026-09-20 and are not updated automatically. Model prices change without notice, so verify on the vendor’s pricing page (linked under Sources) before you rely on a figure.

Is my text uploaded?

No. The estimate is calculated in your browser and your text is never sent anywhere.