numlane

LLM Token Counter & API Cost Calculator

Paste a prompt to count its tokens with OpenAI's o200k_base tokenizer, which is exact for GPT models, and to estimate Claude, Gemini, Grok, DeepSeek and Mistral counts. The table prices one call and a month of calls on 34 models at their current list prices. Your text never leaves your browser.

390 characters · 71 words ·
Repeated system prompts or documents are billed at the lower cached-input price.
Providers
Tokens (OpenAI o200k_base) 84 exact for GPT models · Claude 4.7+ ≈ 109 · Gemini ≈ 84
ModelTokensPer call× 1,000
Gemini 2.5 Flash-Lite
Google · Limited to existing users
84 est. $0.000208 $0.2084
GPT-6 Luna
OpenAI
84 exact* $0.000258 $0.2584
Claude Haiku 5.5
Anthropic · Higher price for prompts over 100k tokens
109 est. $0.000261 $0.2609
GPT-4o mini
OpenAI
84 exact $0.000313 $0.3126
Mistral Small 4
Mistral
84 est. $0.000313 $0.3126
GPT-5.6 Luna
OpenAI
84 exact $0.000617 $0.6168
DeepSeek V4.1 Flash
DeepSeek
84 est. $0.000625 $0.6252
Gemini 3.1 Flash-Lite
Google
84 est. $0.000771 $0.771
Gemini 3.5 Flash-Lite
Google
84 est. $0.001275 $1.28
Gemini 2.5 Flash
Google · Limited to existing users
84 est. $0.001275 $1.28
Grok 4.3
xAI
84 est. $0.001355 $1.36
Gemini 3.8 Flash
Google · Price doubles on 1 Jan 2027
84 est. $0.001938 $1.94
Gemini 3.6 Flash
Google · Price doubles on 1 Jan 2027
84 est. $0.001938 $1.94
DeepSeek V4 Pro
DeepSeek
84 est. $0.002091 $2.09
GPT-5.4 mini
OpenAI
84 exact $0.002313 $2.31
Claude Haiku 4.5
Anthropic
84 est. $0.002584 $2.58
Grok 4.7
xAI
84 est. $0.003168 $3.17
Mistral Medium 3.5
Mistral
84 est. $0.003876 $3.88
GPT-4.1
OpenAI
84 exact $0.004168 $4.17
Gemini 2.5 Pro
Google · Limited to existing users
84 est. $0.005105 $5.11
GPT-6.1 Sol
OpenAI
84 exact* $0.005168 $5.17
GPT-6 Sol
OpenAI
84 exact* $0.005168 $5.17
Gemini 4 Argon
Google · Price doubles on 1 Dec 2026
84 est. $0.005168 $5.17
GPT-4o
OpenAI
84 exact $0.00521 $5.21
Claude Sonnet 5.5
Anthropic
109 est. $0.005218 $5.22
GPT-5.6 Terra
OpenAI
84 exact $0.006168 $6.17
Gemini 3.1 Pro Preview
Google · Preview model
84 est. $0.006168 $6.17
GPT-5.4
OpenAI
84 exact $0.00771 $7.71
Claude Sonnet 4.6
Anthropic
84 est. $0.007752 $7.75
GPT-5.6 Sol
OpenAI · Promotional price, at least through 21 Nov 2026
84 exact $0.0103 $10.34
Claude Opus 5.5
Anthropic
109 est. $0.0104 $10.44
GPT-5.5
OpenAI
84 exact $0.0154 $15.42
GPT-6 Astra
OpenAI
84 exact* $0.0258 $25.84
Claude Fable 5.1
Anthropic
109 est. $0.0261 $26.09

Prices in USD at list price, standard tier, checked 2026-10-20. exact* = tokenizer assumed (not yet documented by the vendor).

How the cost of an API call is calculated

Providers bill input (prompt) tokens and output (response) tokens separately, priced per million tokens:

cost per call = input tokens × input price ÷ 1,000,000 + output tokens × output price ÷ 1,000,000

