AI API Budget Calculator
Set a monthly API budget and see how many calls you can make. Or enter your usage and see the bill. Works for GPT-4o, Claude, Gemini, and any LLM with per-token pricing.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
This calculator works in two modes. Budget mode starts with your spending allowance and tells you how many API calls that budget permits given your typical prompt and output length. Usage mode starts with your call volume and shows you the projected monthly bill.
Both modes use the same core formula: cost per call = (input tokens / 1M × input rate) + (output tokens / 1M × output rate). Tokens are estimated at 0.75 words per token.
When To Use This
Right tool, right situation
Use this before starting a new AI feature to establish your budget envelope. Use it when your bill unexpectedly spikes to diagnose which variable changed. Use it when evaluating whether to migrate to a cheaper model as volume scales.
Set real spending limits in your provider dashboard alongside using this calculator — a runaway loop or prompt injection can generate unlimited tokens without a hard cap.
Common Mistakes
Why results sometimes look wrong
Not budgeting for system prompts separately. System prompts repeat on every call. Budget as if your system prompt length adds to every single input.
Using "average" prompt length without variance. If some calls have 100-word prompts and others have 5,000-word RAG contexts, your average is misleading. Track p50 and p95 separately.
Forgetting that context window fills up in multi-turn chats. A 20-turn conversation with 100 words per turn sends 1,900 words of history as context on turn 20 alone.
The Math
Worked examples and deeper derivation
Cost per call = [(input_words / 0.75) / 1,000,000 × input_price_per_MTok] + [(output_words / 0.75) / 1,000,000 × output_price_per_MTok]
Calls affordable = monthly_budget / cost_per_call
Monthly bill = cost_per_call × calls_per_day × 30
The ratio of input to output token cost is typically 1:4 to 1:5. If your use case generates long outputs (essays, code), output cost dominates. If outputs are short (classifications, yes/no), input cost dominates.
Common questions
Need something this doesn't cover?
Suggest a tool — we'll build it →