Free tool
LLM API cost calculator
Quick answer
An LLM API bill is requests a month, times model calls per request, times tokens, times the price per million tokens, for input and output separately. Output tokens usually cost four to six times as much as input. An agent that uses tools makes several model calls per request, so count those. Enter your numbers below to see the monthly cost on every model at once.
| Model | $ / M input | $ / M output | Per request | Per month |
|---|---|---|---|---|
| Claude Haiku 5.5Anthropic. Prompts up to 100K tokens | $0.002 | $20.00 | ||
| GPT-6 LunaOpenAI | $0.002 | $20.00 | ||
| Gemini 3.1 Flash-LiteGoogle | $0.0054 | $54.00 | ||
| Gemini 3.8 FlashGoogle | $0.015 | $150.00 | ||
| GPT-6.1 TerraOpenAI | $0.02 | $200.00 | ||
| Claude Sonnet 5.5Anthropic | $0.04 | $400.00 | ||
| GPT-6.1 SolOpenAI | $0.04 | $400.00 | ||
| Gemini 4 ArgonGoogle. Google says this price doubles on 1 December 2026 | $0.04 | $400.00 | ||
| Claude Opus 5.5Anthropic | $0.08 | $800.00 | ||
| Claude Fable 5.1Anthropic | $0.20 | $2,000.00 | ||
| GPT-6 AstraOpenAI | $0.20 | $2,000.00 |
Standard prices for short prompts, read from each provider's pricing page on 31 October 2026. Edit any price.
What to enter
- Requests a month: how many times users ask for something.
- Model calls per request: 1 for a single answer, often 3 to 6 for an agent that uses tools.
- Input tokens per call: the prompt, the conversation so far, and any tool definitions. A few thousand is common.
- Output tokens per call: the reply. A few hundred for most answers.
Cutting the bill
Most of the cost is input that repeats on every call: the system prompt and the tool definitions. Prompt caching, offered by all three providers, charges far less for input it has seen recently. Sending only the tools a request needs, and routing simple requests to a small model, cut it further.
Frequently asked questions
How do I calculate the cost of an LLM API?
Multiply input tokens by the input price and output tokens by the output price, both per million tokens, and add them. Do that per model call, multiply by the calls each request makes, then by requests a month.
Why does an AI agent cost more per request than a chatbot?
Because one request is several model calls. The agent reads the request, calls a tool, reads the result and often calls another before it answers, and every call resends the conversation and the tool definitions as input.
How current are these prices?
They were read from each provider's own pricing page on the date shown, at the standard rate for short prompts. Batch, cached and long-context prices differ. Every price is editable, so you can enter a newer one.