Module 8 · LLM Concepts · Lesson 17 of 34

Tokens, context windows and cost

How text becomes tokens, why some text costs more, and what really fits in a context window.

In this lesson · about 18 minutes

  • Estimate token counts for English, code and other languages
  • Explain what the context window holds and what happens at its limit
  • Estimate the cost of a workload from token counts and prices

A model never sees letters or words. A tokenizer first cuts text into tokens from a fixed vocabulary of roughly 50,000 to 200,000 pieces, learned from data so that common chunks get their own token.

  • Common English words are usually one token, often including the space before them (" the").
  • Long or rare words split into pieces ("tokenization" → "token" + "ization").
  • Numbers, code symbols and many non-English scripts split into more, smaller tokens, so the same meaning can cost two or three times as much.

Rules of thumb for English: 1 token ≈ 4 characters ≈ ¾ of a word; 1,000 tokens ≈ 750 words ≈ a page and a half.

Try it · simulator

Tokenizer and cost estimator

Type or pick some text and see how it splits into tokens. Then scale it up to estimate a monthly bill.

Large language models read text as tokens, not letters or words.

Characters

64

Words

11

Tokens

15

Characters per token

4.3

300 input tokens per request × 1,000 requests a day ≈ $27.00 a month for input alone (illustrative price).

This tokenizer is a simplified teaching version. Each model family has its own, learned from data, so counts differ a little between models. Most providers offer a token-counting tool.

Worked example

What does a document Q&A request cost?

Each question sends a 1,500-token system prompt, 6,000 tokens of retrieved document chunks and a 100-token question, and gets a 400-token answer. 3,000 questions a day. Illustrative prices: $3 per million input tokens, $15 per million output tokens.

    Step 0 of 5

    Check your understanding0 of 3 correct

    Question 1

    1.About how many tokens are 1,500 English words?

    Question 2

    2.A 200,000-token window already holds 195,000 tokens of input. You asked for up to 8,000 tokens of reply. What happens?

    Question 3

    3.Why might the same message cost more in Amharic than in English?

    Quiz score: 0 of 3

    Tip: answer every quiz question correctly first.

    Written by Noviq Academy in its own words. The simulators are small teaching models that keep the real idea and leave out the scale; their numbers (prices, speeds, scores) are illustrative. Model names, prices and features change quickly, so check your provider's current documentation before you build. Read-aloud uses your device's built-in voices.