SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor · Updated 2026-10-28

How Much 1M Tokens Cost for Claude?

Claude dey charge input and output tokens separately, and output cost five times input. See the exact arithmetic wey turns 1M tokens into your monthly bill.

1M tokens cost how much for Claude?

1M tokens mean one million tokens, and na the unit wey Claude API (application programming interface) model prices dey use. No be one fixed price, because input and output get different rates, and every model get im own pair of rates. Claude Haiku 5.5 get two pairs: one for prompts up to 100,000 tokens, and higher one for prompts wey pass that. As of October 2026, one million input tokens cost $1 for Claude Haiku 4.5, $2 for Claude Sonnet 5, and $5 for Claude Opus 5.

Output na the expensive side. For every current model, output rate na five times input rate, so the split between the two dey affect your bill pass the headline figure. App wey dey send long documents and return short answers go behave very different from one wey dey write long answers from short prompt.

This page dey explain unit economics: wetin one token cost, and how to estimate bill before you build. To see where the tokens actually dey go as you work, read where tokens dey go inside Claude Code session.

How 1M tokens dey look

Token na small chunk of text wey di model dey read or write. Anthropic glossary tok say one token dey roughly 3.5 English characters for models wey come before Claude 4.7. Anthropic model overview tok say one million tokens fit hold about 750,000 words for those models, and if we calculate 3.5 characters per token, e dey roughly 3.5 million characters, wey be about 3.5 MB of plain English text. For di newer tokenizer wey dem introduce with Claude Opus 4.7, di same million tokens fit hold about 555,000 words, or roughly 2.5 million characters.

Published estimates for common inputs dey give better idea of how di size dey.

ChartApproximate input token counts for common content, published estimates
Di data wey dey behind dis chart
[
  {
    "label": "Average web page (10 kB)",
    "tokens": "2,500"
  },
  {
    "label": "Documentation page (100 kB)",
    "tokens": "25,000"
  },
  {
    "label": "Research paper PDF (500 kB)",
    "tokens": "125,000"
  }
]

With those rates, 1M tokens dey about 400 average web pages wey you read one time, or eight research papers of that size. E fit be one pass over a mid-sized codebase, or one month of light chat use for one person.

Make you treat all this one as estimate. Code, JSON, and text for languages wey no be English dey pack fewer words into a token, so those word counts na di optimistic side. One more thing dey change di count: Claude Opus 4.7 and later, wey include Opus 5 and Sonnet 5, dey use a newer tokenizer wey dey produce roughly 30 percent more tokens for di same text pass Sonnet 4.6 and earlier. Claude Haiku 4.5 dey use di older tokenizer. So, count wey you measure for Haiku 4.5 go dey lower pass wetin you go get for Sonnet 5 for di same input, wey mean say straight price-per-million comparison across that boundary no dey fair. Count di same prompt against both models before you decide.

Wetin Claude dey charge per million tokens

ChartClaude API list price in USD per million tokens, October 2026
Di data wey dey behind dis chart
[
  {
    "label": "Haiku 4.5",
    "input_usd": 1,
    "output_usd": 5
  },
  {
    "label": "Sonnet 5",
    "input_usd": 2,
    "output_usd": 10
  },
  {
    "label": "Sonnet 4.6",
    "input_usd": 3,
    "output_usd": 15
  },
  {
    "label": "Opus 5",
    "input_usd": 5,
    "output_usd": 25
  }
]

Claude Sonnet 5 cost $2 for input and $10 for output. Anthropic first sell that price as introductory rate until 31 August 2026, then make am the standard price and cancel the planned increase to $3 and $15. Claude Opus 5 cost $5 and $25. The Fable models dey far above that price range: Claude Fable 5 and the newer Claude Fable 5.1 both list $10 for input and $50 for output, so whether those rates make sense to pay for depend on the kind work wey you point am to.

