LLM API cost
Prompt cost calculator
What one prompt costs on a model from its length in characters and the expected answer length.
Prices read from the vendor pages on 2026-10-20. Arithmetic on list prices, not advice or a quote.
Saving and exports need Norwell Tools Pro, $9 a month. See what is in it. Everything above is free.
How it works
Characters are converted to tokens with the vendor's rule of thumb (4 characters a token at OpenAI, 2.5 at Anthropic; Google and the others use the OpenAI figure here as an approximation), then priced at list.
The formula
prompt_tokens = characters / chars_per_token (the vendor's rule of thumb); cost = (prompt_tokens * input_price + answer_tokens * output_price) / 1,000,000Worked example
With the inputs the page opens on:
- model: gpt-5.4-mini
- prompt characters: 6000 characters
- answer tokens: 400 tokens
- calls: 1000
gives
- prompt tokens: 1,500 tokens
- cost per call: $0.00293
- cost for calls: $2.93
Sources
- https://developers.openai.com/api/docs/pricing (read 2026-10-20)
- https://platform.claude.com/docs/en/about-claude/pricing (read 2026-10-20)
- https://ai.google.dev/gemini-api/docs/pricing (read 2026-10-20)
- https://platform.openai.com/tokenizer (rule of thumb: 1 token is about 4 characters or 0.75 words of English)
- https://platform.claude.com/docs/en/models/overview (1M tokens is roughly 555k words or 2.5M Unicode characters on the current tokenizer)
Prices read from each vendor's own pricing page on 2026-10-20; the page may have changed since. This is arithmetic on published list prices, not advice or a quote. Check the vendor's page before committing a budget.
Questions
Can I paste the prompt instead?
Related tools
Monthly and per-request cost of an LLM API workload from input tokens, output tokens, requests a month, cached share and the Batch discount.
The same workload priced on every model in the table, cheapest first.
How many requests and tokens a monthly budget buys on a model.
Convert a token price between per 1M, per 1K and per token, and price any token count.