AI API Cost Calculator
Enter the input and output tokens of a typical request, how many requests you make a day and your prices per million tokens, and get the cost per request, per day, per month and per year, plus how the bill changes if volume or length changes. Prices are yours to type; a preset only fills them in for you.
Result
Estimate
Enter your tokens, requests and prices to see the cost.
- Per request
- Per 1,000 requests
- Per day
- Per month
- Per year (365 days)
- Tokens per month
- Input cost per request
- Cached input cost per request
- Output cost per request
- Saved by caching, per request
What if it changes?
Monthly cost if one thing is multiplied and everything else stays the same. Changing volume has the same effect as every price changing.
| Multiplier | Requests per day | Output length | Input length |
|---|
Examples
Worked examples at example prices of 2 USD input and 10 USD output per million tokens (30-day month, no caching):
| Workload | Tokens in / out | Requests per day | Per request | Per month |
|---|---|---|---|---|
| Support chatbot | 1,500 / 300 | 2,000 | 0.006 USD | 360.00 USD |
| Assistant over retrieved documents | 6,000 / 500 | 500 | 0.017 USD | 255.00 USD |
| Long document summaries | 40,000 / 800 | 100 | 0.088 USD | 264.00 USD |
AI API price reference
These are the standard pay-as-you-go prices behind this calculator’s presets, listed by provider. They come from the same data the calculator uses, and each row shows the day its values were last compared with the provider’s own pricing page.
All prices are in USD per 1,000,000 (one million) tokens. “Cached input” is the price to read a prompt prefix from the provider’s prompt cache; “cache write” is the price to store one there. Batch prices apply to asynchronous batch requests.
| Model | Input | Output | Cached input (read) | Cache write | Batch input | Batch output | Verified |
|---|---|---|---|---|---|---|---|
| Claude Fable 5.1 | 10.00 USD | 50.00 USD | 0.25 USD | 12.50 USD | 5.00 USD | 25.00 USD | |
| Claude Opus 5.5 | 4.00 USD | 20.00 USD | 0.20 USD | 5.00 USD | 2.00 USD | 10.00 USD | |
| Claude Sonnet 5.5 | 2.00 USD | 10.00 USD | 0.10 USD | 2.50 USD | 1.00 USD | 5.00 USD | |
| Claude Haiku 4.5 | 1.00 USD | 5.00 USD | 0.10 USD | 1.25 USD | 0.50 USD | 2.50 USD |
Official source: Anthropic pricing page
| Model | Input | Output | Cached input (read) | Cache write | Batch input | Batch output | Verified |
|---|---|---|---|---|---|---|---|
| gpt-6-astra | 10.00 USD | 50.00 USD | 1.00 USD | 12.50 USD | 5.00 USD | 25.00 USD | |
| gpt-6.1-sol | 2.00 USD | 10.00 USD | 0.10 USD | 2.50 USD | 1.00 USD | 5.00 USD | |
| gpt-5.4-mini | 0.75 USD | 4.50 USD | 0.075 USD | N/A | 0.375 USD | 2.25 USD | |
| gpt-6-luna | 0.10 USD | 0.50 USD | 0.01 USD | 0.125 USD | 0.05 USD | 0.25 USD |
Official source: OpenAI API pricing page
| Model | Input | Output | Cached input (read) | Cache write | Batch input | Batch output | Verified |
|---|---|---|---|---|---|---|---|
| Gemini 3.1 Pro PreviewPrice for prompts up to 200,000 tokens; longer prompts cost more. | 2.00 USD | 12.00 USD | 0.20 USD | N/A | 1.00 USD | 6.00 USD | |
| Gemini 2.5 FlashGoogle currently limits access to the Gemini 2.5 models to users who have used them before. The model is not deprecated and no shutdown date is announced. Google’s model page | 0.30 USD | 2.50 USD | 0.03 USD | N/A | 0.15 USD | 1.25 USD |
Official source: Gemini API pricing page
N/A means ToolQuarter does not record that price for the model, for example because the provider lists no such price or bills it another way (cache storage billed per hour is not modelled). It never means zero.
How to read these prices
- Prices change often, and providers rename and retire models. The provider’s own pricing page is always the authority: confirm a price there before you rely on it.
- ToolQuarter lists only the models its calculators offer as presets. This is not a complete list of any provider’s models or prices, and it is not a real-time feed.
- Standard prices for the provider’s usual prompt size are shown. Long-context tiers, regional or data-residency surcharges, cache storage fees, tool and search charges, flex and priority tiers and taxes are not included.
- These figures are for planning and comparison. A price you enter yourself in the calculator always takes precedence over a preset.
- ToolQuarter is independent. It is not affiliated with, endorsed by or sponsored by Anthropic, OpenAI or Google; their names are used only to say whose prices are shown.
Formula & Methodology
The arithmetic is exact for the numbers you enter:
cost per request = input tokens × input price ÷ 1,000,000 + output tokens × output price ÷ 1,000,000with caching: the cached share of the input tokens is charged at the cached input price insteadper day = cost per request × requests per dayper month = per day × days per month; per year = per day × 365Good to know
- Token counts and prices are your inputs, so the result is only as accurate as they are. Use the token counter for an estimate, or the usage figures in the API response for real numbers.
- Output tokens usually cost several times more than input tokens, and some models bill reasoning tokens as output. Include them in the output tokens.
- Not included: batch discounts, cache-write and storage fees, regional multipliers, tool or search charges, free tiers, rate limits and taxes.
- Months differ: 30 days by default, 365 days for a year. Change the days per month to match your usage.
- Presets only save typing. Prices change, so check the provider’s page, or type your own negotiated prices.
How to Use
- Enter the input and output tokens of a typical request and the requests per day.
- Type your input and output prices per million tokens, or prefill them from a preset.
- Optionally enter a cached input price and the share of input served from cache.
- Read the cost per request, day, month and year, and the sensitivity table.
Frequently Asked Questions
How do I calculate my monthly AI API cost?
Work out the cost of one request (input tokens × input price plus output tokens × output price, each divided by one million), multiply by the requests per day, then by the days in the month. This calculator does all of that and also shows the yearly figure.
Why are input and output tokens priced differently?
Generating output costs the provider more compute than reading input, so output is usually priced several times higher. That is why long replies, and reasoning tokens billed as output, can dominate a bill.
How does prompt caching change the cost?
Input tokens read from the cache are charged at a much lower cached price. Enter that price and the share of input you expect from cache to see the saving. Cache-write and storage fees, where a provider charges them, are not included.
Where do I get my token counts?
The usage fields in the API response give exact input and output tokens per request. Before you have any, estimate with the token counter and plan for a margin.
Do reasoning or thinking tokens count?
On many models they are billed as output tokens even when you do not see them. Add them to the output tokens so the estimate is not too low.
Last updated: