How it works
A token is a chunk of text — roughly three-quarters of an English word on average, though numbers and code often split into more tokens. Providers publish a price per million input tokens and per million output tokens. Multiply your typical prompt and reply sizes by those prices and by your volume.
The formula
Cost per request = (input tokens × input price + output tokens × output price) ÷ 1,000,000
Worked example
With 1,500 input tokens, 400 output tokens and example prices of $3 / $15 per million, one request costs $0.0105. At 2,000 requests a day that is about $21 a day, $630 a month and $7,665 a year.
How to cut AI costs
- Trim context: long system prompts and retrieved documents are paid on every call.
- Use prompt caching where your provider offers it for repeated context.
- Route by difficulty: send easy tasks to smaller, cheaper models.
- Cap output length and ask for structured, concise answers.
- Batch non-urgent jobs if your provider discounts batch processing.
Frequently asked questions
How many tokens is a word?
For English prose, roughly 1.3 tokens per word on average; numbers, code and non-English text usually use more.
Why is output more expensive than input?
Generating each output token requires a full model step, so providers usually price output higher than input.
Are the default prices accurate?
They are illustrative. Enter the current rates for the exact model you use.