Home / Free tools / LLM token and cost estimator
LLM token and monthly cost estimator for agents and prompts
Paste a prompt, or enter token counts, add your model's price per million tokens, and see cost per run, per day and per month. It models cached input and context that grows over a multi-step run, which is where agent bills actually come from.
How to use it
- Estimate or enter tokens. Paste the prompt to get a rough count, or type the input and output token counts from your provider's usage logs.
- Describe the run. How many model calls per run and how much context each step adds to later steps.
- Enter your prices. Copy your model's current prices per million tokens; the defaults are placeholders.
- Read per-run, per-day and per-month cost. Then change one input at a time to see which lever matters.
Why agent costs surprise people
A chat message is one call. An agent run is many: each step sends the instructions, the history and the tool results so far, then adds more. Because every later step re-sends everything before it, input tokens grow roughly with the square of the number of steps unless something trims the history. A twelve-step run that adds 1,500 tokens per step sends about 100,000 or more input tokens in total, even though no single message looks large. The estimator makes that visible with the context-growth field.
Levers that actually reduce cost
- Keep stable text first. Providers that cache repeated prefixes only discount identical beginnings; put instructions before variable content.
- Trim tool output. Return the lines the model needs, not whole files or pages.
- Fewer, bigger steps beat many tiny ones when each step re-sends a long history.
- Write tight instructions and skills. Every token in an always-loaded instruction file is paid on every call. The Coding Agent Skills and AGENTS.md Kit keeps each skill short for this reason.
- Cap runs. Set a maximum number of steps and a daily budget so a loop cannot run away.
About the token estimate
The character-based estimate (about four characters per token for English prose) is a rule of thumb. Code, numbers and non-English text usually produce more tokens per character, and each model family tokenizes differently. For decisions that matter, take real counts from your provider's usage data.
Worked example
This is what the tool produces for the sample input, so you can see the result without running it.
Input
You are a support assistant for an online shop. Answer using only the knowledge base excerpts below. If you are unsure, say so and offer to escalate. Keep answers under 120 words.
Result
Pasted text: 179 characters, 32 words, roughly 40 to 51 tokens for English (about 4 characters per token; code and other languages run higher).
| Measure | Value |
|---|---|
| Input tokens, first call | 45 |
| Total input tokens per run (all calls) | 4,980 |
| Total output tokens per run | 1,200 |
| Cost per run | $0.0249 |
| Cost per day (500 runs) | $12.44 |
| Cost per month (30 days) | $373 |
- Context growth adds 4,800 input tokens per run. Without growth the same run would cost about $0.0185. Trimming what each step carries forward is usually the biggest saving.
- Output tokens cost more than input here. Ask for shorter answers or structured output.
- Prices are whatever you entered; check your provider's current price sheet. Real token counts depend on the model's tokenizer.
Frequently asked questions
How accurate is the token estimate?
Within roughly 20 to 30 percent for English prose. Code and other languages usually use more tokens per character. Use your provider's usage logs for exact figures.
Does it know current model prices?
No. You enter the prices, so it never goes out of date and never claims a price it cannot know.
What is context growth?
Tokens added by each step (tool output, replies) that are re-sent to every later step in the same run.
Is my text uploaded?
No. Everything is calculated in your browser.
More free tools
- AI agent access risk quiz: Twelve yes or no questions about what your AI agent can read, send, spend and run. Get a risk score, the combinations that matter, and the first fixes to make.
- AGENTS.md generator: Generate an AGENTS.md for your repo: exact commands, conventions, boundaries and safety rules for coding agents. Defaults for Node, Python, Rust, Go, Solidity.
- SKILL.md generator and checker: Build a SKILL.md with valid front matter, a trigger-focused description, steps and rules. Checks the name format, description length and vague wording.