Claude Tips mascot
Claude Tips & Tricks
Claude Code beginner

Track Your Spending with /cost

Use /cost to see real-time token usage and estimated costs for your current session. Know exactly what you're spending before it adds up.

Run /cost at any point to see how much your current session has used:

/cost

This shows:

  • Input tokens: how much context Claude has read
  • Output tokens: how much Claude has written
  • Estimated cost: dollar amount for the session
  • Cache hits: how many tokens were served from cache (cheaper)

Cost-Saving Habits

  1. Check /cost before big operations. If you’re already at $2 and about to ask for a massive refactor, consider starting a new session with just the relevant files
  2. Use /clear between unrelated tasks. Don’t carry over context from task A into task B
  3. Use /compact when context grows. Summarize before it gets expensive
  4. Switch to a cheaper model. /model sonnet or /model haiku for simple tasks
Paste into Claude Code
/cost