A token is a chunk of text that a language model reads and writes one at a time: a short word, part of a longer word, a number fragment, a punctuation mark or a few raw bytes. Providers bill by the million tokens and limit prompts by token count, and on the 14 models read for this guide output tokens cost 5 to 8.3 times as much as input tokens. Prices quoted are a snapshot from 8 November 2026 and will change. On this site's own guides one English word averaged 1.23 tokens, while one Hindi sentence cost 126 tokens in one tokenizer and 38 in another.

Listen to this article5 min audio summary · AI voice
Read the script

This is a spoken summary of the guide to tokens. The measured tables, the price comparison and a free caching calculator are on the page.

The short answer. A token is a chunk of text that a language model reads and writes one at a time. It can be a short word, part of a longer word, a number fragment, or a punctuation mark. Providers bill by the million tokens, and they limit prompts by token count.

What a token looks like. Before a model sees your text, a separate program called a tokenizer cuts it into pieces. Two details surprise people. A space belongs to the token that follows it, so you pay for spacing without seeing it. And numbers get chopped up: a price like four dollars fifty six cents became four tokens.

How many tokens is a word? I counted instead of quoting. On the prose of this site's sixty two guides, about a hundred and four thousand words, one English word averaged one point two three tokens. That is roughly twelve hundred and twenty five tokens for a thousand words. It is a rule for English prose, not for code or other languages.

Why not letters or words? Letters make every sentence very long, and long sequences are slow and expensive. Whole words need a vocabulary that is never finished, and they break on names and typos. Subword pieces are the compromise.

Where tokens came from. The method is called byte pair encoding. Philip Gage described it in nineteen ninety four as a file compression trick: repeatedly replace the most common pair of bytes with a new one. In twenty twelve, Google researchers used units smaller than words for Japanese and Korean speech recognition. In twenty fifteen and twenty sixteen, Rico Sennrich and colleagues adapted Gage's idea to build subword vocabularies for neural translation. SentencePiece followed in twenty eighteen, and GPT two moved to bytes, so no text is ever unknown.

How a tokenizer is built. Start with single characters, count every neighbouring pair, merge the most common pair into a new piece, and repeat. On a toy example, newest became a single token while the rarer word widest stayed split in three. Frequent text becomes cheap and rare text becomes expensive.

Real counts. I counted ten kinds of text with two open source OpenAI encodings. English and Spanish cost about twenty tokens per hundred characters. Code and JSON cost about twice as much. The tokenizer can matter more than the language: one Hindi sentence cost a hundred and twenty six tokens in the older encoding and thirty eight in the newer one. Minifying a small JSON sample saved about a third.

Tokens are not a universal unit. Anthropic states that Claude four point seven and later models produce about thirty percent more tokens for the same text. So a lower price per token is not automatically a lower price per page.

What it costs. I read the pricing pages of Anthropic, OpenAI and Google on the eighth of November, twenty twenty six. Output costs five to eight point three times input. The same job, ten thousand requests with three thousand input and five hundred output tokens, ranged from five dollars fifty to five hundred and fifty dollars. That is a hundred times between the cheapest and the dearest. That compares price, not quality.

Context windows. Windows are now around a million tokens, but a bigger window is not free: OpenAI bills the whole request at higher rates over two hundred and seventy two thousand input tokens. And a chat has no memory, so apps resend the whole conversation every turn. In my model, twenty turns billed a hundred and nineteen thousand input tokens for eleven thousand tokens of actual content, ten point eight times as much.

Caching. A cache write costs more than a normal request, and a read costs far less. Break-even is the write multiplier minus one, divided by the write multiplier minus the read multiplier. For a five minute Claude cache that is twenty one point seven percent: if about one request in five finds a live cache, caching pays. The free calculator on the page works it out from your own prices. Prompts below a model's minimum length are not cached at all, and you are not told.

Seven ways to spend fewer tokens: cache the repeated prefix, cap answer length, use a smaller model for easy work, minify structured data, trim tool definitions, summarise old turns, and use batch pricing for work that can wait.

One caution on freshness. None of the three pricing pages carries a last updated date, so treat every price as a snapshot and check the source before you budget.

Key takeaways

  • A token is a piece of text chosen by a tokenizer — not a word and not a letter. Short common words are one token; longer or rarer words split into pieces; a space belongs to the token after it; numbers and unusual characters split a lot.
  • Measured on this site, one English word is 1.23 tokens — (4.79 characters per token). Code and JSON cost about twice as much per character, and the same sentence in Hindi cost 126 tokens in one tokenizer and 38 in another.
  • Models use subword tokens because letters make sequences too long and whole words need an endless vocabulary — The standard method, byte pair encoding, began as 1994 file compression and reached language models through translation work in 2015 and 2016.
  • Tokens are the bill and the limit — Prices are per million tokens, output costs 5 to 8.3 times input on the 14 models read for this guide, and context windows are counted in tokens.
  • Tokens are not a universal unit — Anthropic states Claude 4.7 and later produce about 30% more tokens for the same text than earlier Claude models, so compare cost per piece of your own text.
  • Caching pays once about one request in five is a hit — for a 5- or 30-minute cache; the calculator below finds the break-even for your own numbers.

What a token is

A language model does not read letters or words. Before it sees anything, your text is cut into pieces called tokens by a separate program, the tokenizer. A token can be a whole short word (fun), a piece of a longer word (Token and ization), a number fragment, a punctuation mark, or, for unusual characters, a few raw bytes. The model reads tokens in, and writes tokens out one at a time. Providers bill by them, and they limit prompts by them.

Two details surprise people. A space belongs to the token that follows it ( fun is one token, with its space), so you pay for spacing without seeing it. And numbers get chopped up: $4.56 became four tokens, which is why price tables and logs are expensive to feed into a model. The same word can also be cut differently by different tokenizers, as the last example shows.

AI & industry notes · Tokens

Real text, cut into tokens

Tokenization is fun.5 tokens (o200k) · 5 tokens (cl100k)
Tokenization␣is␣fun.
Hosting costs $4.56/month7 tokens (o200k) · 7 tokens (cl100k)
Hosting␣costs␣$4.56/month
unbelievably3 tokens (o200k) · 3 tokens (cl100k)
unbelievably

The older cl100k encoding cuts it differently: un, belie, vably

Each box is one token; ␣ marks a space that belongs to the token after it. Split with OpenAI's open-source tiktoken library, encodings o200k_base and cl100k_base.

How many tokens is a word?

Gemini's documentation puts it at about 4 characters per token, and says 100 tokens is about 60 to 80 English words. I counted instead of quoting: the prose of this site's 62 guides (104,577 words, with code, tables and figures removed) came to 1.23 tokens per word, or 4.79 characters per token, using the o200k_base encoding. That is a little more generous than the documentation's range, because these guides use plain, mostly short words. Treat it as a rule for English prose, not for code, numbers or other languages (next sections).

AI & industry notes · Tokens

The rule of thumb, measured on 62 guides

Tokens per word1.23

Measured on the prose of this site's 62 guides (104,577 words).

Characters per token4.79

Gemini's documentation says about 4.

1,000 words is about1,225 tokens

English prose only. Code and other languages differ.

Body prose only (code blocks, tables and figures removed), counted with the o200k_base encoding. Counting with cl100k_base gave 1.24 tokens per word.

Why models use tokens instead of letters or words

The model has a fixed list of allowed pieces, its vocabulary, and at every step it scores every entry on that list to decide what comes next. That forces a trade-off, and tokens are the compromise.

Three ways to cut text into units, and what each one costs.
UnitVocabularyLength of a sentenceThe catch
Single letters or bytesTiny (256 bytes, or a few thousand characters)Very longEvery step carries almost no meaning, so the model does far more steps and every prompt is huge
Whole wordsHuge and never finishedShortNames, typos and new words (“Gunicorn”) have no entry, and every language needs its own enormous list
Pieces of words (subwords)Tens of thousands to a few hundred thousand piecesIn between: about 1.23 tokens per word hereThe pieces are learned from text, so common words are cheap and rare ones split into several tokens

