A token is a chunk of text, not a word
A token is a small piece of text the model reads or writes — sometimes a whole word, sometimes part of one, sometimes a single punctuation mark. As a rough rule of thumb for plain English text, characters ÷ 4 ≈ tokens — the same estimate T9's own calculator uses, accurate to roughly ±10–15% for typical English prose. Other languages can tokenize less efficiently: text in Portuguese or Spanish commonly needs more tokens than the same meaning expressed in English.
Illustration only, not exact tokenizer output — "Summarize this meeting." split into token-sized pieces the way a subword tokenizer might. Real providers may split the same text differently.
"Summarize this meeting." is 23 characters. Using the characters ÷ 4 estimate above: 23 ÷ 4 ≈ 6 tokens. A real tokenizer might land a token or two higher or lower — this is a planning estimate, not an exact count.
Input tokens vs. output tokens
Providers count and price these two directions separately:
Input tokens
Everything your application sends to the model on a given call: the user's message, the system prompt, any retrieved knowledge-base context, and (in a multi-turn chat) the conversation history sent again as context.
Output tokens
The text the model generates in reply. Output is usually billed at a meaningfully higher rate than input, so a verbose answer costs more than a terse one of the same apparent length.
What is a context window?
A model's context window is the maximum number of tokens — input plus output combined — it can handle in a single call. A larger window lets you send more history or more retrieved document content, but every token you put in it is a token you pay for; a bigger window does not make tokens free, it only raises the ceiling on how much you can send at once.
Why conversation history matters
In a multi-turn chat, most APIs are stateless: your application has to resend the entire conversation so far as input on every new message, not just the newest line. That means a five-message conversation does not cost five times one message — it costs meaningfully more, because each earlier message gets paid for again on every later turn.
System prompts and knowledge-base context also count
Two other things quietly add to input tokens on every call: the system prompt (the standing instructions your application sends before the user's own message, on every single request), and any knowledge-base or retrieved context your application injects for a retrieval-augmented (RAG) answer. Both are easy to underestimate because they are invisible to the end user, but both are billed like any other input token.
Put it together
Once you can see input tokens, output tokens, history, system prompt, and context as separate, addable pieces, you can reason about cost instead of guessing at it. Every calculator on this site turns those pieces into a cost estimate the same way:
Estimated cost = (input tokens ÷ 1,000,000) × input price + (output tokens ÷ 1,000,000) × output price See the full walkthrough — pricing sources, assumptions, and worked examples — in our methodology.