Claude Code /cost and /usage: check token spend, usage limits and reduce costs
How do I check my Claude Code costs and usage limits, and how do I spend less?
Run /usage (or its aliases /cost and /stats) to see session cost, plan usage limits and activity stats. Subscribers on Pro, Max, Team or Enterprise also get a breakdown of what counts against their limits. To spend less, /clear between tasks, pick a cheaper model with /model, lower /effort, and trim context with /context.
Check your usage
/usage shows the current session's token usage and an estimated dollar cost computed locally at list price. /cost and /stats are aliases. The totals reset when /clear starts a new session.
Inside Claude Code
/usage
On Pro and Max, the session cost figure is not relevant for billing because usage is included in the plan. You see plan usage bars instead. For authoritative API billing, use the Usage page in the Claude Console.
On Pro, Max, Team and Enterprise, /usage also shows attribution to skills, subagents, plugins and MCP servers, and flags behaviors such as long context or cache misses that account for 10% or more of recent usage. Press d or w to switch between the last 24 hours and 7 days.
What typical usage costs
Across enterprise deployments, Anthropic reports an average of around $13 per developer per active day and $150 to $250 per developer per month, with costs below $30 per active day for 90% of users. Background functions typically use under $0.04 per session. For plan prices, see claude.com/pricing.
Usage limit messages
- You've hit your session limit or weekly limit: a seat-based window shared across all models. Switching models does not help. The message shows when it resets
- You've hit your Opus limit or Sonnet limit: switch to a model outside that family with /model to keep working
- Run /usage-credits to turn on or request usage credits to work past your plan limit (requires claude.ai login, not an API key)
Team and Enterprise allowances reset on a rolling five-hour window and a weekly window, shared with Claude chat and Cowork.
Reduce token usage
- /clear when switching to unrelated work. Use /rename first, then /resume to return
- /compact with focus instructions, for example /compact Focus on code samples and API usage
- /model sonnet for most coding. Reserve Opus for complex reasoning
- /effort to lower thinking effort on simple tasks
- /context to see what is filling context, and /mcp to disable unused servers
- Move workflow-specific instructions out of CLAUDE.md into skills. Aim for CLAUDE.md under 200 lines
- Delegate verbose work like test runs to subagents so only a summary returns
Custom compaction instructions in CLAUDE.md
# Compact instructions When you are using compact, please focus on test output and code changes
Track spend in scripts and teams
claude -p with --output-format json returns total_cost_usd. A status line script can read cost.total_cost_usd. API teams can set workspace spend limits in the Claude Console, and OpenTelemetry export works on every setup.
Cost from a headless run
claude -p "Summarize this project" --output-format json | jq '.total_cost_usd'
Sources
More Claude Code guides
- How to allow Claude Code to run all commands: permission modes, allow rules and skip permissions
- Claude Code permissions: allow, ask and deny rules, rule syntax and allowed tools
- Claude Code telemetry and data retention: what is sent and how to turn it off
- CLAUDE.md: where it goes, how it loads, and how it works with AGENTS.md
- Claude Code hooks: all events, exit codes, PreToolUse and PermissionRequest JSON, examples
- Claude Code subagents: create one, limit its tools, and call it
- Add MCP servers to Claude Code (claude mcp add, .mcp.json, scopes)
- Claude Code custom slash commands and skills (SKILL.md)
- Claude Code settings.json: file locations, precedence, and key settings
- Claude Code plugins and marketplaces: install, create, and share
- Claude Code headless mode: claude -p, --output-format json, --bare and CI flags
- Claude Code statusline: custom status bar in settings.json with context %, cost and git branch
- Claude Code /model: switch models, aliases (opus, sonnet, haiku, opusplan), ANTHROPIC_MODEL and effort
- Claude Code VS Code extension: install, shortcuts, settings and /ide (works in Cursor too)
- MCP 2026-07-28 Migration Guide: Stateless Protocol, No Sessions, server/discover, MRTR, and SDK v2 Upgrade
- Subagents and Custom Agents Compared: Claude Code vs Codex vs Cursor vs Gemini CLI vs GitHub Copilot (2026)
- Allow all commands in any AI coding agent: Cursor, Claude Code, Codex, Gemini CLI, Copilot CLI and 7 more (2026)
- How to deploy a remote MCP server (Streamable HTTP): Cloudflare Workers, Vercel, Railway and more (2026)
- Claude Code sandbox: /sandbox, sandbox.enabled, allowedDomains, excludedCommands and strict mode
Reviewed Oct 18, 2026. Settings change often; the linked vendor docs are the source of truth.
Built an MCP server? Get it listed everywhere →
Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →