Skip to main content

TIL about tracking your Claude Code tokens usage

Published:

1 min read

I wrote about tracking Codex tokens usage recently, and the same tool works for Claude Code. Different command though:

npx ccusage

The tool is part of the ccusage project. Works with Claude Code’s local logs, no API keys needed. It reads your local Claude Code logs and gives you a daily breakdown of exactly what you’re spending.

Here’s an example usage:

DateModelsInputOutputCache CreateCache ReadTotal TokensCost (USD)
2026-02-05haiku-4-5, opus-4-554.3K9.7K3.2M87.1M90.4M$59.20
2026-02-06haiku-4-5, opus-4-5, opus-4-611.0K5.4K1.2M25.7M26.9M$18.59
2026-02-07haiku-4-5, opus-4-6, sonnet-4-527.3K4.9K718.7K10.6M11.3M$7.39
2026-02-08haiku-4-5, opus-4-6, sonnet-4-515.4K4.9K287.9K7.7M8.0M$5.17
(other sessions)

Compared to the Codex output, the Claude Code breakdown adds a Cache Create column. This tells you when it’s building up context vs reusing it through Cache Read.

The ratio between the two shows cache efficiency. For example, 454.4M cache reads vs 28.8M cache creates means the context is being reused about 16x. Cache behavior explains why some sessions feel faster.

If you’re on Claude Code and haven’t checked your usage, run npx ccusage. You might be pleasantly surprised after checking your usage.

Support me

Next Post
TIL about tracking your Codex tokens usage

Aman Mittal author

I'm a software developer and technical writer. On this blog, I share my learnings about both fields. Recently, I have begun exploring other topics, so don't be surprised if you find something new here.

Currently, working on documentation at Expo.

Tech writing blog webring | Static.Quest webring