LLM API cost calculator
Enter your model's current per-token prices (from your provider's pricing page), your traffic and your average prompt size. You get the monthly bill and the day it crosses your budget. Works for any model, including agents that loop.
Prices change often. Copy them from your provider's pricing page.
—
estimated per month (30.4 days)
Estimate tokens from text
Paste a typical prompt to estimate its size. Rule of thumb for English: about 4 characters per token. Code and non-English text usually use more tokens, so treat this as a floor.
Why AI bills run away
- Agent loops multiply everything. One user request that triggers 8 model calls costs 8×. Set "LLM calls per request" honestly.
- Context grows each turn. Chat apps resend the whole history, so average input tokens climb as conversations get longer.
- Output is usually the expensive side, often several times the input price per token. Capping max output tokens is the cheapest fix.
- Leaked keys. A key in a public repo can burn a month's budget overnight. Set a hard cap on the provider dashboard. If one leaked, see what to do in the first 10 minutes.