AI Coding Costs (2026): Claude vs Codex vs Gemini Cost Per Token, Real Monthly Spend

Claude Sonnet 5.5 is $2/$10 per million tokens and Opus 5.5 is $4/$20. GPT-6.1 Sol is $2/$10. DeepSeek V4.1 Flash is $0.30/$1.20. This page computes Claude cost per token, what a bug fix, a feature, and a month of agent coding cost at October 2026 rates, the subscription-vs-API breakeven, and why Microsoft canceled its Claude Code licenses.

October 15, 2026 · 1 min read
AI Coding Costs (2026): Claude vs Codex vs Gemini Cost Per Token, Real Monthly Spend

AI coding costs about $13 per developer per active day and $150 to $250 per developer per month on Claude Code, per Anthropic's own enterprise figures, with 90% of users under $30 on any active day. Plans start at $20/month (Claude Pro, Codex Plus), but agents bill by the token and one task pushes 400K to 2M cumulative input tokens through the API, so heavy automation reaches $500 to $2,000/engineer/month. This page computes the real numbers at published October 2026 rates: Claude cost per token for Sonnet 5.5 ($2/$10) and Opus 5.5 ($4/$20), cost per real task, the usage profile where a $100 Max plan beats API billing, and the Microsoft cancellation that put a dollar figure on enterprise agent spend.

$13/day
Anthropic's reported avg Claude Code cost per developer per active day ($150-250/mo)
$0.33
One bug-fix task on Sonnet 5.5 at API rates (token math below)
151 tasks/mo
Where Claude Max 5x ($100) breaks even vs Opus 5.5 API billing
$2,000/mo
Reported per-engineer Claude Code spend that made Microsoft cancel

Anthropic Claude API pricing in October 2026, per million tokens (input / output): Claude Fable 5.1 is $10 / $50, Opus 5.5 is $4 / $20, Sonnet 5.5 is $2 / $10, and Haiku 5.5 is $0.10 / $0.50 for prompts up to 100K tokens. Cache hits bill at $0.10/M on Sonnet 5.5 and $0.20/M on Opus 5.5. Those rates set what AI coding actually costs, because agents bill by the token and one task pushes 400K to 2M cumulative input through the API. To cut the bill: keep the prompt prefix cached, route easy tasks to cheaper models, compact stale context, and use the 50%-off Batch API. Full Claude-only detail on Anthropic API pricing.

Cost Per Token: Every Major Coding Model (October 2026)

Vendors publish prices per million tokens (MTok). One table, current official rates from the Anthropic, OpenAI, Google, and DeepSeek pricing docs, checked October 15, 2026:

API pricing per million tokens, October 2026
ModelInput /MTokOutput /MTokCache read /MTok
Claude Fable 5.1$10.00$50.00$0.25
GPT-6 Astra$10.00$50.00$1.00
Claude Opus 4.8 (previous gen)$5.00$25.00$0.50
Claude Opus 5.5$4.00$20.00$0.20
Claude Sonnet 4.6 (previous gen)$3.00$15.00$0.30
Claude Sonnet 5.5$2.00$10.00$0.10
GPT-6.1 Sol$2.00$10.00$0.10
Gemini 3.1 Pro Preview (≤200K prompt)$2.00$12.00$0.20
DeepSeek V4 Pro (peak)$1.32$3.96$0.044
Gemini 3.5 Flash-Lite$0.30$2.50$0.03
DeepSeek V4.1 Flash (peak)$0.30$1.20$0.006
Claude Haiku 5.5 (≤100K prompt)$0.10$0.50$0.01
GPT-6 Luna$0.10$0.50$0.01

Four pricing quirks matter for agents. Claude Haiku 5.5 steps from $0.10/$0.50 to $0.50/$2.50 once a prompt passes 100K tokens. Gemini 3.1 Pro doubles its input rate above 200K-token prompts ($2 to $4 input, $12 to $18 output). GPT-6 Astra and GPT-6.1 Sol have a separate long-context tier ($20/$75 and $4/$15). DeepSeek bills half its peak rate off-peak, and peak is 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays. Full Claude-only detail lives on Anthropic API pricing.

