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, such as chat assistant, RAG, agent, copilot, summarizer, or classifier. Then you 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. That way I can compare models fairly and see the cost before getting the invoice.
What it does
Every workload preset comes with editable default assumptions for DAU, calls per user per day, input and output tokens per call, and cache hit rate.
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 for the cheapest overall, the best-value workhorse, and the cheapest flagship, including 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, with no subscription or tiers.
How I built it
I kept this one deliberately simple. Astro generates the static pages, Alpine.js handles the calculator reactivity, and Tailwind handles the styling. I use Alpine whenever React would be overkill, and a calculator is exactly that case.
The cost engine is a set of small pure TypeScript functions with Vitest coverage. Pricing data lives in one file, presets in another, and the 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.
Want me to talk about your product? You can sponsor this site.