AI token counters

Estimate prompt size and model cost before sending an AI request.

What you can do

Count tokens for OpenAI, Anthropic, DeepSeek, and Llama models, then estimate OpenAI API costs. Use these calculators before a request to compare context limits and budget.

  • Check whether a prompt fits a context window
  • Compare token counts across model families
  • Estimate API spend before a batch run

Choose a tool

Pick the input and output that match your current task.

How to choose

Models read tokens rather than characters. A token count helps you check whether a prompt and expected response fit within a model's context window before you send the request.

Tokenizers differ between model families, so the same text can produce different counts. Use the calculator for the model you plan to call, then use its current pricing when estimating spend.