AI API Budget Calculator
Token math is for engineers; budgets are set in users and requests. This calculator starts from the numbers a product team actually has — active users, requests per user, tokens per request — and turns them into a monthly API spend and a cost per user you can hold against your pricing.
AI API budget calculator
Averages hide skew: conversation history, retries and growing system prompts inflate real token counts. Add 30–50% headroom before you commit to a price point. † Anthropic's newest models include the ~30% tokenizer correction.
The budget formula
requests/month = active users × requests per user per monthinput tokens/month = requests/month × input tokens per requestoutput tokens/month = requests/month × output tokens per requestmonthly cost = (input tokens × input price + output tokens × output price) ÷ 1,000,000
Worked example. A SaaS support assistant with 1,000 active users making 20 requests a month each: 20,000 requests. At 1,200 input tokens per request (system prompt + short history + question) and 300 output tokens, that's 24M input and 6M output tokens a month. On GPT-5.4 Mini: 24 × $0.75 + 6 × $4.50 = $18.00 + $27.00 = $45.00 a month — 4.5 cents per active user.
Three example budgets
| Scenario | Users × req/user/mo | Tokens in / out | Model | Monthly cost | Per user |
|---|---|---|---|---|---|
| SaaS support assistant | 1,000 × 20 | 1,200 / 300 | GPT-5.4 Mini | $45.00 | $0.045 |
| Internal employee copilot | 200 × 150 | 2,000 / 500 | Claude Sonnet 5 † | $351.00 | $1.76 |
| AI writing app | 5,000 × 30 | 500 / 1,500 | Gemini 3.5 Flash | $2,137.50 | $0.43 |
Each scenario is expensive for a different reason. The copilot has few users but heavy per-user usage on a mid-premium model — at $1.76 per employee it's trivially justified against a salary, but the same pattern on a $10/month consumer product would eat 18% of revenue. The writing app is output-heavy: 1,500 output tokens per request means the $9.00 output rate drives about 95% of its bill, so output price — not input price — should pick its model. The support assistant is the cheap default most products start from. († Claude Sonnet 5 figures include the ~30% tokenizer correction: 60M nominal input tokens bill as 78M.)
Budgeting rules that survive production
- Budget the distribution, not the average. A small share of power users typically drives most tokens. Cap per-user usage on cheap tiers, or price the heavy tail explicitly.
- Add 30–50% headroom for hidden tokens. History, retries and prompt growth all bill — the usage estimation guide catalogues the usual suspects.
- Check unit economics per user, not total spend. $2,137.50 a month sounds scary; $0.43 per user against a $12 subscription is a rounding error. The per-user number is the one that scales with growth.
- Route by task, not by brand. Send the routine 90% of requests to a budget model and reserve premium models for the hard cases — the pricing comparison shows the 20× spread you're arbitraging.
- Re-run the numbers at 10× users before setting prices. Linear token costs meet non-linear revenue curves; what's viable at 1,000 users may not be at 10,000 on a free tier.
If your feature includes retrieval, budget the context tokens with the RAG Cost Calculator — retrieved chunks usually dwarf the user's own prompt.
Frequently asked questions
Related tools and guides
- LLM Token Cost Calculator — the same spend against every model and self-hosting
- How to estimate your monthly LLM token usage — where the tokens-per-request numbers come from
- Tokens to Words Converter — sanity-check token counts against real text
- LLM Pricing Comparison — pick the model tier before you budget it