Input vs Output Tokens and Cost

Two Prices

API providers charge per million tokens (MTok), with separate prices for input (what you send) and output (what the model writes). Output is usually about 5× more expensive because it is generated one token at a time.

ModelInput $ / MTokOutput $ / MTokUse for
claude-opus-5-5$4.00$20.00Hard reasoning, agents, complex code
claude-sonnet-5-5$2.00$10.00Most production chat and RAG
claude-haiku-5-5$0.10$0.50Classification, extraction, routing, high volume

Note: Prices change; check the provider's pricing page before you estimate a budget. The response's usage field tells you the exact tokens billed for each call.

A Cost Calculator

Example

Cost of one request = input_tokens × input_price / 1M + output_tokens × output_price / 1M. Multiply by daily volume, then convert to rupees (₹88 per $ is assumed here):

PRICES = {  # USD per 1M tokens (input, output) - prices change, check the pricing page
    "claude-opus-5-5":   (4.00, 20.00),
    "claude-sonnet-5-5": (2.00, 10.00),
    "claude-haiku-5-5":  (0.10, 0.50),
}
USD_TO_INR = 88

def cost_usd(model, input_tokens, output_tokens):
    pin, pout = PRICES[model]
    return input_tokens * pin / 1e6 + output_tokens * pout / 1e6

# one support reply: 1,500 tokens in (prompt + policy text), 250 tokens out
per_day = 20_000
print(f"{'model':18} {'per call $':>11} {'per day $':>10} {'per month ₹':>12}")
for m in PRICES:
    c = cost_usd(m, 1_500, 250)
    print(f"{m:18} {c:>11.5f} {c * per_day:>10.2f} {c * per_day * 30 * USD_TO_INR:>12,.0f}")

Output

model               per call $  per day $  per month ₹
claude-opus-5-5        0.01100     220.00      580,800
claude-sonnet-5-5      0.00550     110.00      290,400
claude-haiku-5-5       0.00027       5.50       14,520

Exercise

Exercise: A summarizer reads 6,000 tokens and writes 400 tokens per document. You process 5,000 documents a day with claude-sonnet-5-5. What is the daily cost in USD?

Show answer
per doc = 6000 * 2.00 / 1e6 + 400 * 10.00 / 1e6
        = 0.012 + 0.004 = 0.016 USD
per day = 0.016 * 5000 = 80 USD