← All Tools

LLM API Cost Calculator — GPT-4o vs Claude vs Gemini Pricing

Compare LLM API pricing across GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, Llama 3, and Mistral. Enter prompt and completion token counts to see cost per request, per 1K, and per 1M requests side by side.

Free, no sign-up — one of the SaaSQuickStart AI / LLM tools.

How it works

Each LLM provider charges separately for input tokens (your prompt) and output tokens (the model's response). This calculator multiplies your token counts by each model's per-token rate to give you the exact cost per API call. Scale that up to 1,000 or 1,000,000 requests to see your projected monthly bill at different usage volumes. All prices are in USD per million tokens — the industry-standard unit.

Frequently asked questions

Why do different models have such different prices?

Larger, more capable models require more GPU compute per token, which raises the cost. Smaller models like GPT-4o mini and Gemini 1.5 Flash are heavily optimized for speed and cost at the expense of some reasoning capability. Anthropic and OpenAI also price based on market positioning and the value their models deliver, not just raw compute cost.

What exactly is a "token"?

A token is roughly 3–4 characters of English text — about ¾ of a word on average. "Hello world" is 2 tokens. A 1,000-word article is roughly 750–1,000 tokens. Code and non-English text often use more tokens per character than English prose.

How can I reduce my API costs?

The biggest levers are: (1) trim your system prompt and remove redundant context from each request, (2) use a smaller model for simple classification/extraction tasks and only route complex reasoning to GPT-4o or Claude 3.5 Sonnet, (3) implement prompt caching (supported by Anthropic and OpenAI) so repeated context is only charged once, and (4) batch non-latency-sensitive requests.

What is the difference between input and output token pricing?

Input tokens are what you send to the model — your system prompt, conversation history, and the user's message. Output tokens are what the model generates back. Output tokens cost 3–5× more per token than input tokens because generation requires more sequential GPU compute than processing the input in parallel. Keep your system prompts short and instruct the model to be concise to reduce costs on both sides.

All free tools · SaaSQuickStart