Claude Code: subscription or API? Work it out from your own logs
Short answer: price one month of your real Claude Code usage at API rates and put it next to the plan price. If the API figure is lower than the plan, paying per token is cheaper and has no usage limits. If it is higher, the plan is cheaper, as long as you stay inside its limits.
Anthropic does not publish plan limits in tokens, so nobody can tell you the break-even in tokens. What you can know is your own monthly cost at API rates. Claude Code keeps the numbers you need on your computer. Below: the plan prices, how to read the comparison, and a script that does it per month.
What the plans cost
Claude Code is included from Pro upward. Prices from Anthropic's pricing page, before tax:
| Plan | Price | Usage, as Anthropic states it |
|---|---|---|
| Pro | $20 a month ($17 a month billed yearly) | More usage than Free, every 5 hours and every week |
| Max | $100 a month | 5× Pro usage every 5 hours and every week |
| Ultra | $200 a month | 10× Pro usage every week; no 5-hour limit for verified accounts |
| API key | Per token, no monthly fee | No plan limit; you pay for every token |
Anthropic's own note on the limits: how fast you reach one depends on the model, how long your chats are and how large your files are. Max and Ultra also list $100 and $200 a month in API credits for building on the Claude Platform.
How to read the comparison
Take one full month. Price every response at the API rate for the model that produced it: new input, cache writes, cache reads and output each have their own price. Add it up. Then:
- API total below the plan price: a plan costs you more than paying per token. Light or occasional use usually lands here.
- API total above the plan price: the plan saves you the difference, if your usage fits its limits. If you keep hitting limits, the next plan up or the API may be what you actually need.
- Near the line: look at more than one month. Usage swings a lot from month to month.
An example with made-up numbers: a month that comes to $61 at API rates is $41 more than Pro, so Pro is cheaper if it covers that month. The same month is $39 less than Max, so Max would cost more than the API.
Two mistakes that skew the number
Counting the logs as they are. Claude Code writes the same response to its logs several times, so a plain sum of the log lines can come out about twice as high, or more. That makes the API look far more expensive than it is. Why Claude Code token counts are wrong shows how to count each response once.
Pricing every input token the same. Most of Claude Code's input is read from the prompt cache, which costs a small fraction of the input price, while cache writes cost more. Pricing it all as plain input inflates the total many times over. The caching break-even math has the multipliers.
Run it on your own logs
This script reads Claude Code's local logs (~/.claude/projects), keeps each response once, prices
it at Anthropic's standard API rates and adds it up per calendar month. It works whether you are on a plan or an
API key: the logs record the same usage either way. It prints numbers only and sends nothing anywhere.
(Download it, or get it with the other scripts
on GitHub.)
python3 claude_code_monthly_cost.py
Example output (made-up numbers):
Month At API rates Pro $20/mo Max $100/mo Ultra $200/mo
2026-09 $12.40 API cheaper by $8 API cheaper by $88 API cheaper by $188
2026-10 $61.30 plan cheaper by $41 API cheaper by $39 API cheaper by $139
2026-11 $236.40 plan cheaper by $216 plan cheaper by $136 plan cheaper by $36
A month that is still running is only partly counted.
We checked it against our other scripts on a real set of Claude Code logs: its total matches the caching script to the cent, and its per-response prices match the tested per-request cost function on every model. It lists any model it has no price for instead of counting it as free. Standard rates only: the Batch API, US-only inference, fast mode and long-prompt prices are not applied.
Prefer not to run a script? The free Claude Code token counter does the same counting in your browser and shows the total at API rates. Your files never leave your computer.
Or let something keep the numbers for you
NeverPayTwice is a small app we make. It reads your Claude Code logs the same careful way, shows your usage and its API-rate cost per day and per model, against a monthly budget you set, and flags every time you paid again for something you had already bought. It runs on your own computer and nothing is uploaded. Mac, Windows or Linux, $9 one time.
See it with sample data first, no sign-up.
Sources: Anthropic's plans and pricing page (plan prices, usage wording, API credits) and API pricing page, checked November 14, 2026. Prices and plans can change; check the current pages if something doesn't match.