Claude Code Tokens

Claude Code: Check How Many Tokens Used in a Session

A command-focused guide for checking Claude Code token usage, estimating session cost, and reducing waste in long coding tasks.

Last updated: July 26, 2026

Feature Comparison

Command or viewBest forWhat to trust it for
/usageCurrent Claude Code session token statisticsFastest answer to how many tokens this session used.
/costRunning API-key spend in the current sessionGood local estimate, not final billing.
/statusPlan/session allocation contextHelpful before starting another heavy task.
Claude Console UsageAccount-level billing and usage recordsAuthoritative billing source.
Prompt compactionKeeping long sessions manageableReduces repeated context and keeps future turns cheaper.

Direct Answer

Run /usage inside Claude Code to see the current session's token statistics. Use /cost for a local API-key spend estimate, /status for plan and allocation context, and the Claude Console for authoritative account billing.

/usage
/cost
/status

Fastest Command

Inside Claude Code, run /usage. Anthropic's Claude Code cost docs describe the Session block at the top of /usage as the place to see detailed token usage statistics for the current session.

/usage

Command Cheat Sheet

Use these commands before and after large tasks so you can compare the cost of investigation, implementation, and verification separately.

/usage
/cost
/status
/model
/compact

What Counts Toward Usage

Claude Code sessions can spend tokens on visible messages, repo context, tool results, command output, file reads, and repeated conversation history. Long terminal output and broad file reads can be more expensive than the prompt you typed.

  • Check usage before starting a multi-step refactor.
  • Run /usage again after investigation, before implementation.
  • Compact or start a new session when old context no longer matters.
  • Paste short logs or file ranges instead of entire generated outputs when possible.

Claude Code Usage Workflow

A repeatable workflow makes token use easier to compare across tasks.

1. Run /usage before the task.
2. Ask Claude Code to inspect only the relevant files first.
3. Run /usage after research.
4. Implement and verify.
5. Run /usage again and record the final session count.

Use Token Usage In Tool Comparisons

When comparing Claude Code with Cursor alternatives, record token usage around the same task so cost and context behavior are part of the evidence instead of a guess.

  • Run /usage before and after the same bug fix or refactor.
  • Compare token cost with review time and test evidence.
  • Note when Cursor-style editor work avoids long terminal logs, and when Claude Code saves time by running commands.

Official References

Use the official Claude Code docs for session token accounting and the Claude support article for model, usage, and limit behavior.

FAQ

How do I check how many tokens Claude Code used in a session?

Run /usage inside Claude Code. It shows token statistics for the current session, while account-level billing should be checked in the Claude Console.

Is the dollar cost shown in Claude Code final?

No. Treat local session cost as an estimate. The Claude Console is the billing source of truth.

Why did a small prompt use many tokens?

The session may include repo context, tool outputs, previous messages, system context, and file contents. Broad reads and long command output can dominate usage.

When should I compact a Claude Code session?

Compact when the session contains useful decisions but too much old detail. Start a fresh session when the old context no longer helps the task.