LLM API Cost Calculator

Enter your usage profile and instantly compare what every major LLM provider would charge — per request and per month. The default scenario below is real, server-rendered output; change any field to recalculate live.

Quick scenarios

Tip: you can type 4k, 100k or 1.5m.

Advanced options

Estimated cost — per month

Shown in USD. Pricing last verified 2026-06-19.

API price = the provider's list price per 1M tokens (input → output). Your cost = estimate for the usage profile you set on the left (4,000 in + 1,000 out per request).

Showing 22 of 22 models.

Show:

Tip: click a column header to sort, or filter by category above. Sorted by cost per request by default.

Provider / Model Context API price / 1M in → out Your cost / request Your cost / month Links
Google Gemma 3 4B fast cheapest batch 131K $0.0500 $0.1000 $0.000300 $0.3000 Visit
Google Gemma 3 12B fast batch 131K $0.0500 $0.1500 $0.000350 ×1.2 $0.3500 Visit
Google Gemma 3n 4B fast batch 33K $0.0600 $0.1200 $0.000360 ×1.2 $0.3600 Visit
Google Gemma 3 27B fast batch 131K $0.0800 $0.1600 $0.000480 ×1.6 $0.4800 Visit
Google Gemma 4 26B A4B fast batch 262K $0.0600 $0.3300 $0.000570 ×1.9 $0.5700 Visit
Google Gemini 2.5 Flash Lite Preview 09-2025 fast cache batch 1M $0.1000 $0.4000 $0.000800 ×2.7 $0.8000 Visit
Google Gemini 2.5 Flash Lite fast cache batch 1M $0.1000 $0.4000 $0.000800 ×2.7 $0.8000 Visit
Google Gemma 4 31B fast cache batch 262K $0.1200 $0.3500 $0.000830 ×2.8 $0.8300 Visit
Google Gemini 3.1 Flash Lite fast cache batch 1M $0.2500 $1.50 $0.002500 ×8.3 $2.50 Visit
Google Gemini 3.1 Flash Lite Preview fast cache batch 1M $0.2500 $1.50 $0.002500 ×8.3 $2.50 Visit
Google Gemma 2 27B fast batch 8K $0.6500 $0.6500 $0.003250 ×10.8 $3.25 Visit
Google Nano Banana (Gemini 2.5 Flash Image) fast cache batch 33K $0.3000 $2.50 $0.003700 ×12.3 $3.70 Visit
Google Gemini 2.5 Flash fast cache batch 1M $0.3000 $2.50 $0.003700 ×12.3 $3.70 Visit
Google Nano Banana 2 (Gemini 3.1 Flash Image Preview) fast batch 131K $0.5000 $3.00 $0.005000 ×16.7 $5.00 Visit
Google Gemini 3 Flash Preview fast cache batch 1M $0.5000 $3.00 $0.005000 ×16.7 $5.00 Visit
Google Gemini 2.5 Pro balanced cache batch 1M $1.25 $10.00 $0.0150 ×50.0 $15.00 Visit
Google Gemini 2.5 Pro Preview 06-05 balanced cache batch 1M $1.25 $10.00 $0.0150 ×50.0 $15.00 Visit
Google Gemini 2.5 Pro Preview 05-06 balanced cache batch 1M $1.25 $10.00 $0.0150 ×50.0 $15.00 Visit
Google Gemini 3.5 Flash balanced cache batch 1M $1.50 $9.00 $0.0150 ×50.0 $15.00 Visit
Google Gemini 3.1 Pro Preview Custom Tools balanced cache batch 1M $2.00 $12.00 $0.0200 ×66.7 $20.00 Visit
Google Gemini 3.1 Pro Preview balanced cache batch 1M $2.00 $12.00 $0.0200 ×66.7 $20.00 Visit
Google Nano Banana Pro (Gemini 3 Pro Image Preview) balanced cache batch 66K $2.00 $12.00 $0.0200 ×66.7 $20.00 Visit

Estimates only. Actual bills depend on exact token counts, tier pricing and provider changes. Always confirm on the provider's pricing page.

How LLM API pricing works

Every major LLM provider bills by the token — a chunk of text roughly ¾ of a word in English. You pay separately for input tokens (everything you send: system prompt, retrieved context and the user message) and output tokens (what the model writes back). Output is typically priced two to five times higher than input, which is why concise responses save real money at scale.

The formula

cost_per_request = (input_tokens  / 1,000,000) × input_price_per_M
                 + (output_tokens / 1,000,000) × output_price_per_M
cost_per_period  = cost_per_request × requests_in_period

What moves the number

Frequently asked questions

How are LLM API costs calculated?

Providers bill per million tokens, separately for input (your prompt) and output (the model's response). Cost per request = (input tokens / 1,000,000 × input price) + (output tokens / 1,000,000 × output price). Multiply by your request volume for the period.

What is the difference between input and output tokens?

Input tokens are everything you send to the model — system prompt, context and user message. Output tokens are what the model generates. Output is usually priced several times higher than input, so response length matters a lot for cost.

Does prompt caching reduce cost?

Yes, where supported. Repeated prompt prefixes (e.g. a long system prompt) can be billed at a steep discount. The calculator lets you set what share of input tokens are cached.

Why do prices vary so much between providers?

Model size, hardware efficiency, context window, and business strategy all play a part. Frontier reasoning models cost the most; fast/cheap and open-weight self-hosted options can be orders of magnitude cheaper for suitable tasks.