Skip to content
ENExplore Calculators

Completion Cost Calculator

Calculate the dollar cost of an LLM completion based on output tokens and pricing.

About Completion Cost Calculator

LLM providers charge per token for generated output, typically at a higher rate than input tokens. This calculator multiplies the number of output tokens by the per-million-token pricing to determine the cost of a single completion.

Formula

Cost

cost = (output_tokens / 1,000,000) × price_per_million

price_per_million
Dollar cost per 1 million output tokens

Worked example

With the default values below, Completion Cost Calculator returns Completion Cost of $0.007500. Change any input above and every figure here is recalculated in your browser.

Inputs used

Output Tokensminimum 0
500
Price per 1M Output Tokensminimum 0 $
15 $

Results

Completion Cost
$0.007500

Step by step

  1. 1Cost = tokens ÷ 1M × price= $0.007500

Assumptions and limits

  • The result is derived only from the 2 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 are output tokens more expensive?

Generation requires sequential autoregressive decoding which is computationally more expensive per token than processing input tokens in parallel during the prefill phase.

How do I reduce completion costs?

Use shorter max_tokens limits, request concise responses in your prompt, use a smaller/cheaper model for simple tasks, or batch requests during off-peak hours.

Completion Cost Calculator – Calculate Completion Cost