inferencecost.dev: what will AI inference cost you at 10k users?
By Flavio Copes
I built inferencecost.dev, a calculator for the biggest line item in AI product budgets: LLM inference. Compare ~30 models under your workload assumptions.
Another project from my Summer of Code: inferencecost.dev.
It answers one question: what will AI inference cost you at scale?
You pick a workload preset — chat assistant, RAG, agent, copilot, summarizer, classifier — tune the assumptions, and compare the monthly bill across ~30 models from OpenAI, Anthropic, Google, xAI, Mistral, OpenRouter, and Cloudflare Workers AI.
Why I built it
If you’re building an AI product, inference is the line item that dominates your budget. And it’s surprisingly hard to predict.
Model pricing pages give you dollars per million tokens. But your bill depends on things pricing pages don’t show: how many calls a user makes per day, how many tokens go in and out of each call, how much of your input gets cache hits.
Multiply wrong by 10,000 users and the difference is “a rounding error” versus “we need to raise prices”.
I wanted a calculator where the assumptions are explicit, editable, and applied consistently across every model — so the comparison is fair and the surprise happens in the calculator, not on the invoice.
What it does
Every workload preset comes with credible default assumptions: DAU, calls per user per day, input and output tokens per call, cache hit rate. Every value is editable.
From there you get:
- a live monthly bill, broken down into input, cached input, and output costs, with per-user and per-call numbers
- model suggestions: the cheapest overall, the best-value workhorse, the cheapest flagship — with the savings vs your current pick
- a cost-at-scale table at 100 / 1k / 10k / 100k DAU
- a full comparison of every model under the same assumptions
All calculator state lives in the URL, so you can share a scenario with a link. There’s a pricing reference with the verification date of every price, and a methodology page that explains the math.
There’s also a paid option: a $20 one-time AI-generated report that analyzes your specific scenario in depth. No subscription, no tiers.
How I built it
This one is deliberately simple.
Astro static pages with Alpine.js for the calculator reactivity — I use Alpine whenever React would be overkill, and a calculator is exactly that case. Tailwind for styling.
The cost engine is a set of small pure TypeScript functions with Vitest coverage — pricing data lives in one file, presets in another, math in a third. The dynamic OG image endpoint reuses the same engine, so the numbers in a shared preview card are the real numbers.
It’s deployed on Cloudflare Workers, with D1 storing first-party analytics events and price-watch email subscribers, and KV supporting the API endpoints. The paid report runs through Cloudflare AI Gateway with billing on Polar.
Try it
Head to inferencecost.dev, pick the preset closest to what you’re building, and put in your real numbers.
And if you just want a quick token math helper, the core calculator also lives here as a free tool, alongside the token cost comparison tool.
Related posts about news: