Home / Dev & AI / AI & LLM Cost / AI API Cost Calculator

AI & LLM Cost

AI API Cost Calculator

Work out what your AI API will really cost each month. Pick a model (ChatGPT, Claude, Gemini, DeepSeek and more), enter your request volume and token sizes, and see the monthly bill plus how every popular 2026 model compares on the same workload.

Estimated monthly cost

$0

Cost per request
Cost per 1,000 requests
Input token cost
Output token cost
Tokens processed / month
Annual estimate

Input vs output token spend

Output tokens usually cost several times more than input, so answer length is what really drives your bill.

The same workload priced across AI models

Your monthly token volume run through popular 2026 models, cheapest first.

What the AI API Cost Calculator does

An AI API cost calculator turns the way large language models actually bill, per token, into a monthly dollar figure you can plan around. Every request you send has two priced parts: the input tokens (your prompt plus any context you attach) and the output tokens the model writes back. You are charged a separate per million token rate for each, and output is almost always the pricier side.

This tool multiplies your monthly request count by the tokens per request, splits that into input and output, and applies the live 2026 rate for the model you choose. Because it prices the very same workload across GPT-5, Claude, Gemini, DeepSeek, Grok and Llama, you can see in one glance whether switching models would cut your bill in half or barely move it.

Heads up on pricing. The rates built into this tool are public list estimates for July 2026 and can change without notice. Providers also offer batch discounts, prompt caching and volume tiers that lower real costs, so treat the output as a planning estimate, not a quote.

The formula

monthly input tokens = requests × input tokens per request
monthly output tokens = requests × output tokens per request
cost = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate)

Worked example

Say you send 100,000 requests a month, each with 1,000 input tokens and 500 output tokens, on GPT-5. That is 100M input tokens and 50M output tokens. Input costs 100 × $1.25 = $125 and output costs 50 × $10 = $500, so your AI API bill lands near $625 a month. Move the same traffic to Gemini 2.5 Flash and it drops to roughly $67.50.

AI model pricing used in this calculator (July 2026 estimates)

ModelProviderInput / 1M tokensOutput / 1M tokens
GPT-5OpenAI$1.25$10.00
GPT-5 miniOpenAI$0.25$2.00
Claude Opus 4.1Anthropic$15.00$75.00
Claude Sonnet 4.5Anthropic$3.00$15.00
Claude Haiku 4.5Anthropic$1.00$5.00
Gemini 2.5 ProGoogle$1.25$10.00
Gemini 2.5 FlashGoogle$0.30$2.50
DeepSeek V3DeepSeek$0.27$1.10
Grok 4xAI$3.00$15.00
Llama 4 MaverickMeta$0.20$0.60

Prices are public list estimates for planning as of July 2026 and change often. Providers bill per token, where roughly 1,000 tokens equals about 750 words. Always confirm live rates on the provider pricing page before you set a budget.

Ways to lower your AI costs

Frequently asked questions

How much does an AI API cost in 2026?

It depends entirely on tokens and the model. Budget models like Gemini 2.5 Flash or DeepSeek V3 run well under $1 per million input tokens, while premium models like Claude Opus 4.1 reach $15 input and $75 output per million. Enter your real usage above for a figure tailored to your app.

What is a token?

A token is a chunk of text the model reads or writes, usually about four characters or three quarters of a word in English. Roughly 1,000 tokens is 750 words, so a typical page of text is around 500 tokens.

Why is output more expensive than input?

Generating text takes far more computation than reading it, so providers charge several times more per output token. That is why trimming response length is often the fastest way to cut an AI bill.

Can I lower my AI API bill?

Yes. Use a smaller model for easy requests, cache repeated context, shorten prompts and system messages, cap the maximum output length, and batch non-urgent jobs where the provider offers a discount.

Are these prices exact?

They are July 2026 list estimates for planning. Real invoices vary with caching, batch pricing, volume commitments and taxes, so always confirm the live rate before you commit spend.

Related calculators