Tools for AI

AI Token Estimator

Estimate tokens, context usage, planned output, and optional custom API cost.

Estimated input tokens
0 tokens
0 words · 0 characters · planned total 500 tokens · 0.4% of context

Quick examples

English proseAbout 4 characters per token
Code or dense textUse a lower characters-per-token estimate
API budgetingEnter your own price per million tokens

How it works

The estimate divides text length by a configurable characters-per-token ratio, then combines it with your planned output to estimate context-window usage. Optional cost uses only the prices you enter.

Useful for

  • Checking prompt size
  • Planning context-window usage
  • Rough API cost estimates

Frequently asked questions

Is the token count exact?

No. Tokenization differs by model and language. This tool provides a practical estimate rather than pretending one estimate is exact for every model.

Why can I change characters per token?

English prose, source code and different languages can tokenize differently. Adjusting the ratio lets you use a more conservative estimate.

How is context usage calculated?

Estimated input tokens plus planned output tokens are compared with the context-window size you enter.

Are model prices kept automatically up to date?

No. To avoid stale pricing claims, cost estimates use the custom input and output prices that you enter.