Before you ship an AI feature, know what it costs to run. Enter the model rates, tokens and volume — one call or a workflow of several — and this estimates the monthly bill, the cost per task and how many tasks fit your budget. Compare up to three setups and download the estimate.
Setup 1
Example figures
One step is enough for a single model call. Add steps when one task makes several calls, for example classify, then draft, then check.
A task is one thing a user asks for, such as one answered question.
Shows how many tasks fit in it at these rates.
Retries and prompt caching
Share of calls that fail or get regenerated and run once more at full cost.
Repeated prompt text a provider bills at a cache rate.
Check your provider’s price page; it differs per provider and model.
Estimated monthly cost
The three model tiers are illustrative round-number rates, not a quote from any provider. Type your provider’s live price per million tokens for an exact figure.
Free vs paid — when to upgrade
What this free tool is great for: a quick, one-off job with no signup — it runs in your browser and there's nothing to manage.
Its honest limit: it estimates from the rates and volumes you enter — it won't track your real usage, watch the bill climb as traffic grows, or help you actually build and optimise the feature behind it.
Where Dify does more: This estimates the API bill. Building the actual feature — chaining prompts, adding a knowledge base, shipping an agent — is the real work, and that's where Dify comes in: an open-source platform to build and run LLM apps and agents without wiring it all together yourself.
Picked from our review dossiers: who each tool suits, their problem in their words, and the plan that fits. “Try” buttons are affiliate links: we may earn a commission if you sign up, at no extra cost to you. It never changes our verdict.
Why AI bills blindside people
An AI feature feels free while you're prototyping — a few cents here and there. Then it ships, real traffic hits it, and the invoice arrives. The jump isn't a mystery once you see the maths: your cost is simply tokens times price times volume, and all three quietly scale together as you grow.
The three levers
Only three things move your bill: the tokens you send (your prompt, context and any retrieved documents), the tokens the model generates (the answer), and how many requests you run. Fatten any one — a bigger system prompt, a chattier model, more users — and the cost rises in lockstep. The calculator above lets you flex each so you can see which one is actually driving your number.
Output is the expensive half
Here's the part most teams miss: providers typically charge several times more for output tokens than for input tokens. A long, rambling answer costs more than a long, detailed question. That's why the tool shows what share of each request is output — if it's most of your cost, the highest-leverage fix isn't a cheaper model, it's a shorter, more constrained answer.
Five honest ways to cut the bill
Cap the output. Set a max length and ask for concise answers; you lose less quality than you'd expect. Right-size the model. Reserve the frontier model for the hard 20% and route the rest to a smaller, cheaper one. Cache and retrieve. Don't re-prompt for things you already computed; store results and pull in context instead of stuffing everything into every call. Trim the prompt. Long system prompts and bloated context get paid for on every single request. Batch where you can. Many providers price batched or off-peak work lower.
Estimate first, then build
Knowing the unit economics before you ship spares you the nasty surprise later. Once the numbers work, the actual build — chaining prompts, adding a knowledge base, turning it into an agent — is a separate job. A platform like Dify handles that plumbing, so you're not wiring orchestration, retrieval and deployment together by hand.
Where AI bills actually explode: agents and retries
Simple chat features rarely break budgets; agentic patterns do. An agent that reasons in steps, calls tools, reads results and iterates can spend ten to fifty model calls on one user request — each carrying the full system prompt and growing history. Add automatic retries on failures, self-correction loops ("check your work"), and parallel tool calls, and a single button-press fans out into hundreds of thousands of tokens. Before shipping anything agentic, estimate cost per *task*, not per call: trace one representative task, count its calls and tokens end-to-end, multiply by realistic volume.
Teams that skip this step meet their architecture for the first time on an invoice.
The optimisation ladder, in order of leverage
Cut AI costs in this sequence. First, output caps — output tokens cost several times input and models ramble by default; tight max-tokens plus "be concise" instructions is free money. Second, model routing — classify requests and send the easy 80% to a model a tenth the price, reserving the frontier model for the hard 20% (we run exactly this: a premium model for articles, a budget one for translations).
Third, prompt caching — providers discount repeated prompt prefixes steeply, so structure prompts with the static parts first and the caching often just happens. Fourth, retrieval discipline: send the three relevant chunks, not the whole document. Batching and off-peak processing come last — real savings, but only after the big four.
Budget the failures too
Estimates based on the happy path miss the tokens reality burns. Malformed outputs trigger retries at full price. Validation failures loop. Users rephrase when answers disappoint — same question, double spend. Timeouts on long generations bill for output you throw away. A production system's real cost per successful outcome runs meaningfully above its per-request estimate — how far above depends on your error handling, so add an explicit failure-and-retry allowance (20-40% is a sane starting band) and then measure your actual overhead once live.
The calculator above prices the requests you intend; production also pays for the ones you didn't.
Unit economics or it didn't happen
The only AI cost number that ultimately matters is cost per unit of business value: per active user per month, per document processed, per resolved ticket. Compute it early — even roughly — because it decides pricing and packaging while you can still change them. If serving a power user costs €4/month in tokens under a €10 flat plan, your heaviest fans are your worst customers by construction; that's how usage caps, tiered plans and credit systems get discovered *after* launch instead of designed before it.
Set a per-user cost alert from day one; the distribution of usage is always more skewed than anyone expects, and the tail is where margins go to die.
Frequently asked questions
How accurate is this AI cost estimate?
It's exact for the rates and volume you enter — the maths is simply tokens times price. The one variable is the token price, which changes and differs per provider, so the model presets are illustrative and every rate field is editable. Enter your provider's live price for a precise figure.
Why are input and output priced differently?
Providers charge more for tokens the model generates (output) than for tokens you send (input), often several times more. That's why this tool splits the two and shows what share of your cost is output — usually the bigger lever.
Does anything I type get sent anywhere?
No. The calculation runs entirely in your browser; nothing is uploaded, stored or logged, and there's no signup.
The pricing behind our reviews is published as an open dataset, with the sentence behind every cost-trap flag and the date it was researched. Free to use with attribution (CC BY 4.0).
Embed this tool on your site
Blogger, teacher or toolmaker? Put this calculator on your own page — free forever, no strings. Copy the snippet below (the credit link is appreciated and keeps the tool free):
The credit link in the snippet points to this tool’s page on AIBuilder Marketplace, our own site. It is not an affiliate link.
This tool is free and runs entirely in your browser.
One honest email, only when there is something worth sending
New dossiers, cost-traps we found, and tools that earned a keep — no hype, no sponsored-disguised-as-advice. Unsubscribe anytime.