Skip to main content
Back to tools

AI Cost Calculator

Estimate API costs for Claude, GPT-4o, Gemini and other LLMs

About AI Cost Calculator

Calculates the cost of an LLM API request from the input and output token counts you enter, using per-million-token list prices for models from Anthropic, OpenAI and Google. Set the number of API calls to project a batch or monthly total, and compare all rates in the built-in price table. The prices are fixed in the page and may lag behind provider changes.

Category: AI Tools.

Frequently asked questions

Where do the prices come from?

▾

They're list prices per million tokens for standard, pay-as-you-go text requests, stored in the page itself. Nothing is fetched live, so they can fall behind when providers change prices or release new models; always check the provider's pricing page before budgeting production workloads.

What's the difference between input and output token pricing?

▾

Most providers charge more for output tokens than input tokens. Input tokens are your prompt; output tokens are the model's response. The ratio varies by model.

Does the estimate include prompt caching, batch discounts or thinking tokens?

▾

No. It multiplies your token counts by the standard input and output rates, so it ignores cached-input discounts, batch API discounts and the higher rates some providers charge for very long prompts. If a model uses extended thinking or reasoning, those tokens are billed as output, so add them to the output figure.

How do I know how many tokens to enter?

▾

The calculator doesn't count tokens for you. Use the usage figures your API responses report, or paste your prompt into the LLM Context Window Checker for a rough estimate; as a rule of thumb, a token is about four characters of English text, and code or other languages need more.

Related tools