# Claude Code: Max Subscription or API Key, Which Costs Less

> Claude Code subscription vs API key: usage measured from logs for August-November 2026, a break-even formula, a rule by workload, and a script for your own logs.
> Author: Roman Belov · Published: 2026-11-19 · Source: https://futurecraft.pro/blog/claude-code-subscription-vs-api/

A Claude subscription includes Claude Code at a fixed price within limits; an API key bills every token. For daily interactive work the subscription is cheaper: with 20 working days a month, Pro at $20 pays off from $1 of list-price tokens a day, Max at $100 from $5, and Ultra at $200 from $10. The API is cheaper if you do less than $20 of work a month, and you need it where a subscription doesn't fit: team CI, services for other people.

| Workload | Start with | When to change |
|---|---|---|
| Occasional, a few sessions a month | API key with a spend limit | Monthly spend reaches $20: Pro |
| About an hour a day | Pro, $20 | You buy more than $80 of usage credits a month: Max |
| All day, long sessions | Max, $100 | You buy more than $100 a month or the pauses get in the way: Ultra |
| CI, scripts, automation | Console API key with its own budget | Personal script on Max or Ultra: monthly API credits first |
| Product or agent for other people | API key or cloud provider only | Subscription terms don't allow it |

This article shows how those thresholds were derived: the author's usage for August-November 2026, the formula, the caveats, and a script that does the same calculation on your logs. Prices and rules follow Anthropic's documentation as of November 29, 2026, before tax.

## What Pro, Max, and Ultra include

