Understanding AI tokens and context pricing
Large Language Models process text in units called tokens rather than raw characters or words. A token is typically a sub-word chunk of characters (e.g. "calcul" and "ator" for calculator). In English, 1 token is roughly 4 characters or 0.75 words.
API providers bill developers per million input (prompt) tokens and output (completion) tokens. Using this calculator, you can estimate these token counts and instantly compare pricing across the absolute latest LLM models from OpenAI, Anthropic, Google, and Meta.