How to estimate tokens per call
Guide · sources linked inline · 2026-10-26
Input tokens are everything you send: the system prompt, tool/function definitions, retrieved documents, the conversation history and the user message. Output tokens are everything the model writes, including hidden reasoning tokens on reasoning models.
Practical method
- Log 50–100 real requests from a prototype.
- Read the token counts the API returns in each response (the usage field) instead of guessing.
- Use the average for budgeting and the 90th percentile for worst-case planning.
Why counts differ between models
Each provider uses its own tokenizer, so the same text can be a different number of tokens. Anthropic notes that Claude 4.7 and newer use a tokenizer that can produce about 30% more tokens for the same text (source). Compare models on measured usage, not only on list price.
Chat history grows
In multi-turn chat, each turn re-sends the earlier conversation, so input tokens grow every turn. Budget with the average input size across a whole session, or use prompt caching for the repeated prefix.
Next step → Plug your numbers into the calculator
Prices last checked 2026-10-26 against official sources · how we verify
Price-change alerts
One short email when a provider changes a price or a promo ends. No spam, unsubscribe any time.