Price does not track capability linearly. Fable 5.1 output costs $50/M. DeepSeek V4 Pro output costs $3.96/M at peak, 12.6x less. The gap between a frontier model and a cheap one is a per-task decision, and the per-task table below shows what it costs. See DeepSeek V4 for the open-weights side of that tradeoff.

One caveat on the cheap open-weights rates: most serverless DeepSeek providers quantize activations to fp8 to cut cost, which degrades output below the reference weights. Providers that serve DeepSeek with full 16-bit (bf16) activations return output that matches the published model, so a lower sticker price is not always the same product. Check the precision a provider actually serves before comparing rates.

Claude Token Cost by Usage Profile

Claude API token cost for a developer runs about $22/month at light usage, $109/month at daily-pro usage, and $363/month at full-day agent usage on Sonnet 5.5 ($2/M input, $10/M output) at published October 2026 rates, assuming 75% of input served from cache at $0.10/M. Those API figures bracket Anthropic's own reported average of $13 per developer per active day. A flat subscription covers the same usage for $20 (Pro), $100 (Max 5x), or $200 (Max 20x).

The numbers below are token-math projections, not a live meter. Tokens/day means cumulative input pushed through the API across a day, since every agent turn resends the conversation so far. The single largest lever is the cache read: a cached input token bills at $0.10/M on Sonnet 5.5, 95% off the $2/M base. A long interactive session that keeps its prefix cached gets cheaper per token than a cold raw-API call, which is why measured Claude Code costs land well below naive (tokens × base rate) math.

Monthly Claude coding cost by usage profile, Sonnet 5.5, October 2026
Usage profileApprox tokens/day (in + out)API pay-as-you-goSubscription that covers it
Light (2-3 tasks/day)~1.2M in / 30K out~$22/moClaude Pro $20
Daily-pro (full workday)~6M in / 150K out~$109/moClaude Max 5x $100
Full-day agent (continuous)~20M in / 500K out~$363/moClaude Max 20x $200

Worked example for the daily-pro row: 6M input/day at 75% cache hits is 1.5M uncached × $2/M ($3.00) plus 4.5M cache reads × $0.10/M ($0.45), plus 150K output × $10/M ($1.50), for $4.95/day. Across 22 working days that is ~$109/month at API rates, which a $100 Max 5x subscription roughly matches. Drop to Haiku 5.5 ($0.10/$0.50) and the same profile costs about $6/month at API rates. Plug your own token counts into the LLM cost calculator.

What One Coding Task Costs

Per-MTok prices only become real when multiplied by an agent workload. Two representative profiles, applied identically to every model:

  • Bug fix: 25 API calls, 400K cumulative input tokens (75% served from cache), 10K output tokens.
  • Feature: 100 API calls, 2M cumulative input tokens (80% cached), 40K output tokens.

These are token-math projections at published rates, not measured sessions. Your profile shifts with codebase size and prompt discipline, but the model-to-model ratios hold because they come from the price sheet.

Computed cost per task at October 2026 API rates
ModelBug fixFeature20 features/month
DeepSeek V4.1 Flash (peak)$0.04$0.18$3.55
Claude Haiku 5.5$0.02$0.08$1.52
GPT-6 Luna$0.02$0.08$1.52
Gemini 3.5 Flash-Lite$0.06$0.27$5.36
DeepSeek V4 Pro (peak)$0.18$0.76$15.14
Claude Sonnet 5.5$0.33$1.36$27.20
GPT-6.1 Sol$0.33$1.36$27.20
Gemini 3.1 Pro Preview$0.38$1.60$32.00
Claude Sonnet 4.6$0.54$2.28$45.60
Claude Opus 5.5$0.66$2.72$54.40
Claude Opus 4.8$0.90$3.80$76.00
Claude Fable 5.1$1.58$6.40$128.00
GPT-6 Astra$1.80$7.60$152.00

Worked example for Sonnet 5.5 on the bug-fix profile: 100K uncached input × $2/M = $0.20, plus 300K cache reads × $0.10/M = $0.03, plus 10K output × $10/M = $0.10. Total $0.33. Without prompt caching the same task costs $0.90, a 2.7x difference from one config flag. Gemini's figure excludes its cache storage fee ($4.50 per 1M tokens per hour on 3.1 Pro), which adds cost on long-lived sessions.

The other cost driver is context growth. Every API call resends conversation history, so cumulative input scales with both task length and how much noise (file dumps, failed attempts, verbose tool output) accumulates. Context rot compounds it: quality drops as context grows, failures add more context, the next call costs more. Plug your own token counts into the LLM cost calculator.

Claude Pro, Max, and Claude Code in 2026

The question search data shows people asking most: what does the Claude Pro plan cost per month in 2026, and is Claude Code included? Answer: Claude Pro is $20/month billed monthly, $17/month billed annually ($200 up front), and yes, Claude Code is included on Pro, Max 5x ($100/month), and Max 20x ($200/month). Max 5x and 20x give 5x and 20x the Pro usage, and both Max tiers now add monthly API credits for the Claude Platform: $100 on Max 5x, $200 on Max 20x.

Coding agent subscription plans, October 2026
PlanPrice/monthWhat you get
Claude Pro$20 ($17 annual)Claude Code + chat, base Pro usage
Claude Max 5x$1005x Pro usage + $100/month API credits
Claude Max 20x$20020x Pro usage + $200/month API credits
Codex Free / Go$0 / $8GPT-6 Luna in the Codex desktop app, lightweight tasks
Codex Plus$20Codex on web, CLI, IDE, and iOS with GPT-6.1 Sol and GPT-6 Luna
GitHub Copilot Pro+$393,900 GitHub AI credits per month
GitHub Copilot Enterprise$39/seat3,900 AI credits per user (the plan family Microsoft moved engineers to)

GPT-5.5 retired from Codex with ChatGPT sign-in on October 14, 2026; API-key sessions are unaffected. Plan-level detail: Claude Code pricing, Codex pricing, Claude Code usage limits, and Claude Code team pricing.

Subscription vs API: The Breakeven Math

Reddit is full of claims that Claude subscriptions are 25-36x cheaper than API billing. The claim is computable, so compute it. Using the bug-fix profile above ($0.66 per task on Opus 5.5 at API rates):

  • Max 5x ($100/month) breakeven: $100 / $0.66 = 151 bug-fix tasks per month, about 7 per working day. Or $100 / $2.72 = 36 feature-sized tasks.
  • Max 20x ($200/month) breakeven: 303 bug fixes or 73 features per month.
  • Pro ($20/month) breakeven: 30 bug fixes per month on Opus 5.5, or 60 on Sonnet 5.5 ($0.33/task). One or two tasks per working day already beats API billing.

A 36x subsidy means extracting $3,600 of API-equivalent usage from a $100 plan: about 5,450 bug-fix-sized tasks per month at Opus 5.5 rates, or roughly 250 per working day. No human does that interactively. That volume is cron jobs, CI pipelines, and Agent SDK fleets running under a flat-rate login, the usage Anthropic tried to carve out on June 15. The monthly API credits on Max ($100 and $200) give that automation a metered lane inside the plan price.

The breakeven rule of thumb

If you run more than ~1 agent task per working day, a subscription beats API billing for interactive use. If you run more than ~5 per day, Max 5x beats Pro. API billing only wins when usage is sporadic, when you need a cheaper model family (DeepSeek V4.1 Flash at $0.18/feature has no subscription to beat), or when automation volume would blow through the plan's usage limits.

Claude Max API Credits and the June 15 Billing Change

