Prompt Token Cost Calculator
Work out prompt token cost instantly with clear inputs, formula shown and shareable results.
About Prompt Token Cost Calculator
LLM APIs price input and output tokens separately, and output is typically three to five times more expensive because it is generated sequentially rather than processed in parallel. Cost per call is therefore input tokens times input price plus output tokens times output price, both divided by a million. Trimming a long system prompt helps, but capping output length usually saves more.
Formula
Per-call cost
cost = (input tokens x input price + output tokens x output price) / 1,000,000
Worked example
With the default values below, Prompt Token Cost Calculator returns Cost per call of $0.019500. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Input tokens per callminimum 1
- 3,000
- Output tokens per callminimum 1
- 700
- Input price per million tokensminimum 0
- 3
- Output price per million tokensminimum 0
- 15
Results
- Cost per call
- $0.019500
- Input token cost
- $0.009000
- Output token cost
- $0.010500
- Cost per 1,000 calls
- $19.5000
Step by step
- 1Values used
- 2Per-call cost
- 3Cost per call= 0.019500
- 4Input token cost= 0.009000
- 5Output token cost= 0.010500
- 6Cost per 1,000 calls= 19.5000
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why is output so much more expensive?
Prompt tokens are processed in one parallel forward pass, while each output token requires its own decoding step. The provider's cost per output token is genuinely higher.
Does prompt caching change the arithmetic?
Yes. Cached prefix tokens are usually billed at a large discount, so a stable system prompt reused across calls costs a fraction of the full input rate.
Related Calculators
- Batch Inference Cost Calculator
- Embedding Generation Cost Calculator
- Labelling Cost Calculator
- MLOps Cost Per Model Calculator
- Neural Architecture Search Cost Calculator
- Reranking Cost Calculator
- Token Count Estimate Calculator
- Vector Storage Cost Calculator
- A B Test For Models Calculator
- Active Learning Sample Budget Calculator
You might also need
- Labelling Cost CalculatorAlso in AI, ML & Data Science
- Reranking Cost CalculatorAlso in AI, ML & Data Science
- Batch Inference Cost CalculatorAlso in AI, ML & Data Science
- Embedding Generation Cost CalculatorAlso in AI, ML & Data Science
- Token Count Estimate CalculatorAlso in AI, ML & Data Science
- Vector Storage Cost CalculatorAlso in AI, ML & Data Science
