Skip to content
Calcrivo

Completion Cost Calculator

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

Inputs

$

Completion Cost

$0.007500

Step by step

  1. Cost = tokens ÷ 1M × price

    500 ÷ 1,000,000 × $15

    = $0.007500

How it works

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

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.

You might also need