Letters make sequences long, and in the original Transformer design the work of comparing every position with every other grows quickly with length, so long sequences are slow and expensive. Whole words make sequences short but break on anything the list has not seen. Subword pieces keep the list a manageable size and still let the model spell out a word it has never met, one piece at a time. For scale, I measured the vocabularies of three public OpenAI encodings: 50,257 entries for gpt2, 100,277 for cl100k_base and 200,019 for o200k_base.

How tokens were invented

Nobody sat down and designed “the token” for chatbots. The idea was borrowed from data compression, then rediscovered by people who needed machine translation to cope with rare words, and finally scaled up.

Where the idea of a token comes from.
YearWhoWhat happenedWhy it matters here
1994Philip GageDescribed byte pair encoding in The C Users Journal: repeatedly replace the most common pair of bytes with a new, unused byte.It was a file-compression trick. Nothing to do with language models yet.
2012Mike Schuster and Kaisuke Nakajima“Japanese and Korean voice search” (ICASSP 2012), the work later called WordPiece, for Google's speech recognition.Japanese and Korean words are hard to separate, so they needed units smaller than words.
2015 (preprint), 2016Rico Sennrich, Barry Haddow and Alexandra Birch“Neural Machine Translation of Rare Words with Subword Units” adapted Gage's idea to build a subword vocabulary for translation.This is the step that carried byte pair encoding into neural language work.
2018Taku Kudo and John RichardsonSentencePiece (EMNLP 2018): train a tokenizer straight from raw text, with no splitting into words first, and choose the final vocabulary size.Made one tokenizer work for any language, including ones without spaces.
2019OpenAI (GPT-2)Byte-level byte pair encoding: work on bytes, so any text can be encoded and nothing is ever “unknown”.Measured here: a 4-byte emoji costs 3 tokens, built from raw bytes.
SinceEvery major labVocabularies grew: 50,257, then 100,277, then 200,019 entries across three public OpenAI encodings.A bigger vocabulary packs more text into each token, as the Hindi example below shows.

The 1994, 2012, 2015/2016 and 2018 entries were checked against paper records during this write-up. The GPT-2 entry rests on my measurement of the gpt2 encoding in tiktoken (50,257 entries, byte fallback) and my recollection of the GPT-2 paper, which I did not reopen. Which text each tokenizer was trained on is not stated on the pricing pages I read.

How byte pair encoding builds a vocabulary

The method is simple enough to follow by hand:

  1. Start with single characters (or bytes) as the vocabulary, and mark where each word ends.
  2. Count every pair of neighbouring pieces across a large amount of text.
  3. Merge the most common pair into one new piece and add it to the vocabulary.
  4. Repeat until the vocabulary reaches the size you chose. Real tokenizers do this tens of thousands of times.

I ran it on a toy corpus in the style of the one in the translation paper: low five times, lower twice, newest six times, widest three times. These are the first ten merges the program picked:

The first ten merges on a toy corpus: low ×5, lower ×2, newest ×6, widest ×3.
StepMergePair count
1e + s → es9
2es + t → est9
3est + end-of-word → est</w>9
4l + o → lo7
5lo + w → low7
6n + e → ne6
7ne + w → new6
8new + est</w> → newest</w>6
9low + end-of-word → low</w>5
10w + i → wi3

Notice what happens. The ending est is common, so it is merged early and becomes one piece. By step 8, newest is a single token. widest is rarer, so it ends up as wi + d + est: three tokens. That is the whole idea. Frequent text becomes cheap and rare text becomes expensive. It is also why the same word can cost different amounts in different tokenizers: each one learned its merges from different text.

The byte-level version used since GPT-2 starts from bytes instead of letters, so it never meets a character it cannot encode. Unusual characters simply fall back to their raw bytes, which is why one emoji can cost several tokens.

How many tokens is my text? Words, code, JSON and other languages

Token counts depend on what you write. I counted ten kinds of text with two open-source OpenAI encodings. One sample each, so read the pattern, not the decimals:

