AI API Cost Estimator

Estimate monthly LLM spend from request volume and token counts, compare model pricing, and see how caching or a smaller model changes the bill.

How it works

Cost per request = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate). Monthly = cost per request × requests × (1 − cache hit rate on input).

Worked example

50,000 requests a month with 2,000 input and 500 output tokens at $2.50/$10 per million costs about $500 — roughly half of it output tokens despite being a quarter of the volume.

Frequently asked questions

Why are output tokens so expensive?

Output is generated sequentially, one forward pass per token, while input is processed in parallel. Providers price that difference at roughly 3–5× the input rate.

What is the fastest way to cut LLM cost?

Prompt caching on long system prompts (often 50–90% off cached input), capping max output tokens, and routing easy requests to a smaller model. Together these typically halve the bill.

How many tokens is my text?

Roughly 0.75 words per token in English, so 1,000 tokens is about 750 words. Code, JSON and non-Latin scripts consume noticeably more tokens per character.