Anthropic current lineup newer pass the models wey this page price examples use. Claude Opus 5.5 list for $4 input and $20 output, Claude Sonnet 5.5 for $2 and $10, while Claude Haiku 5.5 start from $0.10 and $0.50. Opus 5, Sonnet 5, Haiku 4.5 and Fable 5 now dey listed as legacy models wey still dey available, so the worked examples below still run as dem dey written. Wetin Haiku 5.5 cost and where e fit explain the cheapest among the new models.

Rates dey change. Treat every figure for this page as worked example dated October 2026, and confirm the current numbers for the official pricing page before you approve budget.

These rates show wetin Claude cost, but dem no show whether e cheaper for your workload. Three jobs wey we price for both Claude and ChatGPT show where each API perform better for cost.

One thing wey no change the rate na context length, with one exception. For Claude 4.6 and later models, except Claude Haiku 5.5, the full 1M token context window dey billed with standard pricing. So request wey get 900,000 tokens cost the same per token like request wey get 9,000 tokens. Long prompt cost more because e get more tokens, and no separate long-context rate dey apply. Claude Haiku 5.5 pricing depend on prompt length instead: request wey prompt pass 100,000 tokens pay $0.50 input and $2.50 output per million, instead of $0.10 and $0.50. Cache reads and writes count toward that threshold.

Arithmetic wey go still work after price change

Every bill na two multiplications and one addition.

cost = (input_tokens  / 1,000,000) * input_rate
     + (output_tokens / 1,000,000) * output_rate

Write am as code wey you fit run:

INPUT_RATE = 2.00    # USD per million input tokens, Sonnet 5, October 2026
OUTPUT_RATE = 10.00  # USD per million output tokens

def cost(input_tokens, output_tokens):
    return (input_tokens * INPUT_RATE + output_tokens * OUTPUT_RATE) / 1_000_000

print(f"{cost(4300, 400):.4f}")

That one go print 0.0126. Request wey send 4,300 input tokens and get 400 output tokens back go cost about 1.3 cents for Sonnet 5. Keep the two rates for one place inside your code. When price change, edit two lines, and every estimate for your system go change with am.

Estimate wey work for real app

Make we take support assistant. Its system prompt and product documentation total 4,000 tokens, and dem dey send am for every request because Messages API dey stateless and model no dey remember anything between calls. User question add about 300 tokens. Answer dey around 400 tokens. So each request get 4,300 input tokens and 400 output tokens.

One million input tokens fit pay for about 232 requests of this kind. If app dey handle 1,000 requests every day, e dey use 4.3 million input tokens daily. So “1M tokens” na less than six hours of traffic.

ChartEstimated cost per 1,000 requests at 4,300 input and 400 output tokens
Di data wey dey behind dis chart
[
  {
    "label": "Opus 5, list rates",
    "cost_per_1k_usd": "31.50"
  },
  {
    "label": "Sonnet 5, list rates",
    "cost_per_1k_usd": "12.60"
  },
  {
    "label": "Sonnet 5, Batch API",
    "cost_per_1k_usd": "6.30"
  },
  {
    "label": "Haiku 4.5, list rates",
    "cost_per_1k_usd": "6.30"
  },
  {
    "label": "Sonnet 5, warm prompt cache",
    "cost_per_1k_usd": "5.40"
  }
]

For Claude Opus 5, this traffic cost $31.50 per 1,000 requests. For Sonnet 5, na $12.60. If you switch to Claude Haiku 4.5, e go drop to $6.30, while warm prompt cache for Sonnet 5 go reduce am further to $5.40.

Multiply am by 30 to calculate one month of this traffic. Sonnet 5 for list rates na about $378 every month. The same app with warm cache na about $162. Your model choice and caching decision each get more effect than any rate wey you fit negotiate at this volume. Which model to run na separate question. The cheapest one wey passes your evaluations na the winner: how to choose between Opus, Sonnet and Haiku explain how to test am properly.

Prompt caching dey cut di part wey dey repeat

That 4,000 token prefix dey identical for every request, and you dey pay full input price for am every time. Prompt caching dey store di processed prefix and dey charge reduced rate to reuse am.