The same kinds of text, counted with two public OpenAI encodings.
Text (one short sample each)CharactersTokens, cl100k_baseTokens, o200k_baseo200k tokens per 100 characters
English prose190383820.0
Spanish129292418.6
Hindi1231263830.9
Arabic103743332.0
Japanese63594368.3
Python code196676935.2
JSON (pretty)190727438.9
JSON (minified)121454839.7
Numbers58303051.7
Emoji33191339.4
AI & industry notes · Tokens

Same idea, very different token bills

cl100k_base (older)o200k_base (newer)
English prose
cl100k 20 tokens per 100 characterso200k 20
Spanish
cl100k 22 tokens per 100 characterso200k 19
Hindi
cl100k 102 tokens per 100 characterso200k 31
Arabic
cl100k 72 tokens per 100 characterso200k 32
Japanese
cl100k 94 tokens per 100 characterso200k 68
Python code
cl100k 34 tokens per 100 characterso200k 35
JSON (pretty)
cl100k 38 tokens per 100 characterso200k 39
Tokens per 100 characters for one sample sentence each. A single sample per language is an illustration, not a benchmark; Hindi, Japanese and Arabic are my own translations of the English sentence.
  • English and Spanish are cheap, near 20 tokens per 100 characters in both encodings.
  • Code and JSON cost about twice as much per character (34 to 40), because symbols, indentation and short names break into many small tokens.
  • The tokenizer can matter more than the language. The Hindi sentence cost 126 tokens in the older encoding and 38 in the newer one, a 3.3× difference for identical text. A bigger vocabulary that has seen more of a language packs it into fewer tokens.
  • Minifying JSON saved about a third. The pretty-printed object cost 72 tokens (cl100k) or 74 (o200k); the minified one 45 or 48. Part of the saving is the indentation, which tokenizers charge for.
  • Numbers and emoji are token-heavy: 52 tokens per 100 characters for the number sample.
Tokens are not a universal unit. These are OpenAI's open-source encodings. The pricing pages I read do not publish the tokenizers behind the current GPT, Claude or Gemini models, and Anthropic states that Claude 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text than earlier Claude models. So a lower price per token is not automatically a lower price per page of text. Count your own text with the provider's own counter before comparing.

Why tokens are the unit you pay in

Every provider charges per million tokens, with separate prices for input and output, and most add a third, much lower price for cached input. Here are 14 current models from the three big providers, copied from their own pricing pages:

Price per 1M tokens in US dollars, read from each provider's own pricing page on 8 November 2026.
ModelInputOutputCached input (read)Cache write (shortest)Output ÷ input
Claude Fable 5.1$10.00$50.00$0.25$12.505×
Claude Opus 5.5$4.00$20.00$0.20$5.005×
Claude Sonnet 5.5$2.00$10.00$0.10$2.505×
Claude Haiku 5.5 (prompt ≤100K)$0.10$0.50$0.01$0.1255×
Claude Haiku 4.5$1.00$5.00$0.10$1.255×
OpenAI GPT-6 Astra$10.00$50.00$1.00$12.505×
OpenAI GPT-6.1 Sol$2.00$10.00$0.10$2.505×
OpenAI GPT-6.1 Terra$1.00$5.00$0.05$1.255×
OpenAI GPT-6 Luna$0.10$0.50$0.01$0.1255×
OpenAI GPT-5.4 mini$0.75$4.50$0.075not listed6×
Google Gemini 4 Argon$2.00$10.00$0.10not listed5×
Google Gemini 3.8 Flash$0.75$3.75$0.075not listed5×
Google Gemini 3.5 Flash-Lite$0.30$2.50$0.03not listed8.3×
Google Gemini 3.1 Flash-Lite$0.25$1.50$0.025not listed6×
Prices change, so read these as a snapshot. They are the list prices on each provider's own page on 8 November 2026. Providers change prices, rename models, run promotions and add surcharges without notice, and some figures here already have dates on which they change. Use the table to see how costs compare and how the ratios work, not as a quote. Before you budget, check the provider's current page: Anthropic, OpenAI, Google. The ratios (output about five times input, a cache read a small fraction of input) have been steadier than the dollar amounts, but that is an observation, not a guarantee.
  • Output costs 5 to 8.3 times input. The ratio is exactly 5× on 11 of the 14 rows, 6× on two and 8.3× on one. A long answer is the expensive part of a request.
  • Why output costs more is not stated on any of the pages. A reasonable guess, and only a guess, is that the model produces output one token at a time while it can take input in together.
  • Hidden thinking counts as output. Gemini's page labels its output price “including thinking tokens”, so a reasoning model can bill far more output than the answer you see.
  • The spread is huge. Between the cheapest and dearest rows the input price differs by 100×. The next figure shows the same job priced on all 14.
  • Some prices are about to change. Gemini 4 Argon's listed prices double on 1 December 2026 and Gemini 3.8 Flash's on 1 January 2027, per the Gemini page.
