The model reads fragments
A token can be a word, part of a word, punctuation, whitespace, or a piece of Unicode. Tokenizers are optimized around training-data frequency, not human intuition. English prose, code, JSON, Korean, URLs, and stack traces all spend tokens differently — sometimes by an order of magnitude.
BPE in sixty seconds
Most modern LLMs use a byte-pair encoding (BPE) variant. The recipe: start with a vocabulary of single bytes (256 symbols). Find the most frequent adjacent pair across the training corpus. Merge that pair into a new token, add it to the vocabulary. Repeat thousands of times until you hit your target vocab size (typically 50K-200K). The result: common English phrases collapse into single tokens; obscure terms or non-Latin scripts get fragmented.
Stop estimating by eye
Use the provider tokenizer when the budget matters. Rough estimates are fine for a paragraph. They are not fine for a 200K-token working session — you will be 30% off and only notice when the bill or the truncation tells you.