Current state, October 2026: Claude's pricing page lists monthly API credits as a new Max feature: $100/month on Max 5x and $200/month on Max 20x, for building on the Claude Platform. Team plans list up to $500 per month in pooled API credits. Background: Anthropic announced in mid-May 2026 that it would split subscription usage into two pools effective June 15, then paused that change on June 15 itself.

What the paused June 15 plan would have moved to a metered credit pool billed at standard API token rates:

  • Claude Agent SDK usage (Python and TypeScript)
  • claude -p headless mode (scripts, cron jobs)
  • The Claude Code GitHub Actions integration
  • Third-party apps authenticating with a Claude subscription via the Agent SDK

Chat on web, desktop, and mobile, interactive Claude Code in the terminal or an IDE, and Claude Cowork were never part of the announced change.

The motivation is the breakeven math above: agents were extracting large effective subsidies on flat-rate logins, and the April 2026 restriction on third-party tools consuming flat-rate plans pointed the same direction. Volume beyond what a plan and its API credits absorb belongs on a straight API key, the Batch API at 50% off, or a cheaper model tier.

Why Microsoft Canceled Claude Code Licenses

Microsoft canceled Claude Code because token-based billing reached $500 to $2,000 per engineer per month for power users and burned through the division's annual AI budget in months, per Windows Central's June 2026 report. The Experiences + Devices division (Windows, Microsoft 365, Outlook, Teams, Surface) told thousands of engineers to stop using Claude Code by June 30, 2026 and move to GitHub Copilot CLI. June 30 is also Microsoft's fiscal year end, and Copilot is Microsoft's own product, so the move cut costs and consolidated on in-house tooling at once.

The reported figures line up with Anthropic's own published Claude Code average of $150 to $250 per developer per month, with power users far above that band. Microsoft is not the only one: the same report notes Uber exhausted its 2026 AI budget on Claude Code in four months. The pattern is structural. Token billing scales with how much an agent does, so a more useful agent costs more, and the bill has no ceiling unless a team sets one.

The economics generalize beyond Microsoft. Enterprise Claude Code is a seat fee plus actual token usage, so spend scales with how useful the tool is: better agent, more usage, bigger bill. Copilot Enterprise lists at $39/seat/month with a 3,900 AI-credit allowance per user. At $2,000/engineer/month in token billing versus a $39 seat, the CFO math is 51x, regardless of which tool engineers prefer. The unresolved question is output: a flat-rate tool that caps usage also caps the work the agent does. Teams making this decision should compute cost per completed task (the table above), not cost per seat.

Cache Pricing and the Tokenizer Change

Prompt caching is the single largest lever on effective Claude costs because agent calls are mostly repeated prefix. Anthropic's multipliers on base input price: 5-minute cache write 1.25x, 1-hour cache write 2x. Cache reads got cheaper on the 5.x generation: $0.25/M on Fable 5.1 (2.5% of input), $0.20/M on Opus 5.5 and $0.10/M on Sonnet 5.5 (5%), and $0.01/M on Haiku 5.5 (10%).

Claude effective rates per MTok with cache mechanics
ModelInput5-min cache writeCache readBatch (in/out)
Claude Fable 5.1$10.00$12.50$0.25$5.00 / $25.00
Claude Opus 5.5$4.00$5.00$0.20$2.00 / $10.00
Claude Sonnet 5.5$2.00$2.50$0.10$1.00 / $5.00
Claude Haiku 5.5 (≤100K prompt)$0.10$0.125$0.01$0.05 / $0.25
Claude Opus 4.8$5.00$6.25$0.50$2.50 / $12.50
Claude Sonnet 4.6$3.00$3.75$0.30$1.50 / $7.50

Three more line items people miss. The Batch API is a flat 50% off input and output for work that tolerates async processing. Setting inference_geo: "us" on supported models adds a 1.1x multiplier on every token category. The web search tool bills $10 per 1,000 searches on top of tokens.