AI & industry notes · Tokens

The same job, from $5.50 to $550

100×cheapest to dearest
Claude Haiku 5.5 (prompt ≤100K)$5.50
OpenAI GPT-6 Luna$5.50
Google Gemini 3.1 Flash-Lite$15.00
Google Gemini 3.5 Flash-Lite$21.50
Google Gemini 3.8 Flash$41.25
OpenAI GPT-5.4 mini$45.00
Claude Haiku 4.5$55.00
OpenAI GPT-6.1 Terra$55.00
Claude Sonnet 5.5$110.00
OpenAI GPT-6.1 Sol$110.00
Google Gemini 4 Argon$110.00
Claude Opus 5.5$220.00
Claude Fable 5.1$550.00
OpenAI GPT-6 Astra$550.00
10,000 requests, each with 3,000 input and 500 output tokens, at the list prices in the table above, no caching. Prices as of 8 November 2026 and subject to change. This compares price, not quality: the cheapest and dearest models are not equally capable.

Text is not the only thing measured in tokens. Gemini's tokens page says an image up to 384 pixels on both sides counts as 258 tokens, larger images are split into 768-pixel tiles of 258 tokens each, and audio counts as 32 tokens per second, so one minute of audio is 1,920 tokens.

Why this matters for self-hosting too. If you run an AI agent on your own server, the VPS bill is the small one. See what self-hosting OpenClaw costs and the Hermes Agent cost breakdown: the model API bill is a separate line, and it is measured in the tokens above.

Context windows: how many tokens fit, and what long prompts cost

The context window is the most tokens a model can handle in one request: your prompt, the conversation so far, any documents, and the answer it writes back. Windows are now around a million tokens, but a bigger window is not a free one:

Context window and long-prompt rules, as stated on each provider's own pages.
ModelContext windowLong-prompt rule
Claude 4.6 and later (not Haiku 5.5)1M tokensIncluded “at standard pricing” (Anthropic pricing page).
Claude Haiku 5.5Not stated on the pagePrompts over 100,000 tokens pay higher prices: input rises from $0.10 to $0.50 per million. Cache reads and writes count toward the 100,000.
GPT-6.1 Sol and GPT-6.1 Terra1,050,000 tokens; up to 922,000 in and 128,000 outOver 272K input tokens the whole request is billed at 2× input and cached rates and 1.5× output.
Gemini 4 Argon1,048,576 tokens shared by input, thinking and outputSynchronous output is capped at 65,536 tokens by default.

The bigger risk is quiet. A chat model has no memory between calls, so apps resend the whole conversation every turn, and you are billed for it every time.

AI & industry notes · Tokens

A chat bills its past again every turn

10.8×billed vs. new content
Turn 11,200 tokens billed
Turn 53,200 tokens billed
Turn 105,700 tokens billed
Turn 2010,700 tokens billed
Assumes a 1,000-token system prompt, 200 tokens per user message and 300 per reply, with the full history resent each turn and no caching. Over 20 turns that is 119,000 input tokens for 11,000 tokens of new content, 10.8×.

That is why chat products summarise old turns, why agents trim their tool lists (a four-tool server cost about 750 tokens of context before any call), and why coding agents fetch files on demand instead of loading a whole codebase. The remedy for the repeated part is caching.

How caching changes the maths: input, output and cached tokens

Caching is a discount on the part of the prompt you repeat. The mechanics guide explains what is actually stored; here is what it costs, with the provider numbers from their own pages:

