How to Use
- Enter the input, output, and cached token counts for this LLM API request.
- Fill in the per-million-token prices provided by your model provider.
- If you only have the text content, paste it into the text box for a quick estimate.
- The tool automatically calculates the cost for a single call and the total cost across multiple calls.
What Is a Token?
AI models aren’t priced by character count — they use tokens as the unit of computation. The prompt you enter, the system instructions, and the model’s response are all split into tokens before processing.
Why Is It Hard to Eyeball Token Count?
Because every model’s tokenizer follows different rules. Chinese, English, digits, line breaks, and symbols are all split differently, so text that looks about the same length can end up with very different token counts.
How Is AI Cost Calculated?
Suppose the input price is $0.15 per 1M tokens and the output price is $0.60 per 1M tokens. If this call used 10,000 input tokens and 2,000 output tokens, the cost is roughly:
- Input cost: 0.15 × 10000 / 1,000,000 = $0.0015
- Output cost: 0.60 × 2000 / 1,000,000 = $0.0012
- Total cost: about $0.0027
When Would You Need This Tool?
- Quickly comparing the rough usage cost of different models
- Estimating an AI API budget before launching a product
- Getting a sense of how many tokens a prompt will use
- Getting a quick estimate to discuss costs with your team