How to see what a Claude Code session costs
Updated 17 November 2026
Run /usage inside Claude Code and read the Session block, which shows total cost, duration and tokens by model for the current session. For a live figure, put cost.total_cost_usd in your status line. On a Pro or Max subscription the dollar amount is an estimate at list price and is not what you are billed.
Type /usage at the Claude Code prompt and look under the Session heading. That block shows what the current session has used. The rest of this page covers what the numbers mean, how to keep one in view while you work, and what makes it climb.
The facts here are from the costs page of the Claude Code docs.
What does /usage show for the session?
The Session block looks like this:
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)
Three things to know about it:
- Claude Code works out the dollar figure on your machine from token counts at list price. It is an estimate.
- The totals reset when
/clearstarts a new session. - From v2.1.251 there is also a
Prompt cache (main)line showing how much of your input came from cache and how many misses there were.
Does the dollar figure matter on a subscription?
Not for billing. The docs say the Session block is intended for API users. On Pro, Max and Ultra, usage is included in the subscription, so the cost figure is not what you pay.
It is still useful as a measure of how heavy a session is. A session that reads as $12 at list price is using your plan’s allowance much faster than one that reads as $0.80. What counts against you on a subscription is the 5-hour and weekly limits, which /usage shows as bars on the same screen. See checking your Claude Code usage limit.
On a paid plan, /usage also breaks recent usage down by skills, subagents, plugins and MCP servers, and suggests changes. Press d or w to switch between the last 24 hours and the last 7 days. Those figures come from session history on this machine only.
How do I keep the cost visible while I work?
Put it in the status line. Claude Code passes cost.total_cost_usd to your status line script, the same total that /usage shows.
The shortest version is an inline command in ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "jq -r '\"[\\(.model.display_name)] $\\(.cost.total_cost_usd // 0)\"'"
}
}
For a formatted version with the session time, use the script in setting up a Claude Code status line.
What is the token count beside the spinner?
While Claude works, the line by the spinner can end with something like (10m 27s · ↓ 5.5k tokens). That is a live, approximate count of output for the current turn only. It leaves out everything Claude Code sends to the model, so your prompt and the conversation history do not move it, and it resets each turn. It will not match the /usage totals.
Where is the raw data?
Claude Code saves each session as a JSONL transcript at:
~/.claude/projects/<project>/<session-id>.jsonl
<project> is your working directory path with non-alphanumeric characters replaced by -. The records include what each request used.
The docs are clear that the entry format is internal and changes between versions, so a script that parses these files can break on any release. For a script of your own, the supported route is a non-interactive run with JSON output, which returns the result, usage and cost:
claude -p --resume <session-id> --output-format json "summarize what we changed" | jq -r '.result'
Note that this sends a new prompt to the session, so it uses tokens itself.
Why does a long session cost so much?
Claude Code sends the full conversation with every request, and each batch of tool results is another request. The docs list the usual causes of a session using more than you expected:
- Long context. A one-line question in a session that has been open all day still pays for the whole history, at the cached rate.
- Cache misses. Your first message after a long break reprocesses the full context.
- Subagents. Each one sends its own requests on top of the main conversation.
- Scheduled tasks. A
/loopfires on its interval even when the session is idle. - Compaction.
/compactreads everything it summarises, so compacting a large context is itself a large request.
How do I reduce it?
- Run
/clearwhen you move to unrelated work. Use/renamefirst so you can find the session again with/resume. - Use Sonnet for most work and keep Opus for the hard problems. Switch with
/model. - Lower the effort level with
/effortfor simple tasks. Thinking tokens are billed as output tokens. - Run
/contextto see what is filling the window, and disable MCP servers you are not using with/mcp. - Keep
CLAUDE.mdshort. The docs suggest under 200 lines, with workflow-specific instructions moved into skills. - Write specific prompts. “Add input validation to the login function in auth.ts” reads far fewer files than “improve this codebase”.
For a sense of scale, the docs put the average across enterprise deployments at around $13 per developer per active day, with 90% of users under $30.
How do I see cost across several sessions at once?
The built-in tools do not cover this. /usage and the status line each report on the session you are looking at. With three sessions open you check three terminals.
NotchDaddy keeps a token and cost meter for every session in the MacBook notch. It reads the figures locally from the transcripts on your Mac, so nothing is sent anywhere, and it carries the same caveat as /usage: it is an estimate at list price, and it depends on the transcript format staying readable. If you turn it on, it can also show your Claude 5-hour and weekly limits with alerts; that part is off by default.
You do not need it if you run one session at a time. /usage and a status line give you the same number for free. The session view is described on the agents page and the limit gauge on the usage limits page.
Start a 3-day trial for $0. It is $19 once after that.