Skip to content
Calcrivo

Prompt Cost Calculator

Calculate the dollar cost of an LLM prompt based on token count and per-model input pricing.

Inputs

tokens

Prompt Cost

$0.030000

Cost per 1K Tokens

$0.03000

Price per 1M Tokens

$30.00

Step by step

  1. Price per token: price per 1M tokens ÷ 1,000,000

    $30 ÷ 1,000,000

    = $0.00003000

  2. Prompt cost: tokens × price per token

    1000 × $0.00003000

    = $0.030000

How it works

LLM providers charge per token for input (prompt) and output (completion) separately, with input tokens usually priced lower than output tokens. This calculator multiplies your prompt token count by the model's per-token input price to estimate the cost of sending that prompt. Prices shown are illustrative list prices per million tokens and change frequently — check your provider's current pricing page for exact figures.

Formula

cost = tokens * (price_per_million / 1000000)

tokens
Number of prompt tokens
price_per_million
Model's price per 1 million input tokens

Frequently Asked Questions

Is this the total cost of an API call?

No, this only covers the input (prompt) tokens. Use the Total API Cost Calculator to include completion tokens and request volume.

Why do prices vary so much between models?

Larger, more capable models (like GPT-4 or Claude 3 Opus) cost more per token because they require more compute to run. Smaller models like GPT-3.5 Turbo or Claude 3 Haiku are cheaper but less capable.

Are these prices exact?

No, these are illustrative reference prices. Providers update pricing periodically, so always confirm current rates on the official pricing page before budgeting.

Does prompt caching reduce this cost?

Some providers offer discounted rates for cached or repeated prompt prefixes. This calculator assumes standard, non-cached pricing.

You might also need