AI / LLM API Cost Calculator

Estimate your monthly and annual costs for AI API usage. Enter your token usage per request and the model's pricing to project your spend across GPT, Claude, Gemini, and other large language models.

Ad Placeholder — calcAbove
🤖

AI / LLM Cost Calculator

ai-cost calculator

$
$
Ad Placeholder — calcBelow

How It Works

LLM providers charge per token (roughly 0.75 words per token), with separate rates for input (prompt) and output (completion) tokens. This calculator multiplies your per-request token usage by the model rates, then scales to your monthly request volume.

Formula

Cost/Request = (Input Tokens/1M × Input Price) + (Output Tokens/1M × Output Price)
Monthly = Cost/Request × Requests
Ad Placeholder — calcAfterExplanation

Examples

10K requests, 1K in / 500 out, Sonnet pricing

About $105 per month.

Frequently Asked Questions

What is a token?

A token is a chunk of text an AI model processes — roughly 4 characters or 0.75 words in English. "Hello world" is about 2-3 tokens. Both your input and the model's output count toward billing.

Ad Placeholder — calcMidFaq

Why are input and output priced differently?

Generating output is more computationally expensive than reading input, so output tokens usually cost 3-5× more. For example, Claude Sonnet charges $3/1M input but $15/1M output tokens.

How can I reduce AI API costs?

Use prompt caching for repeated context, choose smaller models for simple tasks, trim unnecessary prompt text, set max output limits, and batch requests where possible.

Related Calculators

Ad Placeholder — calcMobileAnchor