For di models for this page price chart and worked examples (Haiku 4.5, Sonnet 5, Sonnet 4.6 and Opus 5), and for Fable 5, cache read dey cost 0.1 times di base input rate. Some newer models dey charge less for a read: Opus 5.5 and Sonnet 5.5 dey charge 0.05 times, and Fable 5.1 and Mythos 5.1 dey charge 0.025 times. Writing di cache dey cost 1.25 times base for di 5 minute lifetime, or 2 times base for di 1 hour lifetime. So for di 0.1 times models, di 5 minute cache dey pay for itself after one read, because di write dey cost 0.25 extra while each read dey save 0.9. Di 1 hour cache need two reads to break even.

Di simplest way to turn am on na single top-level field:

curl https://api.anthropic.com/v1/messages \
  -H "content-type: application/json" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-opus-5",
    "max_tokens": 1024,
    "cache_control": {"type": "ephemeral"},
    "system": "You are a helpful assistant.",
    "messages": [
      {"role": "user", "content": "What are the key themes in Pride and Prejudice?"}
    ]
  }'

Then read di usage block wey come back:

{
  "usage": {
    "cache_creation_input_tokens": 5120,
    "cache_read_input_tokens": 1800,
    "input_tokens": 50,
    "output_tokens": 503
  }
}

Those three input counters dey billed at three different rates and dem sum to your real input volume: total_input_tokens = cache_read_input_tokens + cache_creation_input_tokens + input_tokens. Cost estimate wey read only input_tokens go dey very wrong once caching dey on.

Two things dey stop cache from paying off, and both dey fail silently.

Di prefix must be byte-identical. Cache lookup na prefix match, so timestamp or user name for top of your system prompt dey change am for every request. You go then pay 1.25 times base input every time and never read once. Di symptom na cache_creation_input_tokens wey dey stay high while cache_read_input_tokens dey stay 0. Place cache_control for di last block wey e content dey di same across requests, and put everything wey dey vary after am. Changing your tools definitions dey invalidate di whole cache below dem, because invalidation dey run down di order: tools, then system, then messages.

Di prefix must be long enough. Di minimum cacheable length na 512 tokens for Opus 5, 1,024 for Sonnet 5 and 4,096 for Haiku 4.5. Shorter prompt no dey cached and no error dey returned. Di 4,000 token prefix for di example above dey cache for Sonnet 5 and no dey cache for Haiku 4.5, because 4,000 dey below that model floor. When both counters read 0, nothing dey cached.

Batch processing dey cut rate by half

Batch API dey process requests asynchronously, with 50 percent discount for both input and output. For the example above, this one reduce $12.60 per 1,000 requests to $6.30. This discount fit join with prompt caching, so cached batch job na the cheapest way to run bulk work.

Wetin you lose na latency. Because of this, batch no work for anything wey person dey wait for. E fit work for classification wey run overnight and document backfills.

Wetin make chat cost grow inside one conversation

Because API no dey keep state, your client dey resend the complete conversation for every turn. So token usage inside one chat dey grow according to the square of its length, no be straight line.

Make we use turns wey average 500 tokens. Turn 1 send 500 input tokens. Turn 2 send 1,000. Turn 20 send 10,000. If you add am with n(n+1)/2, conversation wey get 20 turns don send about 105,000 input tokens, even though the transcript itself na only 10,000 tokens long.

Na why chat feature fit cost pass wetin transcript suggest, and why caching the stable prefix or summarising older turns dey pay for itself for long threads. Agent wey dey loop through tool calls get the same pattern, and e worse: every tool result remain for history and dem resend am for every later turn. To put hard spending limit on agent wey you run yourself matter pass for here, because that growth dey happen automatically and nobody dey monitor am.

Token count pe koni guess

No derive token count from word count again. API go count dem for you, free of charge, with rate limit wey separate from message creation.

