A model's price per million tokens is the start of a budget. The useful comparison is the cost of finishing your task: input, output, cache writes and reads, extra calls, and retries. This page gives a reproducible calculation, with a dated provider example and a worksheet you can reuse.

## Start with the workload {#workload}

Write down the same workload for every candidate: requests per day, input tokens per request, output tokens per request, and the fraction of answers you accept. Count the system instructions, conversation history and tool results that you send again. A long conversation can make a small question expensive.

Use token counts from your actual requests. A word count is an approximation, and the approximation changes with language, code and the tokenizer. Keep an ordinary case and a large case: a budget based only on an average hides the expensive tail.

## The calculation {#formula}

For ordinary text requests without caching:

**Cost = (input tokens × input price + output tokens × output price) ÷ 1,000,000.**

Multiply this by the number of calls, including intermediate agent calls. For a monthly estimate, calculate the total tokens for the month rather than rounding each tiny request to cents.

[Claude Sonnet 4.6's provider page](https://platform.claude.com/docs/en/models/sonnet-4-6/overview) lists $3 per million input tokens and $15 per million output tokens, checked on 31 October 2026. These are the direct API rates used below, not a chat subscription price.

| Illustrative workload | Input / call | Output / call | Cost / call | 10,000 calls |
| --- | ---: | ---: | ---: | ---: |
| Short reply | 2,000 | 1,000 | $0.021 | $210 |
| Document question | 20,000 | 2,000 | $0.090 | $900 |
| Large context | 200,000 | 8,000 | $0.720 | $7,200 |

For the middle row: 20,000 × $3 / 1M = $0.06 of input; 2,000 × $15 / 1M = $0.03 of output. The $900 total is arithmetic for the stated workload, not a measurement of a real application's bill. Extra services, taxes and negotiated terms are outside it.

## Separate cache hits from writes {#cache}

A repeated prefix is useful only when the provider reports a cache hit. [Anthropic's caching documentation](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) describes prefix matching, expiry, and separate writes and reads. Its [pricing table](https://platform.claude.com/docs/en/about-claude/pricing) lists Sonnet 4.6 cache reads at $0.30/1M tokens and five-minute writes at $3.75/1M, checked on the same date.

Suppose 18,000 of the middle row's 20,000 input tokens are an eligible cached prefix. A warm hit costs 18,000 × $0.30 / 1M + 2,000 × $3 / 1M + 2,000 × $15 / 1M = **$0.0414**. Ten thousand such hits cost $414. A request that creates that five-minute cache instead costs **$0.1035**. Include misses, new writes and expiry before estimating a saving.

## Compare completed results {#results}

Keep quality and cost in the same worksheet. For illustration, a $0.09 attempt with a 90% acceptance rate costs $0.10 per accepted result; a $0.06 attempt at 50% acceptance costs $0.12. This assumes independent retries with the same cost until success. Both rates are invented examples, not model benchmarks.

For a real comparison, run the same set of tasks, record every call and count accepted results using the same criteria. Report total spend divided by accepted results, alongside latency and failures. A model's name or a leaderboard position does not supply those measurements for your workflow.

## Check the offer before choosing {#check}

Match the exact model version, provider and billing unit. Verify the rate for your context length and region, and any cache, batch or tool charges. Image, audio and video pricing can use different units; this text-token worksheet cannot compare them without conversion.

For coding tools, start with the [Codex setup and usage guide](/codex/), [Claude Code setup and billing guide](/claude-code/) or [Cursor plans and usage guide](/cursor/). The [Codex, Claude Code and Cursor comparison](/analysis/codex-vs-claude-code-vs-cursor/#budget) adds subscription costs and human review time to the task budget; this API worksheet covers the token-billed part.

The [live price table](/data/#prices) and [model catalogue](/models/) show facts observed by Signal Forge. Each model page links to its evidence. A missing price means it is unestablished in this catalogue, never zero. Use the [Sonnet 4.6 card](/models/anthropic/claude-sonnet-4-6/) to compare this dated example with current observations, and the [Claude timeline](/claude/) for related changes.

For another API workload, the [Gemini 3.8 Flash guide](/models/google/gemini-3-8-flash/) gives acceptance checks and explains how to match a model to a provider offer. Record the provider and API identifier before comparing bills from different services.

To update this worksheet, replace the two rates, measured token totals, cache mix and acceptance counts. Keep the date and provider beside the numbers so another person can reproduce the comparison.
