Skip to content
ENExplore Calculators

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

  1. 1Values used
  2. 2Per-call cost
  3. 3Cost per call= 0.019500
  4. 4Input token cost= 0.009000
  5. 5Output token cost= 0.010500
  6. 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.

Prompt Token Cost Calculator | Calcrivo