curl https://api.anthropic.com/v1/messages/count_tokens \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-opus-5",
    "system": "You are a scientist",
    "messages": [{
      "role": "user",
      "content": "Hello, Claude"
    }]
  }'

The response get one field:

{ "input_tokens": 14 }

Put your real system prompt and tool definitions inside am, together with one representative user message. Then put the number inside the cost function above. The endpoint dey accept the same body wey message request dey use. So images and PDFs wey you send as base64 go count correctly too. E no accept server tools like web search and web fetch. E no accept images or documents wey you pass by URL or file reference.

Two caveats matter. The count na estimate, so e fit differ small from the amount wey dem bill. The count also dey use tokenizer for the model wey you pass. So pass the model wey you actually go run.

You no fit count output tokens beforehand because dem never exist yet. Use max_tokens to cap dem. Then measure the real distribution from usage.output_tokens for live traffic.

Wetin else dey enter the bill

Tokens na the biggest part of the bill. Some other items no be tokens, and dem dey surprise people.

  • Tool definitions dey become input tokens for every request. The tool use system prompt alone dey add 286 to 406 tokens for Opus 5, before your own schemas. Ten tool descriptions wey too long fit double small prompt.
  • Web search dey cost $10 for every 1,000 searches, on top of the tokens wey results use when dem enter the context.
  • Web fetch no get separate fee, but the page wey e fetch becomes input tokens. A 100 kB documentation page na roughly 25,000 of dem.
  • If you ask for US-only inference with inference_geo for Claude 4.6 and later, e go apply 1.1 multiplier to every token category, including cache reads and writes.

Whether API na the correct thing to buy at all depend on your usage volume. When you reach usage ceiling for a plan, na usually then this question start, and the ways to move beyond a limit range from waiting for the window to reset to moving that work to metered API calls. Below one particular usage level, flat monthly plan win completely, and the API compared with a Claude subscription do that comparison with real numbers.

FAQ

1M tokens cost how much for Claude?

E depend on the model, and whether the tokens na input or output. As of October 2026, one million input tokens cost $1 for Claude Haiku 4.5, $2 for Claude Sonnet 5, and $5 for Claude Opus 5. The newer Claude Haiku 5.5 start at $0.10 per million input tokens for prompts up to 100,000 tokens, and charge $0.50 above that. Output cost five times input rate for each of those models. Rates dey change, so confirm dem for the official pricing page before you put figure for budget.

1M tokens na the same as 1M words?

No. For models before Claude Opus 4.7, Anthropic talk say one token na roughly 3.5 English characters, and one million tokens hold about 750,000 words. For the newer tokenizer wey Claude Opus 4.7 and later use, one million tokens hold about 555,000 words, because that tokenizer produce roughly 30 percent more tokens for the same text than Claude Sonnet 4.6 and earlier. Those ratios na only guide. Code, JSON, and languages wey no be English use more tokens per word, and counts no dey portable between model generations. Measure with the free /v1/messages/count_tokens endpoint, and pass the model wey you plan to run.

Prompt caching always dey save money?

No. 5 minute cache write cost 1.25 times the base input rate, so prefix wey you write and never read go cost 25 percent more than sending am normally. E pay for itself from the first read. E fit fail in two ways, and both dey silent. If cached prefix change between requests, lookup no go match, because na exact prefix match. If prefix shorter than the model minimum cacheable length, wey na 1,024 tokens for Sonnet 5 and 4,096 for Haiku 4.5, nothing go cache and no error go return. When cache_creation_input_tokens and cache_read_input_tokens both read 0, cache no dey do anything.

Why my bill grow faster than my message count?

Because the whole conversation dey resend for every turn. Messages API no hold state, so turn 20 of chat carry all the earlier 19 turns as input again. If turns average 500 tokens, 20 turn conversation go send about 105,000 input tokens while transcript only 10,000 tokens long. Agent loops dey behave the same way, because every tool result remain for the history. Cache the stable prefix, or summarise older turns and remove dem from the request.

Dis article help you?