LLM API Cost Calculator

Compare API costs across OpenAI, Anthropic, and Google. Enter your token usage to find the cheapest model.

Usage Assumptions

Input

Example: 1,000 tokens ≈ 750 words (approx. 1.5 pages of text).

Output
Reqs

Cost Comparison

Live
Calculating across 15+ models...
Share this tool:

LLM Pricing 101: How It Works

Understanding Large Language Model (LLM) pricing can be confusing with "tokens" and varying rates. Our calculator simplifies this by letting you compare real-world usage scenarios across top providers like OpenAI, Anthropic, and Google.

Whether you are building a chatbot, an analysis tool, or just curious, knowing the cost structure helps you make informed architectural decisions.

Input Tokens

This is what you send to the AI. It includes your system prompt, user instructions, and any context (like documents or code snippets). Input tokens are generally cheaper than output tokens.

Output Tokens

This is what the AI writes back. Generating text is computationally more expensive for the provider, so output tokens usually cost 3x to 4x more than input tokens.

Reasoning Models

Newer "thinking" models like OpenAI o1 or Claude Opus use "Chain of Thought" processing. They are significantly more expensive but offer higher accuracy for complex logic tasks.

Flash/Haiku Models

Models like GPT-4o mini and Gemini Flash are racing to zero cost. They are incredibly fast and cheap, perfect for high-volume tasks like summarization or classification.

Optimize Your API Spend

By mixing and matching models (e.g., using a cheaper model for initial filtering and a smart model for final drafting), you can reduce your monthly bill by up to 80%. Use this calculator to model those scenarios.

Frequently Asked Questions

A token is a piece of a word. Roughly, 1,000 tokens is about 750 words. The exact count varies by model tokenizer, but this rule of thumb works for cost estimation.
Yes, we update our database regularly from the official pricing pages of OpenAI, Anthropic, Google, and others. However, always check the provider's site for the absolute latest rates.
Reading text is easier for a computer than writing it. Therefore, "reading" your prompt (input) consumes less compute power than "generating" a response (output), making output tokens more expensive.
No, this calculator is for standard API inference only. Fine-tuned models typically carry a higher price per token for both training and inference.
OpenAI and Anthropic offer "Batch" API access (usually 24-hour turnaround) for a 50% discount. If your task isn't time-sensitive, use Batch mode to cut costs in half.
Currently, Gemini 1.5 Flash and DeepSeek V3 are among the cheapest reliable models. However, pricing wars are active, so check this calculator frequently for the latest comparisons.
If a typical book is ~100k words, 1 million tokens is roughly equal to 10 copies of "Harry Potter and the Sorcerer's Stone". It's a lot of text!

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools