What the token cost calculator does
The calculator above estimates what a session with a Claude or GPT model would cost if it were billed through the API, token by token. You pick the model and enter how many tokens a typical session uses in each category. It returns the cost of one session, one day and one month of work, and shows where the money goes.
The math uses the per-million-token (MTok) prices that Anthropic and OpenAI list on their official pricing pages, checked on October 18, 2026. All results are in US dollars.
How per-token billing works
Both companies bill four kinds of tokens separately, each at its own rate:
- Input: text sent to the model that was not already cached, such as your message, a tool result or a file the agent read.
- Output: what the model writes, including code and tool calls. This is the most expensive token.
- Cache writes: the first time a piece of context is stored so it can be reused. It costs a bit more than input.
- Cache reads: context that was already stored and gets used again in the next call. It costs a fraction of input.
Cache reads matter most in agent sessions. On every step, the agent sends the conversation history, the instructions and the files it already read. Without a cache, all of that would be billed as fresh input on every call. With a cache, the API reads what it already processed and charges far less for that volume.
In Anthropic’s multiplier table, a 5-minute cache write costs 1.25 times the input price, and a 1-hour cache write costs 2 times. A cache read costs 0.1 times input on most models, 0.05 times on Claude Opus 5.5 and Claude Sonnet 5.5, and 0.025 times on Claude Fable 5.1 and Claude Mythos 5.1. By Anthropic’s own numbers, the 5-minute cache pays off after one read and the 1-hour cache after two.
Prices the calculator uses
Here are some of the values from the official tables, in US dollars per million tokens. For Anthropic, cache writes are shown for both cache lifetimes. For OpenAI, the values come from the Standard table, short context.
| Model | Input | Cache writes | Cache reads | Output |
|---|---|---|---|---|
| Claude Fable 5.1 | 10 | 12.50 (5 min) / 20 (1 h) | 0.25 | 50 |
| Claude Opus 5.5 | 4 | 5 (5 min) / 8 (1 h) | 0.20 | 20 |
| Claude Sonnet 5.5 | 2 | 2.50 (5 min) / 4 (1 h) | 0.10 | 10 |
| Claude Haiku 5.5 (up to 100K tokens) | 0.10 | 0.125 (5 min) / 0.20 (1 h) | 0.01 | 0.50 |
| gpt-6-astra | 10 | 12.50 | 1 | 50 |
| gpt-6.1-sol | 2 | 2.50 | 0.10 | 10 |
| gpt-6-luna | 0.10 | 0.125 | 0.01 | 0.50 |
According to Anthropic, Claude Haiku 5.5 changes price once the prompt goes over 100,000 tokens: $0.50 input, $2.50 output and $0.05 cache reads. That count includes the cache reads and writes of the request itself.
How to fill in each field
For an estimate close to reality, use numbers from one of your own sessions rather than a guess. Field by field:
- Model: pick the model that answers in the session. It sets the price for every other line.
- Input: new tokens sent to the model over the session, not counting what came from the cache.
- Cache writes: tokens stored in the cache for the first time. In a long session, this grows along with the context.
- Cache reads: context tokens that were reused. In an agent session, this is usually the biggest number, often in the millions.
- Output: tokens the model generated.
- Cache lifetime: only shown for Anthropic models. Choose 5 minutes or 1 hour. The lifetime changes the price of cache writes.
- Sessions per day: how many similar sessions you run on a normal day.
- Workdays per month: how many days a month you work with the agent.
If you do not have numbers from a real session, start with a small example and adjust later. The relative weight of each category matters more than getting the first try exact.
How to read the result
The result comes in four parts: per session, per day, per month, and where the money goes. Here is an example with Claude Sonnet 5.5 and a 5-minute cache:
- Input: 50,000 tokens, or $0.10
- Cache writes: 200,000 tokens, or $0.50
- Cache reads: 3 million tokens, or $0.30
- Output: 40,000 tokens, or $0.40
That session comes to $1.30. At 4 sessions a day, a day costs $5.20. Over 21 workdays, the month lands at $109.20.
In the breakdown, cache writes take about 38%, output 31%, cache reads 23% and input 8%. Notice that the 3 million tokens read from cache cost $0.30. Billed as regular input at $2 per million, they would have cost $6.
The breakdown tells you where to look. If output dominates, asking for shorter answers helps. If cache writes weigh a lot, check whether the context is being rebuilt from scratch too often. If cache reads dominate, the cache is doing its job.
Why the number is an estimate
The calculator uses each company’s standard table. Your real bill can differ for several reasons listed on the pricing pages themselves:
- Long context: OpenAI lists higher prices for long context. On gpt-6.1-sol, for example, input goes from $2 to $4 and output from $10 to $15. At Anthropic, models from Claude 4.6 on, except Haiku 5.5, bill the full 1M-token window at standard rates.
- Batch: Anthropic gives a 50% discount on input and output for batch processing, and OpenAI’s Batch table is half of Standard. If you use batch, you pay less than the calculator shows.
- Other tiers: OpenAI also has Flex, Fast and Ultrafast tables, and Anthropic has a fast mode for Opus, each with its own prices.
- Data residency: Anthropic applies a 1.1x multiplier when inference is kept in the United States, and OpenAI charges 10% more on regional endpoints for models released on or after March 5, 2026.
- Tokenizer: Anthropic says models from Claude 4.7 on produce roughly 30% more tokens for the same text, so counts from an older session may not carry over to a newer model.
- Currency and fees: if your card is not billed in dollars, your bank’s exchange rate and fees change the final amount.
Subscription users do not pay per token
Everything above applies to pay-as-you-go API usage. If you use Claude Code or Codex on a subscription plan, you pay a fixed price and work within the plan’s limits, with no per-token charge.
The math is still useful on a subscription. It shows what your usage would be worth on the API, which helps you compare the plan with paying per use, spot which sessions cost the most, and choose between a larger and a smaller model for each kind of task.
How Ramo shows the cost of each session
Ramo is a desktop app for Linux, Windows and Mac (Apple silicon, in testing) that brings your Claude Code, Codex and OpenCode conversations into one window. It drives the agents already installed on your machine and reads the files Claude Code writes to ~/.claude, and your chats do not go through Ramo’s servers, except when you use Ramo from another computer and the direct connection between the two cannot be made: then they go through Ramo’s relay server, encrypted, and it cannot read them.
The usage view does this math without copying numbers into a calculator. It estimates cost from each model’s API pricing and shows:
- cost for today and the last 7 days, with the trend;
- cost per model and a month projection;
- peak hours;
- plan limits in rings, for subscription users;
- a context meter in every conversation.
Like the calculator, the figure is an estimate. It is meant for comparing sessions and days, not for replacing your bill. On a subscription plan you do not pay per token.
The download is free, with a 7-day trial that has everything unlocked and needs no credit card. After that, a lifetime license costs US$ 19 as a one-time payment, for up to 2 computers at the same time, with updates included.