Data from the [pricing page](https://claude.com/pricing) and the Help Center ([Max](https://support.claude.com/en/articles/11049741-what-is-the-max-plan), [Ultra](https://support.claude.com/en/articles/17728952-what-is-the-ultra-plan)).

| Plan | Price per month | Limits relative to Pro | Fable | API credits per month |
|---|---|---|---|---|
| Pro | $20 ($17 billed annually) | 1x, per 5 hours and per week | usage credits only | none |
| Max | $100 | 5x every 5 hours and every week | up to half the weekly limit | $100 |
| Ultra | $200 | 10x per week, no 5-hour limit for verified accounts | up to half the weekly limit | $200 |

The free plan doesn't include Claude Code. Limits are shared: chat, desktop, and Claude Code draw from one pool. Anthropic doesn't publish them in tokens or dollars, and the pricing page says outright that there's "no fixed message count". So the math below answers "does the price pay off?". Only your own work on the plan answers "are the limits enough?".

Team and Enterprise aren't covered here.

## The measurement: four months of usage

The author counted local Claude Code transcripts on November 29, 2026. Each model response is multiplied by the API list price of the model that answered, including cache writes and reads. Duplicate records are removed. April-July is discarded because the logs for those months are incomplete. Completeness for August-November was checked against the desktop app's session metadata. August, September, and October are full months; November covers the 1st through the 28th inclusive.

API equivalent here means the list price of the tokens used. An active day is a day with at least one model response.

| Month, 2026 | API equivalent | Active days | Mean per day | Median per day | Max per day | 5-hour limit hits |
|---|---|---|---|---|---|---|
| August | $3,054 | 24 | $127.3 | $62.2 | $499 | 1 |
| September | $861 | 21 | $41.0 | $31.6 | $243 | 1 |
| October | $1,606 | 27 | $59.5 | $16.9 | $271 | 4 |
| November (1-28) | $587 | 12 | $48.9 | $10.5 | $221 | 0 |

The mean is the API equivalent divided by the number of active days; the median and maximum come from the measurement. They describe different things. In November the mean is 4.7 times the median: half the days cost no more than $10.5, while one day cost $221, or 37.6% of the total. The gap is 3.5 times in October, 2.0 in August, and 1.3 in September. In all four months, the most expensive day alone exceeded the price of Ultra.

All four months were on Max (5x); the logs don't record the plan. They contain no weekly limit messages. Limit hits were counted from session limit messages, unique by day and reset time.

Cache reads made up more than half of the total: from 50.3% in November to 59.6% in August. One-hour cache writes took 20.6-31.1%, output 7.8-16.5%, and plain input was near zero. How cache writes and reads work is covered in [prompt caching](https://futurecraft.pro/blog/prompt-caching/).

## The break-even point

Notation: P is the plan price per month, C is the month's API equivalent, N is the number of active days. You need two values:

```text
multiple            K = C / P
days to pay off     D = P / (C / N)
```

The multiple from the measured data:

| Month, 2026 | C | C / Pro $20 | C / Max $100 | C / Ultra $200 | Days to pay off Max: by mean / by median |
|---|---|---|---|---|---|
| August | $3,054 | 152.7 | 30.5 | 15.3 | 0.8 / 1.6 |
| September | $861 | 43.1 | 8.6 | 4.3 | 2.4 / 3.2 |
| October | $1,606 | 80.3 | 16.1 | 8.0 | 1.7 / 5.9 |
| November (1-28) | $587 | 29.4 | 5.9 | 2.9 | 2.0 / 9.5 |

The Pro column is arithmetic only: nothing shows that Pro's limits would have been enough for that volume. "By median" means the median replaces the mean in the denominator, as if every day were ordinary.

Here's a check without the heavy days: let every active day cost exactly the median. August gives 24 × 62.2 = $1,493, September 21 × 31.6 = $664, October 27 × 16.9 = $456, November 12 × 10.5 = $126. On those numbers Max is cheaper than list price in all four months, but in November the tokens cost only 1.26 times the plan, and Ultra already loses. Without the peaks, a light month leaves little margin, and the multiple of 5.9 doesn't show that.

Model prices need a correction too. Most of the August and September total came from the previous Opus 5 ($5/$25, cache reads $0.50 per million tokens); Opus 5.5 is cheaper ($4/$20, reads $0.20). Repricing all August tokens at Opus 5.5 gives about $1,590, and September about $505. The Max multiple falls from 30.5 to 15.9 and from 8.6 to 5.1. The repricing is hypothetical: a different model would have used a different number of tokens.

### How many days you need

The same formula for different day costs:

| Cost of an active day | Pro, $20 | Max, $100 | Ultra, $200 |
|---|---|---|---|
| $3 | 6.7 days | 33.3 days, won't pay off in a month | 66.7 days, won't pay off |
| $10.5 (author's November median) | 1.9 | 9.5 | 19.0 |
| $13 (Anthropic's average estimate) | 1.5 | 7.7 | 15.4 |
| $30 | 0.7 | 3.3 | 6.7 |

The $13 row comes from the [documentation](https://code.claude.com/docs/en/costs): across enterprise deployments, average spend is about $13 per developer per active day and $150-250 per month, with 90% of users below $30 a day. Those deployments pay by the token and the estimate is undated, so treat it as a reference point for a personal subscription.

## Why the API equivalent isn't your API bill

The phrase "the API would have cost $587" would be wrong, for two reasons.

**You'd run sessions differently.** At a fixed price, it's convenient to keep a long conversation going with MCP servers and subagents. If you paid by the token, sessions would be shorter. The logs can't tell how many fewer tokens that would be.

**The cache lives for a different time.** On a subscription within the limit, Claude Code requests a one-hour TTL for the main conversation; with an API key and on usage credits it requests five minutes ([documentation](https://code.claude.com/docs/en/prompt-caching)). A five-minute write costs 1.25 times the input price instead of 2, but after a pause longer than five minutes the prefix is written again. One bound can be computed: if every one-hour write were priced at the five-minute rate and not a single extra rewrite happened, the total would be C − 0.375 × W, where W is the cost of one-hour writes. That gives $2,698, $767, $1,421, and $542, or 7.7-11.7% less. Extra rewrites after pauses eat into that saving, and the sign of the final difference is unknown.

The author's plan was Max (5x, $100) all four months; the logs don't record it. The API equivalent adds up to $3,054 + $861 + $1,606 + $587 = $6,108, four months of Max cost $400, and the ratio is 15.3. This is the ratio of token list price to plan price. You can't call it a $5,708 saving, for the two reasons above. The logs don't show whether usage credits were bought in those months, and the measurement doesn't separate such requests: if they were, the author paid more than $400.

A few more limits: this is one developer in the desktop app and the VS Code extension; claude.ai chats, cloud sessions, and web search aren't counted; Sonnet 5.5 cache reads cost twice as much before October 7, a correction of at most $11 for October.

What remains after the caveats: for Max to lose to per-token billing in November, the real bill would have to be below 17% of the API equivalent, and in September below 11.6%. The author would have had to spend roughly six to nine times fewer tokens on the same work.

## A rule by workload

Work out the API equivalent of your usual month, then compare it with the plan price.

**Occasional.** The API wins if days × cost per day is below $20. At $13 a day, that's one active day ($13); two days already cost $26, and Pro is cheaper. A key also charges nothing in an empty month, and the Console lets you set a spend limit.

**About an hour a day.** With 20 working days, Pro pays off from $1 a day, and on price it wins for almost any noticeable workload. Its limits are the constraint. Start with Pro, turn on usage credits with a cap, and watch the extra charge. Max costs $80 more than Pro: if credits run higher than that, Max is cheaper, provided its 5x allowance covers the overrun. Fable on Pro works only with usage credits, which is a separate reason to move to Max.

**All day.** Max pays off from $5 a day. Moving to Ultra makes sense when extra charges on Max exceed $100 a month or when 5-hour window pauses interrupt your work. Ultra's weekly multiplier is twice that of Max (10x and 5x). As a reference point for Max limits, the measurement shows that at an API equivalent of $3,054, $861, $1,606, and $587 a month, the 5-hour limit triggered 1, 1, 4, and 0 times, with no weekly limit messages. Most hits didn't fall in the most expensive month, so the monthly total doesn't predict them: the window depends on what you did in those five hours.

**CI and automation.** Budget it separately: number of runs × `total_cost_usd` of one run. For a shared secret, the [GitHub Action](https://code.claude.com/docs/en/github-actions) documentation recommends a Console API key, because an OAuth token is tied to one person's subscription. A key has two more advantages: a nightly run doesn't consume the limit you need in the morning, and `--bare` mode, recommended for scripted calls that don't need hooks, doesn't read the subscription sign-in at all.

**Mixed.** If you already pay for the API, monthly credits lower the plan's price. The effective price of Max is $100 minus the spend the credits cover, up to $100. With $60 of such spend a month, Max costs you $40. Without API projects the credits give you nothing: they expire.

## What gets charged where

Claude Code uses the first credentials it finds. The [order](https://code.claude.com/docs/en/authentication#authentication-precedence), shortened: cloud provider, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_API_KEY`, `apiKeyHelper`, `CLAUDE_CODE_OAUTH_TOKEN`, Anthropic profiles, subscription sign-in through `/login`. The subscription comes last. In interactive mode you're asked about a found key once and your answer is remembered; in `-p` mode the key is always used.

```bash
# is a key set (the value isn't printed)
echo "${ANTHROPIC_API_KEY:+key is set}"
# return to the subscription in this shell
unset ANTHROPIC_API_KEY
```

After that, `/status` inside a session shows the active sign-in method. Signing in itself is covered in [how to install Claude Code](https://futurecraft.pro/blog/install-claude-code/).

| How it runs | What it draws on |
|---|---|
| Interactive Claude Code, subscription sign-in | Plan limits, then usage credits if enabled |
| `claude -p` or Agent SDK, subscription sign-in | Plan limits |
| `claude -p` or Agent SDK with a key from the organization linked to Max or Ultra | Monthly API credits, then purchased ones |
| GitHub Action with an OAuth token | Plan limits of the token's owner |
| GitHub Action with an API key, plus runs from an IDE extension and desktop with a key | Per-token billing, monthly credits don't cover it |
| Interactive Claude Code with an API key | Per-token billing |

Sources: Help Center on the [Agent SDK](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) and [monthly credits](https://support.claude.com/en/articles/17154008-monthly-api-credits-for-max-ultra-and-team-plans). The rules have changed: on June 15, 2026, Anthropic paused its announced Agent SDK changes, and the October 7 entry confirms the current rules. Reread those pages before you set up automation.

### "$100 a month in API credits" on Max

The line "$100 a month in API credits" on the Max card reads like a budget for Claude Code, but these are Claude Platform credits for your own apps. You have to claim them: Settings > Billing, the API credits section, link a Console organization. New subscribers can claim them after seven days on the plan. You can't change the organization yourself later, and the unused balance expires at the end of the cycle. Pro has no such credits.

If an organization has only these credits and they don't cover a request, Claude Code answers `Credit balance too low`.

### Usage credits after the limit

[Usage credits](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans) are a separate charge on top of the plan at standard API prices. Turn them on in Settings > Usage and set the monthly spend limit there. Under the rules on the snapshot date, purchases are generally non-refundable, and credits bought on or after December 7, 2026 generally expire after 12 months. Factor this into the comparison: on credits, the main conversation switches to the five-minute cache; the `promptCacheTtl` setting brings back one hour.

## How to calculate your own usage

The `/usage` command in a session shows plan limit bars, a breakdown for 24 hours and 7 days (keys `d` and `w`), and a Session block that estimates the session at list prices. `/cost` and `/stats` are its aliases. The Session block is meant for API billing: for a subscriber it's the API equivalent of one session and doesn't go on the bill. The breakdown is built from this machine's history; other devices and chat aren't included.

For a monthly total, you need to count the transcripts. The script uses only the Python standard library, sends nothing anywhere, and prints aggregates only:

```python
import collections, json, pathlib, statistics
# $ per 1M tokens on 2026-11-29: input, cache read, output (longer names before shorter ones)
P = {"fable-5-2": (8, .2, 40), "fable-5-1": (10, .25, 50), "fable-5": (10, 1, 50), "opus-5-5": (4, .2, 20),
     "opus-5": (5, .5, 25), "opus-4-8": (5, .5, 25), "sonnet-5-5": (2, .1, 10), "sonnet-5": (2, .2, 10)}
best, days, nop = {}, collections.Counter(), collections.Counter()
for f in (pathlib.Path.home() / ".claude/projects").rglob("*.jsonl"):
    for line in f.open(errors="replace"):
        try: o = json.loads(line)
        except ValueError: continue
        m = o.get("message") if isinstance(o, dict) and o.get("type") == "assistant" else None
        if not isinstance(m, dict) or not m.get("usage") or m.get("model") == "<synthetic>": continue
        u = collections.defaultdict(int, {k: v for k, v in m["usage"].items() if isinstance(v, int)})
        u["w1h"] = (m["usage"].get("cache_creation") or {}).get("ephemeral_1h_input_tokens") or 0
        key = (m.get("id"), o.get("requestId"))
        if key not in best or u["output_tokens"] > best[key][2]["output_tokens"]:
            best[key] = (o["timestamp"][:10], m.get("model") or "", u)
for day, model, u in best.values():
    i, r, out = P.get(next((k for k in P if model.startswith("claude-" + k)), None), (0, 0, 0))
    nop[model] += not i
    inp = u["input_tokens"] + 1.25 * (u["cache_creation_input_tokens"] - u["w1h"]) + 2 * u["w1h"]
    days[day] += (inp * i + u["cache_read_input_tokens"] * r + u["output_tokens"] * out) / 1e6
for mon in sorted({d[:7] for d in days}):
    v = [c for d, c in days.items() if d[:7] == mon]
    print(f"{mon} ${sum(v):.0f}, days {len(v)}, mean {sum(v)/len(v):.1f}, median {statistics.median(v):.1f}, max {max(v):.0f}")
print("no price, responses:", {k: n for k, n in nop.items() if n})
```

The cache formula inside: a 5-minute write costs 1.25 times the input price, a one-hour write 2. The author ran the script on November 29 with the same filter as the measurement (desktop and VS Code only): August, September, and October matched the table. November in the table is cut at the 28th, while the script counts through the last record. Without the filter, the total also includes other runs: terminal, `claude -p`, SDK.

What to look at in the result:

- Terminal Claude Code transcripts are deleted after 30 days by default ([documentation](https://code.claude.com/docs/en/claude-directory)). To collect a full month, raise `cleanupPeriodDays` in advance.
- The last line names models with no price in the dictionary. Their tokens count as $0, but their days count as active and lower the median, so add the price from the [price list](https://platform.claude.com/docs/en/about-claude/pricing). Haiku 5.5 is left out on purpose: it has two prices depending on prompt size.
- Days are counted in UTC; prices are current, not as of the response date.
- Compare the median and the mean. If they differ several times over, use three months instead of one.

For programmatic runs it's simpler: `claude -p "..." --output-format json` returns a `total_cost_usd` field, and `--max-budget-usd` stops the run based on estimated spend. With key billing, check the total on the Cost page in the Console.

## What lowers usage under either billing

On a subscription, lower usage pushes the limit further away; with a key, it shrinks the bill. More than half of the author's cost came from cache reads, meaning the accumulated context being sent again. Hence the obvious habit: new task, new session. The second lever is the model: Sonnet 5.5 input and output cost half as much as Opus 5.5 ($2/$10 against $4/$20), see [Opus vs Sonnet](https://futurecraft.pro/blog/claude-opus-vs-sonnet/). Subagents cost the author $221 and $220 of API equivalent in October and November; the [subagent measurements](https://futurecraft.pro/blog/claude-code-subagents/) show when they pay off. For budgets and routing in your own LLM products, see [LLM cost optimization](https://futurecraft.pro/blog/ai-cost-optimization/).

## Where to start

1. Check `/status` and the `ANTHROPIC_API_KEY` variable: you may already be paying the wrong way.
2. Run the script and write down the month's API equivalent and the mean and median per active day.
3. Calculate D = P / (C / N) for Pro and Max. If D is larger than your number of active days, the plan doesn't pay off.
4. Choose the cheapest plan that pays off and turn on usage credits with a cap. Extra charges above $80 on Pro or $100 on Max mean it's time to move up.
5. Put automation on a separate key with a spend limit in the Console.
6. Recalculate in a month: model prices and plan rules changed during the four months described here.
