frederikvonsperling
index / you-can-now-see-the-cost-of-your-claude-session

You can now see the cost of your Claude Code session

01Find the cost of your current session#

When using Claude Code you can access the usage stats page by invoking /usage. As shown in the image below, the usage tab now holds a Total cost line. As in this great example, I’ve used $5.82 and managed to achieve 0 lines added, 0 lines removed…

Usage tab inside Claude Code in terminal showing the new Total cost feature
Usage tab inside Claude Code now show a Total cost

02How is the cost calculated?#

Claude Code calculates the cost using the list prices. The prices contain different costs, depending on the type of tokens used (input, output, cache read or cache write).

You can see the full list right here: https://platform.claude.com/docs/en/about-claude/pricing

03Forwarding the token cost#

In reality, most users of Claude Code are on some kind of plan. At the time of writing, the available plans are Pro, Max 5x and Max 20x. This means that in reality, users or organizations do not end up paying what the cost line defines within the usage tab.

But the changes in the business model with the emergence of AI, can now force the need for forwarding the token cost to clients, as normal time and materials make less sense, as multiple agents and sessions can serve multiple clients at the same time. As agents take more and more of the work it gets harder to pass as expenses or baked into the hourly rate, as the majority of the work is going to be done in parallel with multiple agents and the cost of tokens and token use will inevitably go up.

QUESTIONS & ANSWERS

What is cost in Claude Code?

Cost in Claude Code is an estimate of the price of tokens used in the current session, based on input, output, cache read and cache writes.

Where to find cost of a session in Claude Code?

By invoking /usage inside Claude Code, you get a usage stats dashboard containing the cost of the current session.

How is cost calculated in Claude Code?

Claude Code calculates the cost based on the current price list for their models. Each model has a price for the four different tokens types (input tokens, output tokens, cache read tokens and cache write tokens)

SUBSCRIBE

Get an email when a new post is published. Nothing more.