CLAUDE.md Context Budget Calculator

Every line in CLAUDE.md, every connected MCP tool schema, and every pinned file eats into your 200K Claude Code context window on every single turn. Drag the sliders below to measure fixed prefix overhead, remaining conversation headroom, and your monthly token tax.

Interactive calculator

Context LayerTokens% of 200KMonthly Cost (Sonnet 4)Tuning Advice

Frequently asked questions

How long should a CLAUDE.md file be?

Aim for 80 to 250 lines (roughly 1.1K to 3.5K tokens). Put module-specific instructions in nested subdirectory CLAUDE.md files so they only load when needed.

Why do MCP tool schemas consume so much context?

Each MCP tool definition includes a JSON schema and description averaging 400 to 600 tokens. Connecting 60 tools injects nearly 30K tokens before you type a single prompt.

Does prompt caching eliminate CLAUDE.md token cost?

Prompt caching cuts static prefix reads by 90%, but large prefixes still reduce usable reasoning headroom and trigger earlier auto-compaction.

All calculations run 100% locally in your browser with zero external API calls. Pricing and rate limits reflect published 2026 provider rate cards.