Two adjustments matter in practice. Cached input: a prompt prefix the provider has cached is billed at a much lower rate. Long-context tiers: some models charge more for the whole request once the prompt passes a threshold, for example above 100,000 tokens on Claude Haiku 5.5, 200,000 on Gemini 2.5 Pro and Grok, and 272,000 on recent GPT models. The calculator applies both automatically.

Worked example

A prompt of 2,000 tokens with a 500-token answer on GPT-5.6 Terra ($2 input, $12 output per 1M tokens):

2,000 × $2 ÷ 1,000,000 = $0.004 500 × $12 ÷ 1,000,000 = $0.006 per call = $0.01 · 10,000 calls = $100

The same 2,000 OpenAI tokens are about 2,600 tokens on Claude Sonnet 5.5, because its tokenizer splits text more finely, so comparing models by price per token alone understates Claude's cost.

How tokens are counted here

  • OpenAI (GPT-4o, GPT-4.1, GPT-5.x): exact, using the o200k_base byte-pair encoding that these models use, running in your browser. The GPT-6 family is not yet documented and is assumed to use the same encoding.
  • Claude: estimated. Anthropic states that Claude 4.7 and later produce about 30% more tokens for the same text than earlier models, so we multiply the o200k count by 1.3 for Fable, Opus, Sonnet and Haiku 5.x and by 1.0 for Sonnet 4.6 and Haiku 4.5.
  • Gemini, Grok, DeepSeek, Mistral: estimated from the o200k count. Google gives the rule of thumb of about four characters per token.

Rules of thumb from our own samples with o200k_base: English averages 5.4 characters and 1.12 tokens per word; German 4.6 characters and 1.47 tokens per word. Code, numbers and non-Latin scripts use more tokens per character.

LLM API prices per million tokens

List prices in US dollars, standard tier, as of 2026-10-20. Long-context and dated price changes are noted.

ModelAPI idInputCached inputOutputContext
Claude Fable 5.1 claude-fable-5-1 $10 $0.25 $50 1,000,000
Claude Opus 5.5 claude-opus-5-5 $4 $0.2 $20 1,000,000
Claude Sonnet 5.5 claude-sonnet-5-5 $2 $0.1 $10 1,000,000
Claude Haiku 5.5
> 100,000 tokens: $0.5 / $2.5

Higher price for prompts over 100k tokens
claude-haiku-5-5 $0.1 $0.01 $0.5 1,000,000
Claude Sonnet 4.6 claude-sonnet-4-6 $3 $0.3 $15 1,000,000
Claude Haiku 4.5 claude-haiku-4-5-20251001 $1 $0.1 $5 200,000
GPT-6 Astra
> 272,000 tokens: $20 / $75
gpt-6-astra $10 $1 $50 1,050,000
GPT-6.1 Sol
> 272,000 tokens: $4 / $15
gpt-6.1-sol $2 $0.1 $10 1,050,000
GPT-6 Sol
> 272,000 tokens: $4 / $15
gpt-6-sol $2 $0.2 $10 1,050,000
GPT-6 Luna
> 272,000 tokens: $0.2 / $0.75
gpt-6-luna $0.1 $0.01 $0.5 1,050,000
GPT-5.6 Sol
> 272,000 tokens: $8 / $30

