LLM Price Calculator
Compare LLM API pricing across Claude, GPT, Gemini, and GLM. Calculate per-call costs, set budgets, and estimate multi-turn chain costs with prompt caching.
What this calculator does
This calculator compares API pricing across 30+ large language models from Anthropic, OpenAI, Google, and Zhipu AI. It covers input tokens, output tokens, prompt caching discounts, and reasoning token costs - all the variables that affect your actual bill.
There are three modes. Calculate cost shows per-call and total costs for a given workload, with presets for common scenarios. Set budget flips the question - enter a dollar amount and see how many API calls each model can handle. Chain models multi-turn conversations where context accumulates. All settings are saved in the URL for bookmarking and sharing.
How LLM API pricing works
LLM APIs charge per token - roughly 0.75 English words each. Type something below to see tokens in action.
Input vs. output cost
Input and output tokens are priced separately. Output typically costs 3-5x more - a task generating long responses is significantly more expensive than one processing long inputs.
Prompt caching
If your application sends the same prefix on every call (system prompts, few-shot examples), caching lets you reuse it at 75-90% off. It's the single biggest cost lever for most applications.
Based on 4K input tokens per call. Cached tokens use each provider's discounted rate.
Multi-turn conversations
Each API call sends the full conversation history as input, so costs grow with every turn. This is why a 10-turn conversation costs more than 10 independent calls.
Pricing is pulled from OpenRouter across 30+ models from Anthropic, OpenAI, Google, and Zhipu AI, and updated regularly. All calculator settings save to the URL - bookmark a comparison or share it with your team.