How the three providers price cached input, per their own pages.
ProviderCache writeCache readLifetimeSmallest cacheable prompt
Claude1.25× input for 5 minutes, 2× for 1 hour0.1× input; 0.05× on Opus 5.5 and Sonnet 5.5; 0.025× on Fable 5.15 minutes, refreshed free each time it is used512 to 4,096 tokens, by model
OpenAI (GPT-5.6 and later)1.25× for 30 minutes, 2.5× for 12 hours0.1×, or 0.05× on GPT-6.1 Sol and Terra30 minutes or 12 hours1,024 tokens
OpenAI (earlier models)No write price listedCached-input price listed: 0.1× for the GPT-5 family, 0.25× to 0.5× for GPT-4.1 and GPT-4oNot covered hereVaries by request
Gemini (implicit)No write premium stated; explicit caching adds a storage fee per hourAbout 0.05× to 0.1× of the input priceNot stated on the caching page2,048 to 4,096 tokens, by model

A write costs more than a normal request and a read costs far less, so the question is how often you read. Call the write price w and the read price r, both as multiples of the normal input price, and the share of requests that find a live cache h. The average price of a cached token is h×r + (1 − h)×w, and caching beats not caching when that is below 1. Solving gives a break-even hit rate of (w − 1) ÷ (w − r). For a 5-minute Claude cache (w = 1.25, r = 0.1) that is 0.25 ÷ 1.15, or 21.7%.

Break-even for common cache settings. h* = (w − 1) ÷ (w − r).
SettingWrite wRead rBreak-even hit rateFewest requests in one cache lifetime
Claude, 5-min write, 0.1x read (Sonnet 4.6, Haiku 4.5)1.25×0.1×21.7%2
Claude Opus 5.5 / Sonnet 5.5, 5-min write1.25×0.05×20.8%2
Claude Fable 5.1, 5-min write1.25×0.025×20.4%2
Claude, 1-hour write, 0.1x read2×0.1×52.6%3
Claude Opus 5.5 / Sonnet 5.5, 1-hour write2×0.05×51.3%3
OpenAI GPT-6.1 Sol / Terra, 30-min write1.25×0.05×20.8%2
OpenAI GPT-6.1 Sol / Terra, 12-hour write2.5×0.05×61.2%3
OpenAI GPT-6 Astra, 30-min write (read 0.1x)1.25×0.1×21.7%2
  • A 5-minute or 30-minute cache pays off once about one request in five is a hit. Two requests inside one lifetime are enough.
  • Long caches need more reuse. A 1-hour Claude write (2×) needs about half of requests to hit, and a 12-hour OpenAI write (2.5×) about 61%.
  • With no write premium, caching cannot lose. OpenAI's earlier models list no cache-write price and Gemini's implicit caching states none, so any hit saves.
  • Short prompts are not cached at all, and you are not told. Anthropic's page says prompts below the minimum “cannot be cached” and no error is returned.

Free caching break-even calculator

Pick a model, describe one typical request, and say how often you expect the cache to still be alive. Everything is calculated in your browser and nothing is sent anywhere. The presets use list prices read on 8 November 2026, which may be out of date by the time you read this. Treat the results as estimates: type in your provider's current prices, or choose “Custom”, and check their page before you budget.

1 · Model and cache prices
2 · Your typical request
70%
Break-even hit rate–
Per 1,000 requests, no caching–
Per 1,000 requests, cached–
Saving–
Saving per month–
Fewest requests per cache lifetime–For one cache write to pay for itself.

How this is worked out
  • Without caching, one request costs (prefix + changing input) × input price + output × output price.
  • With caching, each prefix token costs input price × (hit rate × read + (1 − hit rate) × write). A miss writes the cache again, so it pays the write price.
  • Break-even hit rate is (write − 1) ÷ (write − read). If the write multiplier is 1 or less, any hit saves and the tool says so.
  • Fewest requests per cache lifetime is (write − read) ÷ (1 − read), rounded up: how many requests inside one lifetime make a single write worthwhile.
  • Not modelled: batch discounts, long-prompt surcharges, Gemini's hourly storage fee for explicit caches, and prices that change after 8 November 2026.

