AI API Cost Calculator (per token)

Choose a model, enter how many tokens each request sends and receives and how many requests you make, and get the cost per request and per month. Prices are the official standard rates per million tokens, with the date they were checked.

How it works

Cost per request = input tokens × input price + output tokens × output price, with prices per 1 million tokens. The monthly cost multiplies that by your requests per month.

If the provider offers batch processing at half price (OpenAI and Anthropic say so on their pricing pages), you can apply it. If you only know words, the calculator converts them with OpenAI’s rule of thumb: 1 token ≈ ¾ of a word in English.

Example

Example: 1,000 input tokens and 500 output tokens per request with a model priced at $2 input and $10 output per million tokens cost $0.002 + $0.005 = $0.007 per request, or $70 for 10,000 requests a month.

Sources

Official pricing pages: OpenAI, Anthropic and Google Gemini API. Token estimate: OpenAI Help Center: What are tokens and how to count them.

Frequently asked questions

Which prices does it use?

The standard rates published on the official pricing pages of OpenAI, Anthropic and Google on the date shown under the calculator. Some models have different rates for very long prompts, cached input or special processing modes; the notes under the calculator say which apply.

Are output tokens more expensive?

For the models listed, the official output price per token is higher than the input price, so long answers weigh more in the total.

Is the token estimate exact?

No. The words-to-tokens conversion is an estimate for English text from OpenAI’s documentation; other languages, such as Spanish, can use more tokens per word. Use the provider’s own token counter for exact figures.

← All free tools