Module 0 · Lesson 4 of 10
Tokens: the pieces a model reads
7 words · 10 tokens · 1.43 tokens per word
At $1 per million input tokens, 1,000 questions like this cost $0.01. Prices vary by model and change often.
What this simplifies. This splitter is written for teaching, with fixed rules for where to cut. Real models learn about 100,000 pieces from data, so they cut in different places. Their counts differ, sometimes a lot for code, numbers or other languages. The rule of thumb still holds: in English, a token is roughly three quarters of a word. The cost counts only the text you typed. A real request also pays for the instructions and documents in the prompt, and for the answer, whose tokens often cost more. A dot (·) marks a space that belongs to the token.
A model reads and writes small pieces of text called (A piece of text that a language model reads or writes, often part of a word. Prices and limits are counted in tokens.). It reads in pieces, not whole words, and a common word is often only one piece. A rare or long word is split into two or more tokens.
Every request counts tokens, and the (Everything sent to a language model in one request: instructions, context and the question.) you send and the answer you get are counted apart. Limits and prices are set per token, so a longer prompt or a longer answer costs and counts for more.
English text averages roughly three-quarters of a word per token, close to 1.33 tokens for every word. This ratio is rough: it shifts with the language, the words used and the model itself.
In system design: Token counts set your prompt budget, your answer length limit and your bill. A backend estimates tokens before sending a request, to avoid errors or surprise costs.