Home›Tools›LLM API Cost Calculator
Free AI Tool — No Signup Required

Free LLM API Cost Calculator

Estimate what your OpenAI, Claude or Gemini API usage really costs — per request, per month and per year. Compare model pricing side by side and find the cheapest model for your workload.

Updated September 2026Built & reviewed by Devlet's AI team
0
models across 3 providers
0%
free — no signup, no limits
0
data leaves your browser
LLM / AI API Cost Calculator
Input $/1M
Output $/1M
Advanced — caching & batch
Estimated monthly cost
$0.00
$0Per request
$0Per day
$0Per year
Input $0Output $0
✓ Copied!

Same workload across every model

Monthly cost for your token & request numbers above, cheapest first. The green row is your best-value option.

ModelInput $/1MOutput $/1MMonthly cost

Estimates only. Token counts are approximate (~4 characters per token); actual tokenization varies by model. Rates verified September 2026 — always confirm current pricing on each provider's official page before budgeting.

Key takeaways

  • LLM APIs bill per token, split into input (what you send) and output (what the model writes) — output usually costs 4–6× more.
  • Rates are quoted per 1 million tokens; one token is roughly 4 characters or ¾ of a word.
  • The biggest lever on your bill is model choice — routing routine work to a cheaper model can cut costs 5–20×.
  • Prompt caching (≈10% of input cost) and the Batch API (50% off) cut real bills further.
How it works

How the LLM API cost calculator works

Turn confusing per-token pricing into a straight monthly figure in four steps — then see which model is cheapest for your workload.

01

Pick a model

Choose OpenAI, Claude or Gemini — the current input and output rates fill in automatically (and stay editable).

02

Enter your tokens

Type your input and output tokens per request, or paste a sample prompt and reply to estimate them live.

03

See your cost

Get per-request, daily, monthly and yearly figures instantly, with an input-vs-output split so you know what's driving the bill.

04

Compare & optimize

The table ranks every model cheapest-first for your workload — and caching and batch options show your real savings.

AI API pricing calculator

What is an LLM API cost calculator?

An LLM API cost calculator turns the confusing per-million-token pricing of OpenAI, Anthropic and Google into a straight answer: what will this actually cost me per request, per month and per year? Enter your model, your typical input and output tokens, and your monthly request volume, and it works out your real bill — then compares every model so you can see which one is cheapest for your workload.

It's the fastest way to sanity-check an AI feature's running cost before you ship it — and to catch the model choice that quietly doubles your invoice.

  • Estimate cost across OpenAI, Claude and Gemini in one place
  • See the exact model that's cheapest for your usage
  • Model caching and batch savings before you build
Token pricing

How LLM API pricing works

Every major provider bills the same way: per token, with a lower rate for input tokens (your prompt, system message and context) and a higher rate for output tokens (the model's reply). Rates are published per million tokens — so a model at "$2 / $10" charges $2 per million input and $10 per million output.

Two things surprise most teams. First, output dominates: because output runs several times the input rate, long responses cost far more than long prompts. Second, tokens aren't words — a token is about four characters, so a 750-word answer is roughly 1,000 tokens. The calculator estimates tokens from any text you paste so you don't have to guess.


Cost optimization

How to reduce your LLM API costs

If the monthly figure made you wince, here's where the savings actually are — in order of impact.

1. Route to the right model

The biggest lever by far. You don't need a flagship model for classification, tagging or short summaries — a cheaper tier does the job at a fraction of the cost. Reserve the expensive models for work that genuinely needs deep reasoning. The comparison table above shows the gap for your own numbers.

2. Cache repeated context

If every request reuses the same system prompt or document, prompt caching bills those repeated tokens at roughly 10% of the input rate. For a support bot with a big fixed prompt, that alone can halve the bill.

3. Batch what isn't urgent

Asynchronous jobs — bulk classification, content generation, data enrichment — can run through the Batch API at 50% off both input and output. Toggle it in the advanced options to see the effect.

4. Trim prompts and cap output

Shorter system prompts and a sensible max-output limit stop you paying for tokens you never needed. Since output is the expensive side, capping response length is one of the fastest wins.

Want it handled in production? Devlet's AI integration team builds AI features with model routing, caching and cost controls baked in — and works with custom AI models too.

Plain-English glossary

LLM pricing terms, explained simply

The vocabulary behind your API bill, without the jargon.

Token
The unit LLMs bill by — roughly 4 characters of English, or about ¾ of a word. 1,000 tokens ≈ 750 words.
Input vs output
Input is what you send (prompt + context); output is what the model writes back. Output usually costs 4–6× more per token.
Per 1M tokens
How rates are quoted. A model at $2 / $10 charges $2 per million input tokens, $10 per million output.
Prompt caching
Reusing a fixed prompt or document so repeated tokens bill at ~10% of the input rate on a cache hit.
Batch API
Running non-urgent jobs asynchronously for 50% off input and output on every major provider.
Context window
The maximum tokens a model can consider at once. Very long prompts can trigger higher long-context pricing.
FAQ

LLM API cost calculator — FAQ

Everything you need to know about estimating and cutting your OpenAI, Claude and Gemini API costs.

Multiply your input tokens by the model's input rate and your output tokens by the output rate (both per million tokens), add them for the per-request cost, then multiply by your monthly request volume. The calculator above does this and converts it to per-request, daily, monthly and yearly figures automatically.
It depends on the model. As of September 2026, OpenAI's range runs from about $0.05 per million input tokens on the smallest models up to $10 / $50 per million on the GPT-6 Astra flagship, with the GPT-5.6 family in between. Enter your token counts above to see your specific cost.
As of September 2026, Claude API pricing runs from $1 / $5 per million tokens on Haiku 4.5 up to $10 / $50 on Fable 5.1, with Sonnet 5 at $2 / $10 and Opus 5 at $5 / $25. Batch processing halves these and prompt caching cuts repeated input to about 10%.
Input tokens are everything you send the model — your prompt, system message and context. Output tokens are what the model generates back. Output almost always costs more per token (often 4–6×), so long responses drive your bill more than long prompts.
A token is roughly four characters of English text, or about ¾ of a word — so 1,000 tokens is around 750 words. Exact counts vary by each model's tokenizer, so treat token estimates (including this tool's) as close approximations, not exact figures.
Route routine tasks to cheaper models, cache reused context (about 10% of input cost on a hit), run non-urgent jobs through the Batch API (50% off), and trim prompts and cap output length. Model choice is by far the biggest lever.
Who it's for

Who uses the LLM cost calculator

Founders & developers

Sanity-check the running cost of an AI feature before you ship, and pick the model that hits your budget.

AI product teams

Model per-request economics at scale and forecast spend as usage grows, before it hits the invoice.

Agencies & consultants

Quote AI builds accurately and show clients exactly what running the model will cost each month.

Go deeper

Further reading & related tools

Building an AI feature and worried about the bill?

We design AI integrations that stay fast and affordable at scale — the right model, caching and cost controls built in from day one.

Talk to Devlet's AI team →

Call Us

+1 214 716 8032

Email Us

info@devlet
marketing.com

Location

1409 Anchor Dr, Wylie, TX 75098, UNITED STATES

Get Your Free SEO Audit

Enter your details and we’ll send you a complete website audit report.