How to count tokens before you pay

The estimates above are for planning. To know, count. For OpenAI's open-source encodings this takes four lines, and I ran them to produce the numbers in this guide:

import tiktoken

enc = tiktoken.get_encoding("o200k_base")
text = open("prompt.txt").read()
print(len(enc.encode(text)), "tokens (o200k_base)")

Two cautions. The pages I read do not say which encoding each current OpenAI model uses, so treat the count as an estimate for those models. And Claude and Gemini tokenizers are not something you can download from the pages I read: use each provider's own token-counting method in its documentation. In production, log the token usage reported in each API response, which is what you are actually billed on.

Seven ways to spend fewer tokens, ranked by size of effect

In rough order of how much they usually save, each with the evidence behind it:

Seven ways to spend fewer tokens, with the evidence for each.
What to doWhat it savesEvidence
Cache the repeated prefixCached reads cost 0.025× to 0.1× of normal inputProvider pricing pages; break-even about 21% hit rate for short caches
Cap the length of answersOutput costs 5× to 8.3× inputAll 14 price rows in this guide
Use a smaller model for easy workInput price differs 100× between the cheapest and dearest rowsPrice table above; quality is a separate question
Minify structured data you sendAbout a third fewer tokens on a small JSON sampleMeasured: 72 to 45 (cl100k) and 74 to 48 (o200k) tokens
Trim tool and schema definitionsSent as input on every callA four-tool server was about 2,970 characters, roughly 750 tokens
Summarise old conversation turnsStops the history being rebilled in full each turn20 turns billed 10.8× their new content in the model above
Use batch or flex pricing for work that can waitHalf the standard price on OpenAIOpenAI pricing page: Batch and Flex are 50% below Standard

The first three change the unit price or the volume of the biggest line, which is why they come first. Everything else is smaller, but the JSON and tool-list changes are free.

Documented vs. inferred vs. unsupported

What is actually established about tokens and token pricing.
Claim Status Basis
Providers bill per token, with separate input and output prices Documented All three pricing pages.
Output costs 5 to 8.3 times input on the 14 rows listed Documented Arithmetic on the prices in the table, read 8 November 2026.
Byte pair encoding was described by Gage in 1994 and adapted for neural translation by Sennrich and colleagues Documented Paper records checked during this write-up.
English prose averages about 1.23 tokens per word Measured 62 guides on this site, o200k_base. Not a rule for code or other languages.
The same text gives the same token count on every model Unsupported Two OpenAI encodings differ on identical text (Hindi 126 vs 38 tokens), and Anthropic says Claude 4.7+ produces about 30% more tokens than earlier Claude.
A bigger context window means you should fill it Unsupported OpenAI bills the whole request at higher rates over 272K input tokens and Haiku 5.5 over 100K.
Caching always saves money Unsupported Below about 21% hit rate a 5-minute cache costs more; a 1-hour write needs about 51%.
Output costs more because generating is sequential Inferred No provider page gives a reason. This is a common explanation, not a stated one.
The tokenizers of the newest GPT, Claude and Gemini models are public Not stated Not stated on the pricing pages read for this guide.
How fresh are the prices? I read all three pricing pages on 8 November 2026. None carries a “last updated” date, some figures change on set dates (Gemini 4 Argon on 1 December 2026, Gemini 3.8 Flash on 1 January 2027, a GPT-5.6 Sol promotion on 30 November 2026), and a few parts of the long pages reached me only as summaries, so I used only rows I could read in full. Treat every price here as a snapshot and check the source before you budget: Anthropic, OpenAI and Google.
Where to go next. The prompt caching mechanics guide explains what a cache actually stores; what MCP does and the MCP probe show where tool definitions spend your context; and why AI-generated code fails silently covers what tokens cannot buy: verification.

Badri Dutta

Software engineer · 20 years building for the web

20 years building for the web, including day-to-day work on AI API costs. This guide exists because tokens decide the bill, the limits and the speed, yet most explanations stop at “about four characters”. Every count here was run on real text and every price carries its date.

Full background →