How to Check Claude Code Token Usage
Claude Code logs every token it uses. The question is which method gives you the full picture — by day, by model, and over time.
Quick answer
npx whoburnedmore in your terminal. It reads Claude Code's local JSONL logs under ~/.claude and gives you a daily and monthly token breakdown with estimated API cost — no sign-in, no data uploaded. The built-in /usage command only shows your current rate-limit window. 🔥Claude Code is unusually transparent about usage: it writes a JSONL log of every message, including token counts, to a hidden folder on your machine. The challenge is that the built-in slash commands are designed to help you stay within limits, not to give you a historical audit. If you want to know what you burned last Tuesday, or whether your Claude Max subscription is actually cheaper than API billing would be, you need to read the logs directly — and that is exactly what whoburnedmore does.
How do I check my Claude Code token usage?
The fastest path is a single command that requires nothing installed and no account:
$ npx whoburnedmore↳ scanning ~/.claude/projects/…↳ found 847 JSONL entries across 23 sessions CLAUDE CODE USAGE ──────────────────────────────────────── 2026-06-14 input 2,341,200 output 189,400 2026-06-13 input 1,876,500 output 142,900 2026-06-12 input 3,104,800 output 267,100 MODEL BREAKDOWN claude-sonnet-4-5 14.2M tokens claude-opus-4 4.1M tokens 30-day total: 18.3M tokens est. $61.40
The ~/.claude directory (or ~/.config/claude on some Linux systems) is where Claude Code writes its project logs. whoburnedmore uses the open-source ccusage library under the hood to parse these JSONL files, then aggregates them into daily, monthly, and session-level summaries — adding up the inputTokens and outputTokens fields from each entry.
What the built-in slash commands show
Claude Code ships three commands that give you partial usage visibility inside an active session. Understanding what each one covers — and what it misses — helps you decide when to reach for whoburnedmore:
- 1
/usage — current rate-limit window
Shows how many tokens you have consumed in your current 5-hour or weekly window relative to your plan cap. Useful for knowing if you are about to hit a limit. Does not show cost or historical data. - 2
/context — context-window fill
Shows how full the current conversation context window is (expressed as a percentage). This tells you when the model will start dropping earlier messages, but it is a property of the current session, not a usage total. - 3
/cost — session-level cost
Shows the estimated cost for the current session only. Close the terminal and the number is gone. No persistence, no day-over-day comparison.
Pro/Max plans: cost is still worth knowing
On Claude Pro or Max you pay a flat monthly fee, so the token cost shown by/costand whoburnedmore is “what this would cost at API rates.” That is actually the most useful number: it tells you whether your subscription is a good deal relative to your actual usage, and flags runaway sessions before they become a habit.What does a daily token breakdown look like?
Token consumption varies wildly by day. A day spent on a large refactor with heavy tool-use loops burns far more tokens than a day of quick questions. The daily view makes those spikes visible 📊:
Jun 12 stands out — that is the day a large refactor ran 47 sequential tool-call loops. Each loop sent the full context back to the model, multiplying input tokens. Without a daily view, that spike is invisible; with it, you can trace the spike to a specific project and decide whether the pattern is worth changing.
Daily vs monthly vs session breakdowns
whoburnedmore surfaces three granularities. Day-level catches spikes. Month-level answers “is my plan paying off?” Session-level (available with npx whoburnedmore --sessions) shows individual conversation costs, which is the most useful view when you are debugging a single expensive workflow.
How is the estimated Claude Code cost calculated?
Claude prices input and output tokens separately, and the ratio matters a lot: output tokens typically cost 3–5x more than input tokens. whoburnedmore applies the public per-token price for each model you used and sums them:
For example, claude-sonnet-4-5 is priced at $3 per million input tokens and $15 per million output tokens as of mid-2026. A day where you sent 2M input tokens and received 180K output tokens would cost roughly $6.00 + $2.70 = $8.70 in API terms. That math is done automatically for each model in your log.
| Method | Daily history | Cost estimate | Per-model split | Cross-tool |
|---|---|---|---|---|
| /usage (built-in) | — | — | — | — |
| /cost (built-in) | — | session only | — | — |
| ccusage (CLI) | — | |||
| whoburnedmore | 12+ tools |
Where does Claude Code store its logs?
Claude Code writes JSONL files to a per-project directory structure under ~/.claude/projects/. Each session gets its own file, named by session ID. The JSONL format means every line is a valid JSON object representing one turn — with fields for the role, model name, and token counts. You can inspect these directly:
$ ls ~/.claude/projects/-Users-ab-code-myproject/ -Users-ab-code-otherproject/ $ ls ~/.claude/projects/-Users-ab-code-myproject/20260614T091234_abc123.jsonl 20260613T154500_def456.jsonl $ head -1 ~/.claude/projects/-Users-ab-code-myproject/20260614T091234_abc123.jsonl | python3 -m json.tool | grep -E 'inputTokens|outputTokens|model' "model": "claude-sonnet-4-5", "inputTokens": 48920, "outputTokens": 3812,
This is the raw data whoburnedmore reads. The log path can differ: on some Linux setups Claude Code respects $XDG_CONFIG_HOME and writes to ~/.config/claude instead. whoburnedmore checks both locations automatically.
Keep a cross-tool view
If you also run Codex CLI, Gemini CLI, or Copilot, runningnpx whoburnedmore shows Claude Code alongside those tools in one table. See the cross-tool usage guide for the full picture.Does reading my Claude logs send anything to a server?
No code, no prompts, and no file names ever leave your machine. whoburnedmore reads the numeric fields — token counts, model names, timestamps — and sends only the aggregated totals to the leaderboard if you choose to submit. You can verify this with npx whoburnedmore --dry-run, which prints exactly what would be submitted. Or use npx whoburnedmore --local to open a local dashboard that stays entirely on your computer. 🛡️
command to run
scan time on avg machine
days of history available
Related guides
How to Check Your AI Coding Token Usage
The cross-tool overview: one command that totals your token usage and cost across every AI coding agent you run.
How to Check Codex CLI Usage and Token Cost
Codex CLI's /status only shows the current window — here's how to see your full history and cost.
How Much Does Claude Code Cost Per Month?
Stop guessing from averages — measure your own monthly Claude Code cost from real usage.