Text of code.claude.com › docs › en › costs as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Manage costs effectively - Claude Code Docs

Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. Claude Code charges by API token consumption. For subscription plan pricing (Pro, Max, Ultra, Team, Enterprise), see claude.com/pricing . Per-developer costs vary widely based on model selection, codebase size, and usage patterns such as running multiple instances or automation.

Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users. To estimate spend for your own team, start with a small pilot group and use the tracking tools below to establish a baseline before wider rollout. This page covers Claude Code usage only: how to track your costs , manage costs for your organization , and reduce token usage .

For usage limits in other Claude products, see the Claude Help Center . Track your costs Using the /usage command The Session block in /usage shows API token usage and is intended for API users. Claude Pro, Max, and Ultra subscribers have usage included in their subscription, so the session cost figure isn’t relevant for billing purposes. Subscribers see plan usage bars, activity stats, and a usage breakdown on the same screen.

Run /usage at the Claude Code prompt and look under the Session heading for your current session’s token usage. Claude Code computes the dollar figure locally from token counts at list price, unless a modelPricing table is in effect. An administrator sets one in your organization’s managed settings so the figure uses your contracted rates, and while a table is in effect the Total cost line carries the note at your organization's configured rates .

The figure is an estimate, so for authoritative billing see Manage costs for your organization . Total cost: $0.55 Total duration (API): 6m 20s Total duration (wall): 6h 33m 10s Total code changes: 0 lines added, 0 lines removed Usage by model: claude-sonnet-4-6: 1.2k input, 5.3k output, 940.0k cache read, 50.0k cache write ($0.55) These totals reset when /clear starts a new session, so the next session’s total cost starts at $0.

Before v2.1.211, they kept accumulating across /clear for the lifetime of the Claude Code process. For a response from the Claude API billed at the 1.1× data residency rate , Claude Code multiplies the list price of that response’s tokens by 1.1 in the session cost figure. The same total appears in the status line’s cost field , and the multiplied figure also counts toward --max-budget-usd . Prompt cache statistics After the main conversation’s first API response, Claude Code also adds a Prompt cache (main) line to the Session block, summarizing the session’s prompt cache use: the request count, the share of input tokens served from cache, cache misses, and whether the cache is warm right now.

Requires Claude Code v2.1.251 or later. Prompt cache (main): 14 requests · 91% of input tokens from cache · 2 misses (last 6m 10s ago, 310.2k tokens re-cached) · 1 expected rebuild (compaction or tool-result clearing) · warm (1h TTL, last activity 40s ago) The misses, expected rebuilds, and warm or cold parts of the line mean the following: Misses : requests that re-processed content the cache already held, with the time of the last miss and how many tokens those requests wrote back to the cache.

Actions that invalidate the cache lists the usual causes. When Claude Code can identify a likely cause for the last miss, the line names it too, for example likely cause: tool definitions changed . The likely-cause text requires Claude Code v2.1.260 or later. Expected rebuilds : when Claude Code has itself just rewritten the conversation, by compaction or by clearing old tool results from context, it counts the same kind of miss as an expected rebuild instead.

This part appears only after at least one expected rebuild has happened. Warm or cold : whether the cached prefix is still within its cache lifetime , with the TTL in effect. When the cache is cold, the line shows how long the session has been idle. When no response has reported cache tokens, the line ends with no prompt caching reported by the API instead. The counts come from the cache token fields in the API’s responses, so the line works on every provider and gateway.

It covers the main conversation only, not subagents. /clear resets it with the rest of the Session block. Status line scripts can read the same numbers from the prompt_cache object . Plan usage breakdown On a Pro, Max, Ultra, Team, or Enterprise plan, /usage also shows a breakdown of what counts against your plan limits, with recommendations: Attribution : recent usage attributed to skills, subagents, plugins, and individual MCP servers, each shown as a percentage of the total.

An MCP server’s share counts only the requests that consumed one of its tool results. Before v2.1.222, after one call to an MCP server, Claude Code attributed every subsequent request to that server, overstating its share. Recommendations : suggested changes, one per row. Each row starts with a share of your recent usage, at least 10%, as in 25% Trim ~/code/api/CLAUDE.md · 49k tokens per request . How to read the share : it tells you how much of your usage the row applies to, not how much the change saves.

One request can count toward several rows, so the shares can add up to more than 100%. How to apply recommendations : to have Claude Code apply the ones it can, see Apply recommendations with the fix shortcut Loops : a row for each of the heaviest /loop or other session-scoped scheduled tasks that ran recently, ordered by total tokens, with a count of the rest. Requires Claude Code v2.1.242 or later. What each row reports : how often the task fires, how many times it ran, its total and per-run tokens, and when it last ran Stopped and re-created loops : Claude Code keys a row by the task’s prompt, so a loop you stop and re-create stays one row Press d or w to switch between the last 24 hours and the last 7 days.

The figures are approximate and computed from local session history on this machine, so usage from other devices or claude.ai is not included. In the VS Code extension , the attribution shares and recommendations appear in the Account & usage dialog with a Day and Week toggle, without the Loops rows. Apply recommendations with the fix shortcut When the /usage footer shows a hint such as f to fix 2 of 3 , press f to have Claude Code act on the recommendations it can.

The f shortcut requires Claude Code v2.1.305 or later. After any turn in progress ends, Claude Code runs each /effort command shown in a row without run . Claude then gets one prompt with a step for each of the other rows it can act on. The prompt asks Claude to show you each change before making it. To see what pressing f does with each of your rows, find the row’s shape in the first column: Row shape Example row When you press f Ends in an /effort command with no run before it 40% Switch from max to high effort · /effort high Claude Code runs the command Ends in run and a command 30% Compact before you step away · run /compact Nothing happens for this row.

Run the command yourself at the Claude Code prompt Ends in anything else 25% Trim ~/code/api/CLAUDE.md · 49k tokens per request Claude gets a step in the prompt for some of these rows, and nothing happens for the rest. If Claude shows you no change for a row, follow that recommendation yourself In f to fix 2 of 3 , the first number counts the rows Claude Code acts on when you press f , and the second counts the rows shown.

A hint with no of in it, such as f to fix both , means Claude Code acts on every row shown. While Remote Control is connected, the footer shows no f hint. If pressing f closes /usage with Nothing was sent. Turn off Remote Control to

The rest of this page is on the live site.