And the tokenizer: Claude 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text, per Anthropic's pricing docs. Sonnet 4.6 and earlier use the previous tokenizer. A per-token price cut on the 5.x models is partly offset by that token count, so compare cost per task, not cost per token alone.

Monthly Spend Scenarios

Putting plans, token math, and breakevens together. Task counts use the bug-fix and feature profiles defined above; API-equivalent figures show what the same usage would bill at standard rates.

What AI coding costs per month by usage profile, October 2026
ProfileRecommended setupMonthly costAPI-equivalent
Solo, light (2-3 tasks/day)Claude Pro or Codex Plus$17-20~$20-35 at Sonnet 5.5 rates
Solo, budgetCodex Go, or DeepSeek V4.1 Flash API direct$2-8$2-8 at DeepSeek V4.1 Flash rates
Solo, heavy (8-12 tasks/day)Claude Max 5x$100~$150-600 at Opus 5.5 rates
Solo, heavy + automationClaude Max 20x + API key for overflow$200-400$600-1,200+
5-person team, Claude-first5x Max 5x$500$750-3,000
5-person team, seat-basedCopilot Enterprise (Microsoft's pick)$195n/a (AI-credit allowance)
5-person team, open-weight APIDeepSeek V4 Pro / V4.1 Flash via API$20-80that is the API bill

The $1,000+/month profiles are real but rare for individuals: they require Fable 5.1 or GPT-6 Astra-class models ($6.40 to $7.60 per feature) plus heavy automation, or unoptimized agents resending 200K-token contexts without caching. For most solo developers the 2026 answer is $20-100/month on a subscription. For teams it is $20-500/month per 5 engineers depending on model tier, with the open-weight API option an order of magnitude below the frontier-subscription option.

How to Cut the Bill

Four levers, in order of impact. Each works alone; routing plus compaction typically cuts API spend 40-70%.

1. Prompt caching: pay 2.5-10% on repeated prefix

The bug-fix math above showed it: $0.33 with caching versus $0.90 without on Sonnet 5.5. Claude Code enables caching automatically. If you run a custom harness against the API, structure prompts so the system prompt, CLAUDE.md, and file context sit in a stable prefix, and mark cache breakpoints. On the bug-fix profile that is a 63% discount.

2. Model routing: match model tier to task difficulty

Haiku 5.5 costs 40x less than Opus 5.5 on both input and output for prompts up to 100K tokens. Typo fixes, imports, docstrings, and formatting do not need a frontier model. A model router that scores each request and sends it to the cheapest model that passes gets a coding agent cheaper and faster at the same time. If half your tasks are Haiku-tier, routing alone roughly halves model spend. See Sonnet vs Haiku for where the capability line actually sits.

Open-weight models make a cheaper backend for the easy tier: DeepSeek V4.1 Flash bills $0.30/M input and $1.20/M output at peak and half that off-peak, 8x cheaper per output token than Sonnet 5.5. Route easy tasks there, keep frontier models for hard ones, and pay frontier rates only on the requests that need them.

For multi-agent workloads, routing also applies at the architectural level: planner on Opus 5.5, executor on Sonnet 5.5 or Haiku 5.5. Execution usually consumes more tokens than planning, so the executor's model sets most of the bill.

3. Context compaction: stop resending noise

Cumulative input is the dominant line item in both task profiles (70% of the Sonnet 5.5 bug-fix cost is input, not output). Most of that context is stale: failed attempts, verbose tool output, file dumps from 40 turns ago. Context compaction that deletes irrelevant lines verbatim (no summarization, no rewriting) can shrink context 50-70%. Shrinking the 2M-token feature profile to 800K cuts the Sonnet 5.5 cost from $1.36 to about $0.78 and reduces context-rot failures at the same time.

4. Batch API and scoped prompts

Anthropic's Batch API is a flat 50% off ($2/$10 on Opus 5.5, $1/$5 on Sonnet 5.5) for async work: code review, test generation, bulk refactors. And prompts that name the file ("fix the JWT check in src/auth/middleware.ts") skip the exploration turns that "fix the auth error" pays for. Full treatment of every lever: LLM cost optimization.

Audit the subscription stack

Cursor includes Claude and GPT access, Copilot and Cursor overlap on completions, and Codex comes with every ChatGPT plan including Free. Cancel duplicate coverage before optimizing tokens.

Measure cost per task, not per seat

Microsoft's $2,000/engineer/month number was unbounded usage on a frontier model. A team tracking $/completed-task can route 80% of tasks to models that cost 10-50x less.

Use the Max API credits

Max 5x includes $100/month and Max 20x $200/month in Claude Platform API credits. Point CI, cron, and Agent SDK jobs at those credits before buying a separate API budget.

Frequently Asked Questions

How much is the Anthropic Claude Pro plan per month in 2026, and is Claude Code included?

$20/month billed monthly, $17/month billed annually ($200 up front). Claude Code is included on Pro and on both Max tiers (Max 5x $100/month, Max 20x $200/month). Both Max tiers now add monthly API credits for the Claude Platform: $100 on Max 5x and $200 on Max 20x.

What is Claude's cost per token?

Per million tokens, input/output, October 2026: Haiku 5.5 $0.10/$0.50 up to 100K-token prompts, Sonnet 5.5 $2/$10, Opus 5.5 $4/$20, Fable 5.1 $10/$50. Per individual token on Sonnet 5.5 that is $0.000002 in and $0.00001 out. Cache hits are $0.10/M on Sonnet 5.5 and $0.20/M on Opus 5.5, and batch is 50% of standard.

How much does Claude Code cost per developer?

Anthropic's Claude Code cost docs put enterprise deployments at about $13 per developer per active day and $150 to $250 per developer per month, with 90% of users under $30 on any active day. Power users on heavy automation reach $500 to $2,000 per month. Cache hit rate, model choice, and codebase size move the number most.

How much does one Claude Code task cost in API terms?

With a typical agent profile (25 calls, 400K cumulative input at 75% cache hits, 10K output), a bug fix computes to $0.33 on Sonnet 5.5, $0.66 on Opus 5.5, and $1.58 on Fable 5.1. A feature-sized task (100 calls, 2M input, 40K output) computes to $1.36, $2.72, and $6.40. The same feature is $0.76 on DeepSeek V4 Pro at peak rates and $1.36 on GPT-6.1 Sol.

Did Microsoft really terminate Claude Code licenses over costs?

Yes. Windows Central reported in June 2026 that Microsoft's Experiences + Devices division ordered engineers off Claude Code by June 30, 2026, citing token billing that reportedly hit ~$2,000 per engineer per month and exhausted the annual AI budget early. Engineers were moved to GitHub Copilot CLI. Copilot Enterprise lists at $39 per seat per month.

Is Claude Max worth it compared to API billing?

For interactive use, almost always past light usage. Max 5x ($100) breaks even against Opus 5.5 API rates at ~151 bug-fix tasks or ~36 features per month, about 7 bug fixes per working day. The plan also carries $100/month in API credits, which covers scripted usage the subscription limits do not.

What happened to the June 15, 2026 Claude billing change?

Anthropic announced that Agent SDK usage, claude -p headless mode, the Claude Code GitHub Actions integration, and third-party apps on subscription auth would move to a separate credit pool billed at API rates, then paused the change on June 15 itself. Claude's pricing page now lists monthly API credits on Max ($100 and $200) and up to $500 per month pooled on Team.

What is the cheapest model that can actually code?

At October 2026 rates, GPT-6 Luna and Claude Haiku 5.5 bill $0.10/$0.50 per MTok, DeepSeek V4.1 Flash bills $0.30/$1.20 at peak and half that off-peak, and DeepSeek V4 Pro bills $1.32/$3.96 at peak. A feature-sized agent task costs under $0.20 on the first three, against $2.72 on Opus 5.5.

Related Resources