Promotional price, at least through 21 Nov 2026
gpt-5.6-sol $4 $0.4 $20 1,050,000
GPT-5.6 Terra
> 272,000 tokens: $4 / $18
gpt-5.6-terra $2 $0.2 $12 1,050,000
GPT-5.6 Luna
> 272,000 tokens: $0.4 / $1.8
gpt-5.6-luna $0.2 $0.02 $1.2 1,050,000
GPT-5.5
> 272,000 tokens: $10 / $45
gpt-5.5 $5 $0.5 $30 1,050,000
GPT-5.4
> 272,000 tokens: $5 / $22.5
gpt-5.4 $2.5 $0.25 $15 1,050,000
GPT-5.4 mini gpt-5.4-mini $0.75 $0.075 $4.5 400,000
GPT-4.1 gpt-4.1 $2 $0.5 $8 1,047,576
GPT-4o gpt-4o $2.5 $1.25 $10 128,000
GPT-4o mini gpt-4o-mini $0.15 $0.075 $0.6 128,000
Gemini 4 Argon
from 2026-12-01: $4 / $20
gemini-4-argon $2 $0.1 $10 1,048,576
Gemini 3.8 Flash
from 2027-01-01: $1.5 / $7.5
gemini-3.8-flash $0.75 $0.075 $3.75 1,048,576
Gemini 3.6 Flash
from 2027-01-01: $1.5 / $7.5
gemini-3.6-flash $0.75 $0.075 $3.75 1,048,576
Gemini 3.5 Flash-Lite gemini-3.5-flash-lite $0.3 $0.03 $2.5 1,048,576
Gemini 3.1 Flash-Lite gemini-3.1-flash-lite $0.25 $0.025 $1.5 1,048,576
Gemini 3.1 Pro Preview
> 200,000 tokens: $4 / $18

Preview model
gemini-3.1-pro-preview $2 $0.2 $12 1,048,576
Gemini 2.5 Pro
> 200,000 tokens: $2.5 / $15

Limited to existing users
gemini-2.5-pro $1.25 $0.125 $10 1,048,576
Gemini 2.5 Flash
Limited to existing users
gemini-2.5-flash $0.3 $0.03 $2.5 1,048,576
Gemini 2.5 Flash-Lite
Limited to existing users
gemini-2.5-flash-lite $0.1 $0.01 $0.4 1,048,576
Grok 4.7
>= 200,000 tokens: $4 / $12
grok-4.7 $2 $0.5 $6 500,000
Grok 4.3
>= 200,000 tokens: $2.5 / $5
grok-4.3 $1.25 $0.2 $2.5 1,000,000
DeepSeek V4.1 Flash deepseek-flash $0.3 $0.006 $1.2 1,000,000
DeepSeek V4 Pro deepseek-v4-pro $1.32 $0.044 $3.96 1,000,000
Mistral Medium 3.5 mistral-medium-3-5 $1.5 — $7.5 256,000
Mistral Small 4 mistral-small-2603 $0.15 — $0.6 256,000

Frequently asked questions

What is a token?

A token is the unit a language model reads and writes: a whole word, part of a word, a number or a punctuation mark. With OpenAI's o200k_base tokenizer, ordinary English text averages about 5.4 characters per token, or 1.12 tokens per word in our sample.

How many tokens is 1,000 words?

About 1,120 tokens for English text with OpenAI's tokenizer, more for German (about 1,470 in our sample) and roughly 30% more again for Claude 4.7 and later models, whose tokenizer splits text more finely.

Why are Claude and Gemini counts marked as estimates?

Anthropic and Google do not publish a tokenizer that runs in the browser, so their counts here are estimated from the o200k_base count. For Claude 4.7 and later we multiply by 1.3, because Anthropic states the newer tokenizer produces about 30% more tokens. For exact numbers, both providers offer a free token-counting API endpoint.

Is my text sent anywhere?

No. The tokenizer is downloaded once and runs entirely in your browser. Nothing you paste is uploaded to numlane or to any AI provider.

Why do output tokens cost more than input tokens?

Generating text takes far more computation per token than reading it, so every provider charges a multiple of the input price for output, typically four to eight times. Long answers and reasoning-heavy models therefore dominate the bill.

Which model is the cheapest for my prompt?

For the sample prompt above with 500 output tokens, Gemini 2.5 Flash-Lite is cheapest at $0.000208 per call, and Claude Fable 5.1 the most expensive at $0.0261. Paste your own prompt to see the ranking change.

What are cached input tokens?

If you send the same long prefix repeatedly (a system prompt, a document), providers can serve it from a cache and bill it at a fraction of the normal input price. Use the cached-input setting to see the effect; how much of your prompt is cached depends on the provider's caching rules.

Does the counter include images, audio or tool definitions?

No. It counts the text you paste. Images, audio, video and tool schemas are tokenized by each provider with their own rules and add to the bill separately.

Sources

Information, not legal, tax or financial advice. Check the official sources linked on each page.