Oct 19, 2026 · 3 min read · basics

Tokens, context windows and why long prompts cost more

Models read tokens, not characters. In English a token is roughly four characters; in many other languages a word can take several tokens, so the same text costs more.

Context windows

The window is the maximum number of tokens the model can attend to at once, prompt and answer together. Bigger windows allow whole documents, but attention cost and latency grow with length.

Long context is not free memory

Models are best at the beginning and end of a long prompt and weaker in the middle. Put instructions at the top, the question at the end, and remove anything irrelevant.

Count before you send

Use the provider's token counter or the model's tokenizer to estimate cost and stay below limits. It also catches accidental megabyte-sized logs pasted into prompts.

Written by: M. Weber. All articles →